05-04-2020 09:45 AM
LabVIEW (2019 was used here) displays a dubious behaviour when you change a text control to "Update value while typing"; If the control display mode was Hex - LabVIEW allows itself to silently add a change of the display mode to "Normal". 😲
Others here have commented on the lack of support for "Update value while typing" when in hex display mode (which understandably poses a bit of a challenge, but could have been implemented by updating on mid-stages as well), but this automatic silent side-effect is a bit nasty as it is very easily overlooked. It would be safer to either disable the Update value while typing option while in Hex Display - or show a dialog asking for which supported display mode to change to due to the inability to support the given combination.
05-04-2020 09:58 AM - edited 05-04-2020 09:59 AM
Did you have the display mode visible on your control? Of course, this doesn't solve the issue, it only gives you a better chance of noticing it.
If you didn't, maybe it's a good time to remind everyone that if you are displaying something in a non-default mode - e.g., hex mode for strings, or even hex mode for numerics - always show the display mode (or radix, if numeric) to make it clear what it is displaying.
05-04-2020 10:09 AM
In this case the control would always be in hex display and the context in which it was used would make that clear to the user, so there was no need nor desire to display style selector...(Unless it could also then be disabled (there's an idea...🙄). I rarely use the in-built selector when I need one though, it is too small to be noticed and intuitive to use for the end users which are not familiar with LabVIEW).
05-04-2020 10:15 AM
Precisely what steps are you doing that allows the control to change the display mode? Is it some special key combination?
05-04-2020 10:26 AM - edited 05-04-2020 10:26 AM
Just put a string control on the front panel, set its display mode to hex display, then right click on it and select "Update value while typing". Now check the display mode; it has changed to Normal.
Verified in LabVIEW 2019 and 2015.
05-04-2020 10:51 AM
I've been trying to come up with a good reason why that should be a desired behavior, but I can't think of anything.
05-04-2020 10:53 AM
Oh, once you put it in "update value while typing" mode, can you change the display mode back to hex? Just curious. If not, then maybe there was some reason why it reverts to normal display.
05-04-2020 10:55 AM
@billko wrote:
Oh, once you put it in "update value while typing" mode, can you change the display mode back to hex? Just curious. If not, then maybe there was some reason why it reverts to normal display.
Sorry, that was a question not worth asking. It took me ten seconds to figure it out on my own. "Yes, you can."
05-04-2020 11:24 AM - edited 05-04-2020 11:25 AM
Yes you can, but then you also lose the Update value while typing settings (because hex display does not support it)...
(The reason why hex display does not support it is probably because while editing the hex value you might want to change two characters before you are "finished" and want the value to update, not just one. Instead of not supporting it at all though, they could have chosen to update on every change, even the half-edited hex value.. Or only when the last of the two in a hex pair changed. We as developers would then have the option to handle that in our receiving data. Instead we are left with only one update when the user exits the control.. Making interactive updates during the edit impossible in hex display mode) 😕
05-04-2020 11:26 AM
@Mads wrote:
Just put a string control on the front panel, set its display mode to hex display, then right click on it and select "Update value while typing". Now check the display mode; it has changed to Normal.
Verified in LabVIEW 2019 and 2015.
Gotcha. I see what you mean now. At first I thought you were saying that while typing, it was reverting display modes. It is the changing of the setting to update while typing that reverts it to normal.
To go further with Bill's question, if it is normal display with Update while Typing checked, then you change it to hex display, the Update while Typing becomes unchecked.
Now I didn't try this with code to see if it is an error on the display of the check mark, or if it truly reverted to NOT Update while Typing. But I think this might be intended behavior. With Hex display, when you enter one hex character, you really haven't entered a full byte yet. You need to enter both characters in order for the string to be able to "update". So perhaps NI has disabled update while typing for hex display strings. But if so, I think it would have been better to make the Update While Typing option greyed and disabled on the shortcut menu and thus unselectable rather than silently reverting to Normal display.