Refnum more specific class error

I am trying to make a general control reference number into the more specific TabControl refnumber, but when I try using the "To More Specific Class" VI with a TabControl reference constant, I get the following error:
Code: 1057
Error:  Type mismatch: Object cannot be type casted to the specified type.
I have posted a picture of what I am trying to do (the false case just passes the boolean through).
Is there a reason that I am not able to nake the more general control reference into a TabControl refnum?
Thanks.
--Robert
Message Edited by knapkerd on 06-19-2008 11:28 AM
Message Edited by knapkerd on 06-19-2008 11:28 AM
Attachments:
more_specific_class.PNG ‏11 KB

knapkerd wrote:
Is there a reason that I am not able to nake the more general control reference into a TabControl refnum?
Yes, there is.
What you're attempting to cast is not the tab control, but its owner, which would be either the panel or the pane. If you use the control reference it should work.
As a side point, a simpler way to do this would simply be to type cast until you get no error (instead of comparing to the class name). If you need more than one class you can wire the string directly into the case structure selector.
Try to take over the world!

Similar Messages

  • To more specific class: all return error after upgrade from LV2011 to 2012

    I have working projects/executables built in labview 2011. When loading the exact same project in 2012 EVERY 'to more specific class' returns an error.
    For example, making a generic control reference into a 'numeric'.
    Redoing the exact same action makes no difference. What has changed in LV2012?

    Can you post an example VI containing such code? Please post the original 2011 code.
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • To more specific class for waveform chart

    Dear All
    In the attached VI diagram the "To more specific class" gives an error messag:
    LabVIEW:  Type mismatch: Object cannot be type casted to the specified type.
    so it can not work for my waveform chart. I think I changed some properties or some thing similar for my chart that can not work with this routine because it works for new instances of waveform charts but whatever I try to find the difference between my waveform chart and a new instance of waveform chart I don't not find any difference.
     Do you have any clue?
    Best regards
    Afshin
    Attachments:
    VI2.JPG ‏59 KB

    Try to use the "Controls[]" and the "ClassName" property instead. See attachment.
    Best regards
    chris
    CL(A)Dly bending G-Force with LabVIEW
    famous last words: "oh my god, it is full of stars!"
    Attachments:
    WaveformChart.JPG ‏61 KB
    WaveformChart_85.vi ‏18 KB
    WaveformChart_85_CTL.ctl ‏9 KB

  • To More Specific Class & Plugin Architecture

    Hello there,
    I have a plugin architecture and I want to load a particular class on demand, when a user clicks a button etc.
    I can do this using 'Get LV Class Default Value.vi' knowing the path of the .lvclass file, and I can then use the 'To More Specific Class' vi to cast it from type LV Object to the specific class I know it to be.
    However if I have 30 different classes with this method I would have to have 30 different class constants in a case structure so I can cast to the right one.  This works but it means all the classes are loaded into memory when the program is run, even though the user may never want to use most of them, which is a waste of time/memory.
    Is there a better way of doing this please?
    Thanks,
    Martin

    I wonder if minute 4:00 in Michael's video will help you. It avoids the constants, as long as all the classes are descendants of a common class:
    http://vishots.com/005-visv-labview-class-factory-pattern/

  • To more specific class: Cant find strict numeric, only numeric

    Im trying to read a control property by reference from some controls that are in a cluster.
    I want to cast the property's reference to a more specific class: strict numeric, but I can only find 'Numeric' which leaves me with variant data.
    Any help?
    Solved!
    Go to Solution.

    Hello,
    I think you can't (not fully sure though). What you can do is get the "Representation" property, that tells you if it's I32 or DBL or else (as an enum) and with this information you can get the value from the variant.
    See :
    Hope this helps
    EDIT :
    Oh... I see now that there IS a way, thanks for that pincpanther :-o
    When my feet touch the ground each morning the devil thinks "bloody hell... He's up again!"

  • To more specific class - cursor reference - error 1057

    I must be missing something very stupid here. Why is this cast not working? Thanks!

    There are other questions to be answered:
    1. Does the cursor exist on the graph?
    2. What other errors are you getting earlier in the process?
    3. Have you tried probing the cursor reference before you did the cast to a generic type?
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • How to capture the DB Errors to display more specific error on the screen

    HI,
    How to capture the DB Errors to display more specific error on the screen?
    Can any one suggest on this please.
    Thanks

    hi,
    in your db package or procedure write this in ur exception handler
    as
    excpetion when others
    FND_MSG_PUB.ADD_EXEC_MSG (pkg_name, proc_name,
    substr(sqlerrm, 1, 240))
    now in your java code you can catch and throw this excpetion by using
    OAExceptionHelper.checkErrors (Tx, messageCount, returnStatus, messageData);

  • I am having difficulties loading pages. For example: I am on the powerschool web site looking at my child's grades. I want to get into a specific class and the page either takes many minutes to load or I get the error message that the page can't load. He

    Can't get into specific class grades. It's not just here though; many pages load and load and load taking an extremely long time only to get an error message.
    == URL of affected sites ==
    http://ps.hibbing.k12.mn.us/public/home.html

    Hello, could this be it?
    Java for OS X 2012-006: How to re-enable the Apple-provided Java SE 6 applet plug-in and Web Start functionality
    http://support.apple.com/kb/HT5559

  • Why is the static method in the superclass more specific?

    Why is the static method in the superclass more specific than the static method in the subclass? After all, int is a subtype of long, but Base is not a subtype of Sub.
    class Base {
        static void m(int i){ System.out.println("Base"); }
    class Sub extends Base {
        static void m(long l){ System.out.println("Sub"); }
    class Test {
        public static void main(String[] args) {
            int i = 10;
            Sub sub = new Sub();
            sub.m(i);
    }The first example compiles without error.
    Output: Base
    class Base {
        void m(int i){ System.out.println("Base"); }
    class Sub extends Base {
        void m(long l){ System.out.println("Sub"); }
    class Test {
        public static void main(String[] args) {
            int i = 10;
            Sub sub = new Sub();
            sub.m(i);
    }In the second example, both instance methods are applicable and accessible (JLS 15.12.2.1), but neither is more specific (JLS 12.2.2), so we get a compiler error as expected.
    : reference to m is ambiguous,
    both method m(int) in Base and method m(long) in Sub match
    sub.m(i);
    ^
    1 error
    Why don�t we get a compiler error for the static methods?

    Thank you for your ideas.
    ====
    OUNOS:
    I don't get Sylvia's response. This is about static methods, what are instances are needed for??Yes, the question is about static methods. I included the example with non-static methods for a comparison. According to JLS 15.12.2, both examples should cause a compiler error.
    And why you create a Sub object to call the method, and dont just call "Sub.m(..)"Yes, it would make more sense to call Sub.m(i). Let�s change it. Now, I ask the same question. Why is there no compiler error?
    ====
    DANPERKINS:
    The error in your logic stems from calling static methods on instances, as ounos pointed out. Solution: don't. You won't see any more ambiguities.A static member of a class may also be accessed via a reference to an object of that class. It is not an error. (The value of the reference can even be null.)
    Originally I was looking only at the case with non-static methods. Therefore, I used sub.m(i). Once I understood that case, I added the static modifiers. When posting my question, I wish I had also changed sub.m to Sub.m. Either way, according to JLS 15.12.2, a compiler error should occur due to ambiguous method invocation.
    ====
    SILVIAE:
    The question was not about finding an alternative approach that doesn't throw up an ambiguity. The question related to why, in the particular situations described, the ambiguity arises in only one of them.
    Yes.
    Proposing an alternative approach doesn't address the question.
    Yes.
    ====
    If anyone is really interested, here is some background to the question. Some people studying for a Sun Java certificate were investigating some subtleties of method invocations:
    http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=24&t=019182
    I remember seeing the non-static case discussed in this forum once before in a more practical context. jschell probably knows the link.

  • How to modify a specific class in jar file ?

    I've downloaded a jar file for applet, the jar file works fine... but when I extract a specific class file from the jar file and just recompie it from my IDE (Eclipse) without even making any change and then compress again jar class files including the new modified class file instead of the old one (without any modifications to other classes)... then I get
    (NoSuchMethodError ) exception whenever methods of other classes are invoked from within the modified class !!
    ...The manifist file of the jar file reads the following line
    Created-By: 1.4.0_01 (Sun Microsystems Inc.)
    I thought it means that jar class files were built using JDK 1.4.0_01 ...I used JDK 1.5.0_01 in my IDE...
    I thought JRE incompatiblity was the reason of the problem so I downloaded JRE 1.4.0_01 and used it to build this class file... but i got the same exception..
    so what is the main reason of the problem ? ...should I make changes to IDX files accompanying applet jar files ??
    If no, then how can I overcome this problem and be able to change and rebuild a specific class from this jar file ?
    (I cannot rebuild all classes in jar because there are errors I cannot resolve !!)

    Could you please clarify: do you want to run your project or a project from an independent jar?
    In the first case just select Run Project from the project context menu or select a class with main method and click Run File in the class context menu.
    Regarding the second case:
    - I don't think there is such a feature in the IDE (running third party jars is not an IDE function). Could you explain why you need this?

  • Import and recognize class error

    The following is a simple welcome.jsp file that I am trying to run on a local J2EE sever. As you can see it tries to import classes one being the FaqCategories.class which is located in the folder Ch03 of the WEB-INF directory. When I call the page up on the browser It gives me that it does not recognize the FaqCategories faqs = new FaqCategories; class error. I am wondering why(Is the import statement wrong? Did I put the class in the wrong directory? Etc... I followed everything the book told me to a que and I still received an error.
    <&@ page errorPage="/WEB-INF/errorPage.jsp"
             import="java.util.Iterator,Ch03.FaqCategories" %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
      <head>
         <title>Java FAQ Welcome Page</title>
       </head>
       <body>
         <h1>Java FAQ Welcome Page</h1>
         Welcome to the Java FAQ
      <%! FaqCategories faqs = new FaqCategories(); %>
      Click a link below for answers to the given topic.
      <%
        Iterator categories = faqs.getAllCategories();
        while(categories.hasNext()) {
           String category = (String) categories.next();
       %>
          <p><a href="<%= replaceUnderscore(category) %>.jsp"><%= category
       %></a></p>
       <%
        %>
       <%@ include file="/WEB-INF/footer.jspf" %>
          </body>
         </html>
          <%!
           public String replaceUnderscore(String s) {
             return s.replace(' ','_');
           %>

    Originally posted by: nadeem.aboobaker.bea.com
    "Walter Harley" <[email protected]> wrote in message
    news:f2jet7$na1$[email protected]..
    > "Nadeem Aboobaker" <[email protected]> wrote in message
    > news:f2j2au$fi6$[email protected]..
    >> Hello all,
    >>
    >> I am having issues creating a plugin as a JAR file, where the plugin
    >> contains a nested JAR file.
    >
    >
    > Hey, Nadeem.
    >
    > Yes, there are a lot of problems with trying to use nested jars in (and
    > out of) Eclipse. You can look at
    > https://bugs.eclipse.org/bugs/show_bug.cgi?id=145001 as a sort of
    > "umbrella" bug report that mentions some of the issues and refers to other
    > bugs. There is more than one limitation at work, so describing the issues
    > succinctly is difficult. As you noticed in the posting from a year ago,
    > the only way to make it work really smoothly is to get rid of the nested
    > jars by expanding them (and even then, there are issues with nested .class
    > files!).
    >
    > If it is at all possible to convert the nested .jar into a separate
    > plug-in (by adding an OSGi-compliant MANIFEST.MF) and make your primary
    > plug-in depend on it, instead of trying to nest the jar within your
    > primary plug-in, that will be your best and most "Eclipse-friendly"
    > answer.
    >
    > Feel free to contact me offline or here on the newsgroup if needed.
    >
    > -walter
    Walter, thanks for the reply. Converting the nested .jar into a sepearate
    plug-in isn't possible for my case. I checked out the Bug report, and also
    the referenced bugs and Wiki page, it was interesting to read all the
    issues. :) In any case, I know that deploying the plugin as a directory
    instead of a jar works, so I will just go with that approach.
    - Nadeem

  • Missing Class error from handler class - urgent question!

    Hi,
    I am getting an "Missing Class" error when running a web service. The web service was generated from a Java class via the "create J2EE web service" option.
    The web service has a JAX-RPC handler class added, which belongs to the same package as a logging class. The logging class is used to write to a file for debug purposes. A "missing class" error is being generated whenever I attempt to invoke the web service (via the enterprise manager test util), the error refers to the logging class which is used by the main handler class. The JAX-RPC handler works fine by itself, the error is only seen when I attempt to use the logging class.
    I have re-built, re-deployed from scratch again, but still get the same error! Am I missing something simple here?
    thanks for any advice

    Hello,
    I have posted something similar, but I am not sure how to get over this issue. I am not sure if this is a code issue, I have scanned both EJB 2.0 and 2.1 specifications, but nothing caught my eye.
    Here is the error I am getting starting this in JDeveloper 1013 :
    Apr 11, 2006 12:17:49 AM com.evermind.server.Application setConfig
    WARNING: Application: current-workspace-app is in failed state as initialization failedjava.lang.InstantiationException: Error initializing ejb-modules: [current-workspace-app:CNSI-JDev-7_Exp-7_0:DbUtilWrapper] - Unable to load ejb-class com.my.common.database.ejb.DbUtilWrapperBean, see section 23.2 of the EJB 2.1 specificationjava.lang.ExceptionInInitializerError: java.lang.NullPointerException
    Here is the ejb-jar.xml :
    <session>
    <description>Session Bean ( Stateless )</description>
    <display-name>DbUtilWrapper</display-name>
    <ejb-name>DbUtilWrapper</ejb-name>
    <home>com.my.common.database.ejb.DbUtilWrapperHome</home>
    <remote>com.my.common.database.ejb.DbUtilWrapper</remote>
    <local-home>com.my.common.database.ejb.DbUtilWrapperLocalHome</local-home>
    <local>com.my.common.database.ejb.DbUtilWrapperLocal</local>
    <ejb-class>com.my.common.database.ejb.DbUtilWrapperBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    I am not sure if this should be in the assembly-descriptor, in ejb-jar.xml or orion-ejb-jar.xml :
    <method-permission>
    <unchecked/>
    <method>
    <ejb-name>DBUtilWrapper</ejb-name>
    <method-name>*</method-name>
    </method>
    </method-permission>
    Any ideas ?
    Thanks

  • Re: More specific to two questions

     

    Hi everybody,
    I have been watching this debate with interest. I encountered similar
    situation and realised that even after calling the method
    ReleaseDistReference on DistObjectMgr, the object is live ( Probably
    some time before garbage collection kicks in) and can be binded using
    ObjectLocationManager.BindObject() method. This caused some problems to
    us. This object is not invalidated for further use. Can somebody from
    Forte answer this ?
    Pradnesh Dange
    Indus Consultancy Services
    140, E.Ridgewood Ave.
    Paramus, NJ 07652
    Ph: 201-261-3100 (x-234)
    Fax: 201-261-1399
    From: Shi-Long Yin[SMTP:[email protected]]
    Reply To: Shi-Long Yin
    Sent: Tuesday, December 22, 1998 12:19 PM
    To: Boris Berezetsky; 'Forte Users Mailing list'
    Subject: Re: More specific to two questions
    Hi, Boris
    Your helps are really appreciated!
    I've already read this part and other relevant materials of Forte
    document.
    So far, what I understand is if an object is anchored, the garbage
    collector
    will be not automatically applied to it. You must explicitly add it
    to the
    list of the garbage collection.
    Also, many thanks to all who have helped me in this topic.
    Merry Christmas!
    Shi-Long
    Boris Berezetsky wrote:
    Hi, Shi-Long
    I'm not sure if this has been mentioned already, but just in case...
    Take a look at ReleaseDistReference method of DistObjectMgr class.
    The following is an excert from Forte Help on the topic:
    "This method is needed because the distributed object manager keepsa
    list of all anchored objects that have been handed out asdistributed
    references, or are anchored objects that are being used asdistributed
    references in other partitions. Invoking the ReleaseDistReferencemethod
    lets the distributed object manager remove the object from itsinternal
    list, which can then allow memory management to occur on theobject."
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive
    <URL:http://pinehurst.sageit.com/listarchive/>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

  • Question about typecast to more generic Class

    I have controls refnum and pages refnum and I want to know which way is better:  
    1) let LabVIEW doing the job
    or 2) use "typecast to more generic Class". 
    In both case the VI works properly. 
    Thanks
    Jean-Marc
    Jean-Marc
    LV2009 and LV2013
    Free PDF Report with iTextSharp
    Solved!
    Go to Solution.
    Attachments:
    Test LV86.zip ‏153 KB

    Thanks for your reply Ben.
    I need the controls refnum in the visible part of the pane (for the translation english to french and french to english ).
    Jean-Marc
    Jean-Marc
    LV2009 and LV2013
    Free PDF Report with iTextSharp
    Attachments:
    Translation LV86.zip ‏235 KB

  • Cannot lauch project, class error messages

    The project was originally configured in LookoutDirect, then converted to Lookout 6.2.
    One one computer I have a seperate Runtime and Development packages.  This computer has been working satisfactoraly for two months.
    Insatlled second runtime software on computer two, but cannot launch project because of class errors.
    Can I copy the entire National Instrument folder from one computer to the other to correct this.
    thanks
    John Peterson
    Solved!
    Go to Solution.

    Problem solved
    Believe drivers are DSComm4.cbx and Meter4.cbx, but don't bother moving them.  Tried every conceivable location.
    You must INSTALL the driver on both computers.Driver from Automation Direct (PC-DL-PLUS LOOKOUT DIRECT PLUS DRIVER OBJECT SFTWRE)
    From the responses I think their is more than one with the problem.
    Also make sure the tages are not pointing to the computer name.  Tag path should start with "..\" or "..\..\" (test on yours) to work on both computers.  Computer name appears depending on how you drill down to the PLC address.  This doesn't stop the project, just gets rid of the red X's on the second computer. 
    Thanks for your responses
    John Peterson 

Maybe you are looking for

  • How can i tranfer contacts from my nokia to my iphone?

    How do i transfer contacts from my nokia E72 to my iphone4?

  • Why can't I drag things to the timeline?

    I decided to upgrade to Adobe Premiere Pro CS3 last night after long debate and not wanting to spend the money. Everything is going pretty well now after transferring my project created using Adobe Premiere Elements 3.0 into the new program. But now

  • Password Protect a Publisher Document

    Hi, Please can anyone let me know whether it is possible to password protect a Publisher 2007 document. Many Thanks.

  • Table statistics delete

    Hi Is there any command to delete gathered statistics of a table suppose : I have gather table statistics as under exec dbms_stats.gather_table_stats('TEST1','EMP'); now I want to delete the statistics from the above table EMP Regards Jewel

  • GT70 won't turn on anymore

    After suddenly turning itself off last night while running a benchmark, my notebook won't turn on amymore. At the time it was running on mains power without battery in. Ive tried disconnecting everything and then  running on battery and was unsuccess