View parameter routing for custom keypad perspective

Greetings, I am working on a custom keypad for numeric entries contained within my Perspective 2.1.13 project. I am developing the custom keypad due to OSK not displaying when numeric entry field is selected. Keypad functions well, but i am struggling a bit with how to route the output of the keypad on enter so that it doesnt update EVERY numeric entry. Message handlers are attractive, but i dont see how i can use them on a parameter binding. Is there anything similar to a message handler that i can use to update a specific entry field? My last resort is to set an “ID” session parameter then call a script when pressing enter on my keypad that will write the value back to the “ID” that was initially requested.

Thanks for reading

Consider including a unique ID on each numeric entry that can be passed as a parameter into your custom keypad. Send the result in a message that includes that unique ID. The calling numeric entry can identify the response it wants by the ID in the message.

1 Like

This works beautifully, however, now i am trying to pass an “enable” boolean over the message handler, for some object events i would like it to be true and show a lable on the keypad; for some objects i would like it to be false and hide the lable. The logic works however it seems the object events are “fighting” over which value is sent. Are there any considerations for calling the same message handler from unique object events (on-click scipt)?

I can use session params to accomplish my goal, but I really like message handlers and am curious why I am having issues with this one.


No idea. Show your code, perhaps?

1 Like

My remote connection is down so i wont be able to get the actual code until tomorrow, however, below is a rough replication of the idea that I am working with, the screen shot below is duplicated on two different views with both views sending the same message type after an on-click event. My listener script is the bottom screen shot.

It seems like one event is overwriting the other even though they are event based.

Thanks for looking.

Do any of those parameters you are assigning in the message handler have their own onChange events? Those will execute at the point of assignment, not after the message handler is done. I think. (Definitely would be true in Vision–still feeling my way around Perspective.)

That behavior is one of the reasons I like dataset properties–assigning to a dataset is atomic–all dependencies will see the entire object, not parts of it.

1 Like

Maybe? They are bound to opc tags.