Mark Smith Posted April 12, 2009 Report Share Posted April 12, 2009 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 Quote Link to comment
Aristos Queue Posted April 13, 2009 Report Share Posted April 13, 2009 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. Quote Link to comment
Mark Smith Posted April 14, 2009 Author Report Share Posted April 14, 2009 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 Quote Link to comment
PJM_labview Posted April 14, 2009 Report Share Posted April 14, 2009 I strongly agree with AQ. Turn that flag on and this will save you a lot of future headache. This is one feature I really missed when I have to code back in older LV version. PJM 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.