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
Intaris
Proven Zealot

Kudos for the idea, but maybe a bit less for the visuals provided.... Smiley Tongue

AristosQueue (NI)
NI Employee (retired)

Personal opinion:

That's a really good idea. Kind of amazing no one has ever suggested it before to the best of my knowledge.

Kudos.

 

R&D opinion:

I'll pass it along to the team and see if anyone else is as enthused as I am.

crossrulz
Knight of NI

I will give kudos to the idea of some indication that the string is empty.  I am not liking the "Empty String Constant" in the array.  Should be something a little less obnoxious.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
X.
Trusted Enthusiast
Trusted Enthusiast

I don't see the point. If you are really afraid to insert a space instead of an empty string, just show the Display Style and choose '\' Code Display:

Screen Shot 2016-12-07 at 18.12.06.png

 

There is zero ambiguity as to what you are passing. We are talking about CONSTANTS right? How many empty string constant do you use in your diagrams, really?

IngoG
Member

Kudos for the idea, but I go with crossrulez: No "empty string constant" in the array.

Andi_S
Member

hey - I just moved some pixels on my screen-shot tool. Beautifying should be done by the designers from NI 😉

 

Is this better?:

stringConstant4.png

GerdW
Knight of NI

Hi Andi,

 

I'm with X: show the display style of the string constant and you are sure what's inside the string constant! I would even make the display mode indication visible by default

 

With your last image: you still don't know how many spaces/tabs/other non-printable chars are in your string constant! All you know is: it contains "something"…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Andi_S
Member

You're right - but to see if a string is empty or not is much more than what you know currently can see (without changing the display style).

One more remark: I don't want to see the discussion too much in direction array or display style. The main intension for this idea was to remove this special "empty string constant" by transferring its good empty-string-visibilty to the standard string constant (in it's default view setting).

 

Andi_S
Member

I'd like to extend my idea a little bit. If size to text is disabled it's not possible to see if a constant contains an empty string or a short string or a string which fills the visible field completely.  Why don't visualize the end of the string?

stringConstant5.png

Mythilt
Member

I have to say I like the basic idea.  Using the '\' mode can make the string hard to scan visually since it removes the natual breaks in the string, so you would catch that the one string is empty, but would be more likely to miss that another string has a mispelled word.  (The brain finds it easier to see the misspelling in 'It's thiers Susan.' than it does in 'It's\sthiers\sSusan.\n\r' its just how we are wired)  And I know that you can toggle '\' mode, but that adds multiple steps.

Jon D
Certified LabVIEW Developer.