LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Acceptence of characters in string control

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.

 

Have you also seem some of my old examples? (here, here)

0 Kudos
Message 11 of 19
(1,102 Views)

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.

milan87_0-1655709233998.png

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.

 

0 Kudos
Message 12 of 19
(1,089 Views)

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...

0 Kudos
Message 13 of 19
(1,078 Views)

Front panel is open, and the error is:

milan87_0-1655715021346.png

 

0 Kudos
Message 14 of 19
(1,071 Views)

@milan87  ha scritto:

Front panel is open, and the error is:

milan87_0-1655715021346.png

 


Well, the meaning of this error is:The VI front panel is not open.

So, someone is lying: you or LabVIEW.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
Message 15 of 19
(1,057 Views)

@milan87 wrote:

Front panel is open, and the error is:

milan87_0-1655715021346.png

 


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..

Message 16 of 19
(1,054 Views)

Basically reason why this doesn't work in actor framework, is because nested actor is called from root actor before front panel is opened.

0 Kudos
Message 17 of 19
(1,037 Views)

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.

0 Kudos
Message 18 of 19
(1,011 Views)

You can simply statically register for events on the VI. Then check the focus object with the array element.

 

wiebeCARYA_1-1655909114073.png

 

 

 

0 Kudos
Message 19 of 19
(996 Views)