LabVIEW Idea Exchange

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

Indicate the display format of Strings

Status: Completed
Available in NI LabVIEW 2010

We always get endless confusion in the forums when looking a code images, because we never know if a string diagram constant in a diagram image is in normal, \-codes, hex, or password display.

 

I think we could avoid confusion and really enhance code readability if string constants (and possibly string controls and indicators) would indicat their format.

 

I would suggest something similar to the radix display of numerics.

 

Here's an example how the same string diagram constant could look like, depending on the selected dispaly format.

 

 

 

 

17 Comments
altenbach
Knight of NI

Forgive the typos, it seems we cannot edit post here! (why???)

 

I take the opportunity to include the image here.

InternationAL
Member
I had this problem looking at a code screenshot just a few weeks ago.  This could be very useful.
altenbach
Knight of NI
Expanding on this idea, how about triggering a context menu when we click on the narrow strip on the left, allowing us to directly pick among the four formats?
Intaris
Proven Zealot
Context menu? Absolutely!
crossrulz
Knight of NI
Just like the radix for digital controls/indicators/constants, only for strings

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
Darren
Proven Zealot
I would suggest that we don't include any glyph for the "Normal" display.  Still make the region clickable to change to \, *, or x, but don't show an "n" for Normal.  Would be an issue for localization, and I don't think we need to show anything to indicate we're in "Normal" display.
altenbach
Knight of NI
Of course the context menu availability will need to be configurable. It could be useful to have it available at runtime, e.g. if we need to enter an unprintable character. OTOH, we should not be allowed to change a password entry box to normal display unless the programmer really allows it.
AristosQueue (NI)
NI Employee (retired)
Having a password display constant is kind of silly... you just put a probe on the wire coming out of the constant and, tada, there's the password.
Intaris
Proven Zealot
Password constant at least lets you make a picture of the BD to help document the code without revealing what the password is.....  Note that I say "picture" and not "snippet"
altenbach
Knight of NI

Silly or not, LabVIEW supports password display for diagram constants, so it should be supported for completeness. Of course the suggestion is most useful for hex and \codes.

 

For string control and indicators, we should be able show show/hide the format marker for cosmetic reasons.

 

For diagram constants, the format marker should probably always be visible.

 

Also note that the marker is intentionally in the upper left corner so it stays there, even for multiline strings.

 

Message Edited by altenbach on 09-04-2009 07:48 AM