alukindo Posted April 3, 2007 Report Share Posted April 3, 2007 Question: When you copy and paste a sub panel, or <CTL + Drag>, you do not get an associated node on the block diagram for the copied sub panel. Is this a bug .... or? At first I thought that this behavior precluded one from having more than one sub panel on a VI. However, if you create additional sub panels from the pallete utility you do get a node for each sub panel created in this way. ... any thoughts? A.L. Quote Link to comment
Jim Kring Posted April 3, 2007 Report Share Posted April 3, 2007 QUOTE(alukindo @ Apr 1 2007, 07:43 PM) Question:When you copy and paste a sub panel, or <CTL + Drag>, you do not get an associated node on the block diagram for the copied sub panel. Is this a bug .... or? At first I thought that this behavior precluded one from having more than one sub panel on a VI. However, if you create additional sub panels from the pallete utility you do get a node for each sub panel created in this way. ... any thoughts? A.L. This is not a bug, really. It has to do with the fact that a SubPanel is really a control with no value. In order to use it, you need to use it's methods. Since a SubPanel has no data (a null Variant, actually, if I recall), NI has hidden the block diagram terminal (does it even own a Terminal in the GObject model?). When you drop a SubPanel from the palette, I presume that NI executes a little snippet of code (defined in the palette's MNU file) that causes the invoke node to appear. There is no such provision for executing a snippet during copy+paste operations. I know that this is not a great reason that LabVIEW doesn't work the way that you'd expect, but that's how (I believe) everything works. Quote Link to comment
Aristos Queue Posted April 3, 2007 Report Share Posted April 3, 2007 QUOTE(Jim Kring @ Apr 1 2007, 10:18 PM) This is not a bug, really. It has to do with the fact that a SubPanel is really a control with no value. In order to use it, you need to use it's methods. Since a SubPanel has no data (a null Variant, actually, if I recall), NI has hidden the block diagram terminal (does it even own a Terminal in the GObject model?). When you drop a SubPanel from the palette, I presume that NI executes a little snippet of code (defined in the palette's MNU file) that causes the invoke node to appear. There is no such provision for executing a snippet during copy+paste operations. I know that this is not a great reason that LabVIEW doesn't work the way that you'd expect, but that's how (I believe) everything works. Jim is right to say it isn't a bug in the strictest sense -- in general, when we copy a control we don't copy all the property/invoke nodes for that control. But in the case of the SubPanel, you bring up a good point... since we don't have an FPTerminal, and sense the property node is how the Subpanel gets set, we should probably include code for creating the property node as part of pasting or otherwise duplicating the subpanel. I suggest you file it as a bug report to NI. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.