02-16-2011 05:16 PM
I've encountered a new one in LV2009 (not SP1).
I have a numeric control.
I enter numeric data and press Enter. My event handler is not invoked.
I enter numeric data and click elsewhere with the mouse. My event handler is invoked.
I enter numeric data and press Tab. My event handler is invoked.
Why does LV hate on the Enter key as a data entry delimiter in this case? Have you guys seen this one in your past with 2009?
02-17-2011 01:21 AM
Two guesses:
If these aren't the case, I would suggest you upload an example VI and after that replace the control with a new control, which presumably will not do this.
05-13-2011 02:51 PM
I have a VI with the same problem. It falls into your diagnosis of reason number 1. However, I see no reason why this should be the case. So what if that new control has focus, I still want the update to occur BEFORE the button press of that control is triggered. Why should this supercede it?
I have attached example code. It consists of pop-up function to collect information, and a wraper program to run (this is a simplified case of what I am using in my main code.)
You enter your name, and click OK, things work fine.
You enter your name, and press <Enter>, the 'OK button value change' event fires before the "tester name value change' event; both fire, just in the wrong order. You can test this by adding numbers in with your name, which the program will not allow. Hit cancel and it will inform you as such.
05-13-2011 03:03 PM - edited 05-13-2011 03:08 PM
05-13-2011 03:07 PM
Also be aware that the OK buttom from the system palette has the enter key assigned by default.
If you want that changed, please vote for my idea. Thanks! 😄
05-13-2011 03:11 PM
I misspoke: The 'Enter' key is assigned as the OK button's toggle shortcut key. If I set the 'Enter' key as the OK button's focus shortcut it actually fixes the problem. Of course, this is not the workaround I am looking for. I want my function to behave like every other text input program: when the user is done inputing the necessary data, the user can just press 'Enter' once in order to continue to save time (and still have data entry error checking occuring properly).
05-13-2011 03:12 PM - edited 05-13-2011 03:20 PM
why is there no option to delete a post??
05-13-2011 03:15 PM
Another word of advice:
You are annoying a lof of people by attaching a VI set to "Run when opened", so please don't. Thanks!
05-13-2011 03:18 PM - edited 05-13-2011 03:24 PM
@altenbach wrote:
Another word of advice:
You are annoying a lof of people by attaching a VI set to "Run when opened", so please don't. Thanks!
That's necessary in order to have the function work as a pop-up. That's why I included the wrapper program to run it.
@altenbach wrote:
Also be aware that the OK buttom from the system palette has the enter key assigned by default.
If you want that changed, please vote for my idea. Thanks! 😄
Unfortunately, I want the OK button to be assigned to the enter key. It's just that LabVIEW decided to trigger my events in the incorrect order when I do this
05-13-2011 03:19 PM
@altenbach wrote:
- Right-click the string control and select "limit to single line".
- Remove the key navigation assignment from the OK button. (right-click...advanced...key navigation...)
And thanks for the heads up on the "limit to single line". I just noticed I declined to check that after I had posted the example.