06-20-2022 01:53 AM - edited 06-20-2022 02:03 AM
First of all, we have "lexical class" to determine the type of character. no need for convoluted range testing.
If something does not work with arrays, maybe attach your code containing arrays so we can play without guessing what you are actually doing.
You don't really need to use filtering events, but if you do, you also need to allow editing keys. You could also use regular (not filtering events) and sanitize the input a nanosecond later if needed.
06-20-2022 02:16 AM
Thanks for quick answer.
Unfortunately not allowed to share code. Because this is actor it takes to long to create functional copy.
But i will try to explain what i am trying to do more deeply.
Basically, in array of string should be allowed to enter just some characters. Pincpanter showed me how this could work, and VI is in attachment.
Further i need to implement this in actor framework. But if i use Register for Events on the same way, doesnt't work as expected. I mean like this.
So now, i search for a way how to implement this in actor.
Can you advise in what direction to go?
What do you mean to ''allow edit key''?
Thanks.
06-20-2022 03:28 AM
Use the output error of the register for events!
It will probably say that it can't register because the front panel is closed.
Hide it then register it. Next, open or close and insert in a sub panel...
Why TPTB put us through such hell, I'll never know...
06-20-2022 03:50 AM
Front panel is open, and the error is:
06-20-2022 05:37 AM
@milan87 ha scritto:
Front panel is open, and the error is:
Well, the meaning of this error is:The VI front panel is not open.
So, someone is lying: you or LabVIEW.
06-20-2022 05:48 AM
@milan87 wrote:
Front panel is open, and the error is:
The question is not if "front panel is open"...
The questions is: "is the front panel open when you register"?
If you open the front panel with a method, there might be a race condition. The 'opening' of the front panel might happen in parallel to the registration, and registration might fail. Possibly, it might fail sometimes. It might work, but not in an exe, etc..
06-20-2022 07:38 AM
Basically reason why this doesn't work in actor framework, is because nested actor is called from root actor before front panel is opened.
06-21-2022 09:59 PM
Do you really need to work with the array of strings directly? You could instead use a hidden string control for the editing part (shown when you click on the array) and simply update the array once the editing is finished. It might be simpler that way.
06-22-2022 09:45 AM
You can simply statically register for events on the VI. Then check the focus object with the array element.