From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Andi_S

merging string-constant with empty-string-constant (same for path)

Status: New

StringConstant1.png

As everybody knows there are two ways for generating an empty string constant in the block diagram: Using the "empty-string"-constant or creating a genereal string constant with no content.

 

Both ways have advantages and disadvantages:

- The "empty-string"-constant shows much better that the string is empty but it can't be used e.g. in arrays.

- The string-constant can always be used, it is easily generated by right-klick to a string terminal and selecting "create -> constant". Furthermore its value can be changed to somthing non-empty if required. Disadvantage: It's hard to see if the constant contains nothing or just a blank sign.

stringConstant2.png

 

My suggestion: LabVIEW shall show a string constant which contains an empty string always with the symbol that is currently used for the "empty string"-constant. This is also valid if the empty string is within an array or cluster. If this behaviour is not wanted in a particular case, there shall be the conext-menu-option "show symbol for empty string" which could be deactivated.

stringConstant3.png

 

For changing the value of such a new string constant, the symbol shall change to a classic string constant if the user moves the mouse (with selected text-editing-tool) over it.

Similar behaviour is also suggested for general-path- / empty-path-constants.

 

Remark: I'm working with LV2015SP1

15 Comments
Manzolli
Active Participant

How about:

 

empty string.png

The first one is empty, second has a space, third has two spaces. The bars width and colors can be different. This would be showed only when the string is empty or has exclusively spaces.

André Manzolli

Mechanical Engineer
Certified LabVIEW Developer - CLD
LabVIEW Champion
Curitiba - PR - Brazil
Andi_S
Member

I think bar-counting becomes uncomfortable if you have more than three bars.

But maybe the string length could be show as a part of the constants frame?

Mythilt
Member

I think that anything more than just an empty string indication is not really adding anything to the feature.  It goes from being 'Lets me see quickly if the string is empty' to 'Lets add to the complexity of the block diagram.'

Keep it Simple, Silly.  If the empty string constant isn't showing, and I see nothing, I know that I might want to examine closer cause there is something in the string.

Jon D
Certified LabVIEW Developer.
altenbach
Knight of NI

(Much more important is the opposite idea, because often there might be another line, for example. Just look at the vote count!).

 

Another possibility would be to merge it with this idea, where we can define our own default text if the string is empty. This seems much better! Does not need to be related to "key-focus" at all, just a defined string that shows greyed out if the element is empty. Now it can be fully customized and localized in any language we want. (Should I make a new idea for this?)

 

defauttext.png

 

(Somewhat related, I have absentmindedly tried to drop defined string constants (e.g. the empty string primitive) into containers (array, cluster) and it does not work. It would be nice if it would just turn into a plain string constant if I do that)

IngoG
Member

I like that idea with the Default Text within the properties much more than all other suggestions posted before.