07-22-2010 02:04 AM
Hi all,
I am working on a large program of legacy. It has a large cluster of strict type control reference. You know, it can be used to pass controls on main vi front panel to subvis. The problem is the "type conflict" error occurs when I connect certain control to the subvi using the type. So I hope I can know what the control pointed by the reference looks like. The ideal way is I can get an instance of control from the "control reference". Is it doable?
Thanks in advance.
07-22-2010 03:18 AM
hi steady,
ofcourse when you are using strict control reference,defintely you will get the instance of the control and you will have access to all the properties.But if you use a normal control reference(not a strict reference) ,you will need to use "to more specific class vi" to act upon the instance of the control.As you said, you can almost guess the control from the appearance of the strict control reference.
Thanks and regards,
srikrishnaNF
07-24-2010 10:25 PM
srikrishnaNF,
Thanks for your reply. Maybe you didn't understand what exactly I want. It may be not sensible but i just want to have a try. What I want is to "generate" an instance from a "strict control reference".... It is sort of to generate an "Instance" from a "Class". The reason why I need it is that, i have 2 control references of very close definition, but i want to know what the differences are.
Regards,
Steady
07-25-2010 10:13 PM
Hi Steady,
To create a control is very like to create an "Instance" from a "Class", but the "Class" is a control definition from .ctl file, not a reference. A reference is some what like a pointer, so it is not likely that you could create an "Instance" from the knowledge of a pointer. Would just opening two .ctl files and comparing them a way to your need?
Xiaojian Wang
07-26-2010 07:37 AM
@steady wrote:
srikrishnaNF,
Thanks for your reply. Maybe you didn't understand what exactly I want. It may be not sensible but i just want to have a try. What I want is to "generate" an instance from a "strict control reference".... It is sort of to generate an "Instance" from a "Class". The reason why I need it is that, i have 2 control references of very close definition, but i want to know what the differences are.
Regards,
Steady
If you switch to the wiring tool, turn on the help window and float the wiring tool over the wire of the type def, the help window will show you the data of the type def.
This Nugget was written to help with control refs. I t may be interesting reading. Don't worry about the end section. It is an adventure in exploring the question of how to use control refs without knowing their definitions.
Ben