06-26-2007 04:59 PM
06-26-2007 05:23 PM
06-26-2007 06:21 PM
06-27-2007 04:50 AM
06-27-2007 08:16 AM
The "To more specific" function will allow you to take a generic reference and type it as any type you desire. If you cast the ref as the proper type, you should get access to the history property.
Alternatively, the invoke node Re-initilize to default should be available for generics (I beieve).
Ben
06-27-2007 11:01 AM
06-27-2007 11:39 AM - edited 06-27-2007 11:39 AM
Message Edited by Ben on 06-27-2007 11:40 AM
03-10-2011 05:04 PM
Sorry to hijack this thread but I have similar problem...Ben, what do you mean by "Do the "to more..." conditionally." because I found that your code and jimmy1981 is similar but jimmy code thrown an error. Can you please show me how to do that?
Thanks.
03-10-2011 06:22 PM - edited 03-10-2011 06:26 PM
I was advising that the error could be avoided if the "To more specific" node was only invoked under the restriction that the refernce is of the proper class. If you attempt to cast a ref to a class that is inappropriate (i.e. LV can't figure how how to make a stirng look like graph) it will through an error... so only do the casting (using the "to more specific.." ) when it is legal.
I wrote my Nugget "Using Control References" to help people get an idea of what can be done with control refs. You may want to review that thread. (Don't worry about the extreme example I posted at the end. It was intended as an academic exercise to entertain the more advanced users.
Take care,
Ben
03-10-2011 11:11 PM - edited 03-10-2011 11:16 PM
@mrutm wrote:
because I found that your code and jimmy1981 is similar but jimmy code thrown an error.
If you look closely, you'll see there is a difference between Jimmy's code and Ben's in where the casting of the reference is occurring. Notice that Ben's casting occurs inside the case structure so that it only happens when the classID is correct. Jimmy's casting occurs on every control reference on the front panel, and most of them would be incorrect.