03-12-2009 05:11 PM
I'm having a small problem using control refnums. I've not used them much so this could just be me doing something wrong!
I'm building an application with a GUI which will need updating with data from within various subVIs and a couple of parallel loops. So, what I wanted to do was "build" a strict typedef cluster of references to the front panel objects I want to update, then I can pass this cluster to any subvi or structure which may need to update a FP object. So far so good...
The problem:
On my main GUI I have a strict typedef'd tab control, which I want to be able to reference. When I build my cluster of refnum's I duly create one for this typedef'd tab control. The problem is, if I modify the tab control in anyway, the cluster of refnum's breaks.
Anyone tell me why this is happening?
I've attached an example VI I created which shows the problem. Basically, open the typedef to the tab control and change anything, you'll see the cluster of refnums break... you can see a video of it here: Video
Any thoughts would be gratefully appreciated!
Thanks
Paul
03-12-2009 10:49 PM
Hi Morris,
Ya i saw your vi's If u define the control as strict typr def then if u even resize also it should give broken arrow and again u need to buid the control reference cluster with the updated references. to avoid this define as type def instead of strict type def.
03-13-2009 04:43 AM
Hi Balaji,
thanks for the reply. Unfortunately, I get the same behaviour using standard type defs as I do with strict type defs... In addition, trying to drag the type def'd tab control into the control refnum caused labview to crash several times!
anyone else got any thoughts?
Thanks
Paul
03-13-2009 04:49 AM
03-13-2009 04:53 AM
03-13-2009 05:05 AM
Dear Balaji,
The same problem still exists. In the VIs you attach, if I load the main VI, then right click on the tab control to open the typedef and then modify the tab in any way (i.e. add a page, resize etc etc) and then click apply changes, when I return to the main VI, the tab control is ok, but the cluster of refnums is broken... watch the video in the link, you'll see exactly what I mean.
http://screencast.com/t/m7hzQWOZfSJ
thanks
Paul
03-13-2009 05:32 AM - edited 03-13-2009 05:35 AM
03-13-2009 05:45 AM
03-13-2009 05:49 AM
Yeah, looks like I'll just have to update my refnums typedef each time I change the tab control...
I'd still like to know if this is expected behaviour or not... I mean, it does kind of defeat one of the purposes of strict typedefs... I've used other "nested" strict typdef'd clusters before with no problem, its only with these refnums that I've seen this behaviour.
Anyone from NI around who can comment?
Cheers
Paul
03-13-2009 05:55 AM
Hai,
Just went through the post
The strict typd controls automatically gets updated when the parent control changes. But the refnums that are created out of the strictly typed controls needs manual updation coz there is no linkage between refnum that was created and the strict type control.
You just create a strict type refnum that carries the properties of a strict type control and in no way a linkage exists between these two. Hopefully if there is an option to link the refnum and control with "Update from typedef" will solve the problems