As per LabVIEW Help (pointed out by Jim_S - cheers) you cannot add an X-Control or X-Control Reference as a Class Data Member.
Well I found out (the hard way) that technically you can in dev time but at run time your build will be broken.
E.g. I would like the ability to add an X-Control Reference as a Data Member of a Class so that I can encapsulate display state changes whilst enjoying the benefits of Classes etc...
This has been CAR'd as #210033 as per this thread
Man, declining this option really breaks my balls. No way of having a workaround?
Okay Harlequinade. Please try to use appropriate language for a public forum.
If you read the previous messages, you'll know why it was declined. It's because it was determined to be a bug that had a Corrective Action Request assigned to it. That actually gives it a higher probability of being fixed then if it was just a new idea to be implemented on how to improve LabVIEW.
Just stumbled upon this one today! Broke my code in a massive way. (but yesterday it was working perfectly!).
Bug fix does not seem to have made it into 2011 SP1
Ruling out an XControl is intentional behavior, and not a CAR.
An XControl defines an appearance, not a data type. The data inside a private data control is never visible. It does not make any sense to put something appearance based into the class definition. They were deliberately ruled out.
Ruling out an XControl Reference is not intentional.
I just scanned the release notes for the recent versions and did not see this mentioned anywhere. Safe to say the XControl Reference bug has not been fixed yet?
Not only has it not been fixed, it has been flagged as "will not be fixed." Priority is just too low compared to all the other work to be done. Workaround listed: store a general Control refnum and use To More Specific to cast it to the specific type when you need to access specific properties. You can wrap that cast in a data accessor VI.
Got it. Thanks, AQ
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.