LabVIEW Idea Exchange

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

String Constant becomes Empty String Constant when empty

Status: New
26 Comments
altenbach
Knight of NI

One things that needs to be addresses is the fact that currently any of these "constants" are not allowed in cluster diagram constants. For the switching to work, they all need to be allowed.

 

 

wiebe@CARYA
Knight of NI

Same for array elements...

iannicholson
Member

@altenbach, I think the overall solution is simple. Change the rendering of the string constant such that if it is empty, it appears to be the Empty String constant more-or-less (but underneath it still works the same way as any string constant). NI could eventually remove the Empty String constant altogether (running one of their on-load translations they seem to use a lot).

Darren
Proven Zealot

It seems like this idea is most useful for empty string constants. We use those because we want the code to be readable and for it to be obvious that the string constant doesn't contain anything.

 

What if we drew a regular string constant in a slightly different way when it is empty? It should still look like a string constant, to make it obvious the programmer can type in it. This would obviate the need for us to ever use the Empty String Constant node at all. What do y'all think? And do y'all have any ideas on a subtle way to indicate that a string constant is empty? I'm a terrible artist, but here are a couple of ideas I had off the top of my head:
1.png

TomOrr0W
Member

@Darren: I like that idea.  None of the mockups seem quite right, but, if I had to choose, I would prefer the middle one.

Also, I like that someone turned on kudos for idea comments.  It allows us to express support for idea variations in comments without posting a non-useful reply.

iannicholson
Member

Darren's idea makes sense I suppose. I guess I just don't see why the current |" "| empty string constant appearance wouldn't apply to that idea as well? I think I've even tried to click on an empty string constant to type in it and went "doh, I have to replace it with a string constant" before.