LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

using control refnums in srtict typedef cluster

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

0 Kudos
Message 1 of 23
(5,732 Views)

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.

Balaji PK (CLA)
Ever tried. Ever failed. No matter. Try again. Fail again. Fail better

Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.
0 Kudos
Message 2 of 23
(5,709 Views)

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 

0 Kudos
Message 3 of 23
(5,689 Views)
I changed both of your srict typ def to type def and I opened the tab contol(type def) and minimized the contol  after that i saved and came back to front pannel, its not showing any broken arrow to me.
Balaji PK (CLA)
Ever tried. Ever failed. No matter. Try again. Fail again. Fail better

Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.
0 Kudos
Message 4 of 23
(5,687 Views)
Please find the attachment.
Balaji PK (CLA)
Ever tried. Ever failed. No matter. Try again. Fail again. Fail better

Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.
Message 5 of 23
(5,685 Views)

 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 

0 Kudos
Message 6 of 23
(5,683 Views)
Ya you are right.
Message Edited by Baji on 03-13-2009 04:05 PM
Balaji PK (CLA)
Ever tried. Ever failed. No matter. Try again. Fail again. Fail better

Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.
0 Kudos
Message 7 of 23
(5,672 Views)
But in my attachchment if u resize the tab it doesnt show the broken arrow. If your data type changed or added pages in the tab etc.. then you must need to update the reference.
Balaji PK (CLA)
Ever tried. Ever failed. No matter. Try again. Fail again. Fail better

Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.
0 Kudos
Message 8 of 23
(5,665 Views)

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 

0 Kudos
Message 9 of 23
(5,662 Views)

Hai,

Just went through the post Smiley Happy

 

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 Smiley Very Happy

With regards,
JK
(Certified LabVIEW Developer)
Give Kudos for Good Answers, and Mark it a solution if your problem is solved.
Message 10 of 23
(5,660 Views)