Jump to content

Idea: Allow Bundle By Name to require all elements.


Recommended Posts

I just posted this on the LV wish list. Since one doesn't ever get feedback from that (except maybe seeing your idea in a far-future version of LabVIEW), I wanted to get some reaction (support) here.

QUOTE

I usually use Bundle By Name rather than the plain Bundle for clusters, and certainly for all typedef clusters. The only time not to use it is when you need to do a multi-key sort, since that works really well, and the cluster data structure is just temporary. 99% of the time my clusters are typedefs, and using Bundle By Name always makes the code clearer and easier to debug by inspection.

However there is a disadvantage in that if I add something to my cluster, then existing bundle by name nodes will just use the default value for the new item, and it's not always easy to find all the associated bundling nodes. This often leads to bugs.

In contrast, I use enums a fair amount, and I disable the use of "Default" in the case structures, so when I add an item, my application breaks in a bunch of places, and so I am forced to go fix them all and in the process most of the potential bugs are eliminated right away.

My suggestion is to add a right-click checkable property to the bundle by name node, requiring it to have all elements explicitly wired in. Then if I turned this on for a given node, the VI would break whenever I add an element (just like it does when I remove an element).

It would also be helpful to have this on the unbundle by name node though I realize it's not very labview-like to be forced to wire a nodes outputs.

Link to comment

I agree that this would be helpful, although I'm not sure of a sane way to implement required inputs for clusters inside clusters.

Basically, I would want to be able to either wire each control inside a subcluster up one by one, or be able to wire the "All Elements" in one shot. I suppose it's possible to enforce that all elements are wired. Just not as easy to implement as it first sounds.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.