Jump to content

Required inputs for data access VI's?


Recommended Posts

Maybe this has been discussed elsewhere but I can't find it. When I use the right click menu to make a data member access VI for my LVOOP class, if it's a write VI, the connection for the data member is recommended but not required. Seems to me there's no other reason for a data access write VI except to update that class member so there's no reason to ever call this VI and leave the data input unwired (like I mistakenly did and then spent half an hour finding my mistake). Is this correct? Am I mssing a setting (I know about the ini file option to make all new inputs required, but that seems like the nuclear option) for VI creation in a class? And if not, then should this behavior be changed to make inputs on new data member access VIs required?

Mark

Link to comment

Join the beta program. Or wait for the next release... ;-)

QUOTE

(I know about the ini file option to make all new inputs required, but that seems like the nuclear option)
And yet, it is the option I and a whole lot of people use. C++ has burned too many of us too often with optional parameters, so I've always been reluctant to use optionals in LabVIEW (by which I include both Recommended and Optional since neither requires the terminal be wired). After a bad experience with someone changing the default value of an unrequired terminal a couple years ago, I decided I wanted this option. I polled a lot of other folks and found huge support for it. And when I needed a training feature for some new members of the R&D team, I used the opportunity. Note: it makes all new terminals required inputs except for the error code cluster.
Link to comment

Sounds like you're already on top of it! And I agree, maybe the ini setting is the right way to go since while it may be a PITA to change inputs that you might sometimes want to default, most of the time it's safer to just make them all required and then handle the exceptions to that rule.

Thanks,

Mark

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.