Multiple Panels
Hello, hello, hello!!!
Any recommendations on how to handle two panels, one being a MVP8400 and the other an iPad? Both will have identical layouts and control abilities.
This is the first time I've had a situation where both panels will be identical and therefore would like to optimize my code. I've seen multiple threads related to this issue, but none address the iPad or give a clear answer.
Any advice?
Any recommendations on how to handle two panels, one being a MVP8400 and the other an iPad? Both will have identical layouts and control abilities.
This is the first time I've had a situation where both panels will be identical and therefore would like to optimize my code. I've seen multiple threads related to this issue, but none address the iPad or give a clear answer.
Any advice?
Comments
button_event[dvTp1,1] { // stuff for the 8400 } button_event[dviPad,1] { // stuff for the iPad }You can simply do something like this:define_constant dev dv_tp[] = {dvTp1, dviPad} define_event button_event[dv_tp,1] { // This event handles both touch panels }Since dv_tp is an array, you can use get_last() on it to figure out which one triggered the event just in case you want to do anything special.button_event[dv_tp,1] { push: { stack_var integer index; index = get_last(dv_tp); if(index == 1) { // Do something for the 8400 only } else if(index == 2) { // do something for the iPad only } } }You can send each panels to a specific page by doing something like this: or if you want to send them both to the same page
Hope this helps!
I had been thinking of going with an array, but some other threads kept talking about virtual panels.
Any reason why I should think about using a virtual panel?
Thanks!!!
I highly suggest you do not go the route of virtual panels, as if you ever need to separate them, you'll just find yourself in a rut. I like to maintain expandable, and using virtual panels / combine_devices is not very coder friendly. I think the last time I used a virtual panel was before I had any training.
THANKS SO MUCH FOR YOUR TIME!!!