06-10-2010 08:57 AM - edited 06-10-2010 09:02 AM
Well, looking into this suggestion, i have pondered about an argument for keeping that guide line.
Situation: If you connect a control to the connector pane, the in/output of this (sub)VI is labeled equally to the name of that element. So it makes perfect sense for the inputs (not really outputs, but from time to time even there) to have the default values available with a single sneak view in the context help. Take Open/Create/Replace File.vi for instance:
From a single view in this context help, i can tell what happens if i do not connect anything to the input "operation".
Please notice that if the Label and the Caption of a control does not match, the context help will display the Caption!
So i concur with the request that the LABEL of a control should not (necessarily) contain default values, but i think the CAPTION should....
just my 5 Cents,
Norbert
EDIT: This meets quite the same as tst already posted in regard to the tip strip, but it should also work for context help of course....
06-10-2010 09:06 AM
Kudos to you Norbert for trying to answer my challenge question.
I will now step back and listen to hear what others think.
Ben
06-10-2010 10:44 AM
Norbert B wrote:Well, looking into this suggestion, i have pondered about an argument for keeping that guide line.
Pease notice that if the Label and the Caption of a control does not match, the context help will display the Caption!
So i concur with the request that the LABEL of a control should not (necessarily) contain default values, but i think the CAPTION should....
just my 5 Cents,
Norbert
EDIT: This meets quite the same as tst already posted in regard to the tip strip, but it should also work for context help of course....
Message Edited by Norbert B on 06-10-2010 09:02 AM
Norbert-
That says a LOT! Hmmm. the style guide never mentions "CAPTIONS" and captions, unlike lables, can be changed programatically. (after a bit of playing-)
.
.
.
OH WOW! easily improved code documentation by changing to "Caption(Default)" instead of "Lable(Default)"
So- pigs are flying - cows are comming home -Cats are sleeping with dogs -the world burns and!---I think the community just got an upgrade! time for another %0.05 (or the local equivalent) from the next person.
06-10-2010 11:12 AM
Jeff,
it also goes some step further:
The LABEL is the name of the control/indicator which cannot be changed during runtime and is used to reference the control/indicator. It takes effect if working with VI Server "Set Control Value" (Ctrl.Val Set from class VI) as name of the control/indicator. The Label is the programmatic name of the element.The Label is displayed in the block diagram at the terminal of the control/indicator and that cannot be changed (no option to switch to caption). If the Label is an empty string, the element does not have a name. The Label is the default string to be displayed when a new element is created on the frontpanel.
The CAPTION is the "descriptive name" of the element. It is only available on the frontpanel. It can be changed during runtime and is therefore used if the UI should be localizable (Import/Export Strings). It also is used for the Context Help as name for the in- and outputs of the VI if available (non-empty). You can choose to display the caption on the frontpanel by selecting "Visible Items" in the context menu. If doing this the first time, you automatically deselect the display of the label. You can, nevertheless, choose to display both, label and caption. But if you do, both initially are overlaying each other. You can reposition one of them or both if you like. If the caption is an empty string, it is automatically deselected as display during edit time. If the VI is in runstate and you change the caption using VI Server to an empty string, it however does not disable the display of the caption (so if you change it back to a non-empty string later on, the new caption will display).
Another hint:
Using the "Print" tool for VI documentation, you can select to include the caption and/or label for controls in this docu:
Maybe this is information some are not alreade familiar with 😉
Norbert
06-10-2010 11:49 AM - edited 06-10-2010 11:55 AM
tbob wrote:Funny thing, I've been doing the same thing for years (deleting the no error in the label). I just haven't complained about it. I'm glad somebody spoke up.
Long labels just waste space on the block diagram. If you look at my past posted examples, you will see in almost every case that the error in label has been modified to get rid of that stupid no error part.
Ditto..
Plus I agree with Ben. Let's start a "no default" revolution!
Vive la revolution!!
As for showing default vaules that should be displayed for certain controls, yes. keep those.
06-11-2010 08:37 AM
<my2¢>
Just to add another dimension to this argument, I would like to point out that virtually all responders to this thread are highly experienced LabVIEW users. While very vocal (and we do appreciate it!), you are also a minority in the sum of all LabVIEW users. I like easily knowing what the default inputs on a VI I have never used before are, and I think many of our lesser experienced users would agree. I like Norbert's suggestion of putting them on the caption, since most National Instruments VIs are shipped localized and use the caption, anyway. I, too, dislike block diagram bloat. I don't like the idea of totally removing them, since I despise hidden "features." If it is not rock simple, a new user will not see it.
</my2¢>
06-11-2010 08:45 AM
I think Norbert has presented a good idea. Keep the label short and simple. Use the caption for the default values where appropriate.
The documentation (of the VI) should clearly indicate for those controls which have default values displayed that:
1. The default value shown in the caption only.
2. The caption is non-empty and need not be created before it can be modified programmatically.
3. If the user changes the default value, the caption does not change automatically to reflect that change.
Lynn
06-11-2010 08:47 AM
DFGray wrote:<my2¢>
Just to add another dimension to this argument, I would like to point out that virtually all responders to this thread are highly experienced LabVIEW users. While very vocal (and we do appreciate it!), you are also a minority in the sum of all LabVIEW users. I like easily knowing what the default inputs on a VI I have never used before are, and I think many of our lesser experienced users would agree. I like Norbert's suggestion of putting them on the caption, since most National Instruments VIs are shipped localized and use the caption, anyway. I, too, dislike block diagram bloat. I don't like the idea of totally removing them, since I despise hidden "features." If it is not rock simple, a new user will not see it.
</my2¢>
Yes this is classic conflicts.
I don't want to exclude the noobs but including a standard to accomodate noobs that complicates the standrad by which real apps are judged seems like a mistake.
I'd like LV to read the default value from the control itself and display that ALONG WITH the label.
That change in the display of the help screen would fix the problem with name and code changes that would come when changing a default, avoid the BD bloat and keep the noobs in the picture.
So I think we COULD move forward along two paralle paths.
1) We re-write the Style guide
2) NI change the Help screen to read the actual default (I have been bitten by assuming the default value in the label, yes even NI VIs [Old Config File Close "write to disk" did not mathc the help file], that did not match what the actual default was).
So together I think we are approaching 4 cents.
Ben
06-11-2010 09:30 AM
Ben wrote:
DFGray wrote: If it is not rock simple, a new user will not see it.</my2¢>
So I think we COULD move forward along two paralle paths.
1) We re-write the Style guide
2) NI change the Help screen to read the actual default (I have been bitten by assuming the default value in the label, yes even NI VIs [Old Config File Close "write to disk" did not mathc the help file], that did not match what the actual default was).
Rock simple- base caption (default) on the controls property>Default Val. Another good Idea Ben!
My enthusiasm for changing the current standard is exactly to avoid the mis-documentation of the controls such as "Old Config File Close.vi" and others to numerous to mention like hp3458 Display.vi> display string(Hmmm... Beer). having LabVIEW automatically create this link, controlled with a posible enviormental option "add default values in captions," would be a great place to start. Code reviews are simplified, and controlls a consistantly documented with good style and maintainability.
Looks ready for an exchange idea. I'll defer to Ben to post the idea.
06-11-2010 10:46 AM
Jeff Bohrer wrote:
Ben wrote:
DFGray wrote: If it is not rock simple, a new user will not see it.</my2¢>
So I think we COULD move forward along two paralle paths.
1) We re-write the Style guide
2) NI change the Help screen to read the actual default (I have been bitten by assuming the default value in the label, yes even NI VIs [Old Config File Close "write to disk" did not mathc the help file], that did not match what the actual default was).
Rock simple- base caption (default) on the controls property>Default Val. Another good Idea Ben!
My enthusiasm for changing the current standard is exactly to avoid the mis-documentation of the controls such as "Old Config File Close.vi" and others to numerous to mention like hp3458 Display.vi> display string(Hmmm... Beer). having LabVIEW automatically create this link, controlled with a posible enviormental option "add default values in captions," would be a great place to start. Code reviews are simplified, and controlls a consistantly documented with good style and maintainability.
Looks ready for an exchange idea. I'll defer to Ben to post the idea.
I am an Idea Exchange virgin*.
I'll Kudo it if you link the idea.
Ben
* Not allowed to post ideas as per mangement.