LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Regular Expressions Error -4702

Solved!
Go to solution

In the attached vi, I'm trying to accept only numbers and letters.  When I hit the Shift key, I get error -4702.  How can I correct this situation?

 

I haven't worked this in yet, but I would also like to accept the Enter key so that the vi will terminate either Enter or the OK button.

 

Also, in the Event structure, what's the difference between "Key Down" and "Key Down?" ?

 

Thanks in advance.

0 Kudos
Message 1 of 4
(3,243 Views)
Solution
Accepted by VI_Joe

@Vi Joe wrote:

I'm trying to accept only numbers and letters.


Why don't you use "lexical class"? Seems easier (accept for class 3-5).

 


VI Joe wrote:

I haven't worked this in yet, but I would also like to accept the Enter key so that the vi will terminate either Enter or the OK button.


Wire the "VKey" output to a case structure, right-click ...create case for every value. Pick the cases you want and add your code, make one case default, then right-click...delete empty cases.


@Vi Joe wrote:

Also, in the Event structure, what's the difference between "Key Down" and "Key Down?" ?


Events with a question mark are filtering events. They allow you to discard events. Check the help. Events without question mark are plain events and don't have the discard terminal on the right.

Message 2 of 4
(3,240 Views)

Try something like this....

 

(down-converted from LV2010 to 8, no guarantees...)

 

 

0 Kudos
Message 3 of 4
(3,236 Views)

Thanks so much for your eligant solution!

 

I don't get context help when I hold my cursor over the filter events, nor am I finding detailed info in the LabVIEW help on the particular filter events. Any suggestions?

 

Thanks again.

0 Kudos
Message 4 of 4
(3,223 Views)