Popup Issus - there has to be a better way
rolo
Posts: 51
I have data events that provide feedback to my panels, so that if the room's audio zone is on tuner 1, the light up the tuner 1 button and turn on the tuner popup.
I have this written into DEFINE_PROGRAM as the following
If ([dvKitTP,2011])
{
SEND_COMMAND dvKitTP, "'PPON-ST2_1Popup'"
SEND_COMMAND dvKitTP, "'PPON-VolPopup'"
}
If ([dvKitTP,2012])
{
SEND_COMMAND dvKitTP, "'PPON-ST2_1Popup'"
SEND_COMMAND dvKitTP, "'PPON-VolPopup'"
}
If ([dvKitTP,2013]AND(!(nVideoInUse))AND(!(nNumberPadInUse)))
{
SEND_COMMAND dvKitTP, "'PPON-FireBallPopup'"
SEND_COMMAND dvKitTP, "'PPON-VolPopup'"
}
If ([dvKitTP,2014]AND(!(nVideoInUse))AND(!(nNumberPadInUse)))
{
SEND_COMMAND dvKitTP, "'PPON-CableBoxVideoPopup'"
SEND_COMMAND dvKitTP, "'PPON-VolPopup'"
}
If ([dvKitTP,2015]AND(!(nVideoInUse))AND(!(nNumberPadInUse)))
{
SEND_COMMAND dvKitTP, "'PPON-CableBoxVideoPopup'"
SEND_COMMAND dvKitTP, "'PPON-VolPopup'"
}
The issue is that if one selects a video window, since a button is still on, on the next pass thru mainline, the popup comes up over the video window.
The same happens with the "number pad" popup on the cable box and setup windows too.
Notice that i have variables to prevent this, but I know that there has to be a better way to say "if [button, 2014] popup some popup" without running it in mainline.
Please help
Thanks in advance
Rolo
I have this written into DEFINE_PROGRAM as the following
If ([dvKitTP,2011])
{
SEND_COMMAND dvKitTP, "'PPON-ST2_1Popup'"
SEND_COMMAND dvKitTP, "'PPON-VolPopup'"
}
If ([dvKitTP,2012])
{
SEND_COMMAND dvKitTP, "'PPON-ST2_1Popup'"
SEND_COMMAND dvKitTP, "'PPON-VolPopup'"
}
If ([dvKitTP,2013]AND(!(nVideoInUse))AND(!(nNumberPadInUse)))
{
SEND_COMMAND dvKitTP, "'PPON-FireBallPopup'"
SEND_COMMAND dvKitTP, "'PPON-VolPopup'"
}
If ([dvKitTP,2014]AND(!(nVideoInUse))AND(!(nNumberPadInUse)))
{
SEND_COMMAND dvKitTP, "'PPON-CableBoxVideoPopup'"
SEND_COMMAND dvKitTP, "'PPON-VolPopup'"
}
If ([dvKitTP,2015]AND(!(nVideoInUse))AND(!(nNumberPadInUse)))
{
SEND_COMMAND dvKitTP, "'PPON-CableBoxVideoPopup'"
SEND_COMMAND dvKitTP, "'PPON-VolPopup'"
}
The issue is that if one selects a video window, since a button is still on, on the next pass thru mainline, the popup comes up over the video window.
The same happens with the "number pad" popup on the cable box and setup windows too.
Notice that i have variables to prevent this, but I know that there has to be a better way to say "if [button, 2014] popup some popup" without running it in mainline.
Please help
Thanks in advance
Rolo
0
Comments
I have data events that provide feedback to my panels, so that if the room's audio zone is on tuner 1, the light up the tuner 1 button and turn on the tuner popup.
I have this written into DEFINE_PROGRAM as the following
If ([dvKitTP,2011])
{
SEND_COMMAND dvKitTP, "'PPON-ST2_1Popup'"
SEND_COMMAND dvKitTP, "'PPON-VolPopup'"
}
If ([dvKitTP,2012])
{
SEND_COMMAND dvKitTP, "'PPON-ST2_1Popup'"
SEND_COMMAND dvKitTP, "'PPON-VolPopup'"
}
If ([dvKitTP,2013]AND(!(nVideoInUse))AND(!(nNumberPadInUse)))
{
SEND_COMMAND dvKitTP, "'PPON-FireBallPopup'"
SEND_COMMAND dvKitTP, "'PPON-VolPopup'"
}
If ([dvKitTP,2014]AND(!(nVideoInUse))AND(!(nNumberPadInUse)))
{
SEND_COMMAND dvKitTP, "'PPON-CableBoxVideoPopup'"
SEND_COMMAND dvKitTP, "'PPON-VolPopup'"
}
If ([dvKitTP,2015]AND(!(nVideoInUse))AND(!(nNumberPadInUse)))
{
SEND_COMMAND dvKitTP, "'PPON-CableBoxVideoPopup'"
SEND_COMMAND dvKitTP, "'PPON-VolPopup'"
}
The issue is that if one selects a video window, since a button is still on, on the next pass thru mainline, the popup comes up over the video window.
The same happens with the "number pad" popup on the cable box and setup windows too.
Notice that i have variables to prevent this, but I know that there has to be a better way to say "if [button, 2014] popup some popup" without running it in mainline.
Please help
Thanks in advance
Rolo
Put the popup commands into channel events rather than in mainline and the popup won't keep trying to reappear.
This means that EVERY pass through mainline, your panel is being sent a message to display a certain popup.
This may not fix your problem, but at the VERY least, put this code in the same section that turns [dvKitTP,2001] on in the first place.
Also, in general, basing conditionals on touch panel channels is usually something to avoid.
Aside from all that, I'm not getting a clear enough picture in my head of what exactly is going on, so I can't suggest anything else.
- Chip
@PPN-<popup>[;<pagename>]
If no <pagename> is given, the popup opens on current page
Next what I would do is to open the popups on a button push, i.e. when selecting a new source. Additionally, I would use the @PPN to open the popup on correct page.
Kind regards,
Maybe I was not clear enough.
I have several different areas of the code turning on a button when a certain Variable comes on.
This way when one selects the kitchen, it checks to see what source is on in the kitchen, and turns on the associated button. This way there is a dynamic status update whenever a room is selected. Press the living button, it checks to see what is on in the living room, turns on the button, and pops the popup up.
This popup coming on is not necessarily the result of a push but instead the button going on which comes from several "status updates" in the software.
I was hoping to have the popups come up as a result of a data event from the panel or something.
Something that only runs once instead of every pass thru mainline.
Thank you for your response
Rolo
I have several different areas of the code turning on a button when a certain Variable comes on.
This way when one selects the kitchen, it checks to see what source is on in the kitchen, and turns on the associated button. This way there is a dynamic status update whenever a room is selected. Press the living button, it checks to see what is on in the living room, turns on the button, and pops the popup up.
This popup coming on is not necessarily the result of a push but instead the button going on which comes from several "status updates" in the software.
I was hoping to have the popups come up as a result of a data event from the panel or something.
I know that basing stuff on button channel events may not be that great, but it is the only way i can think to do what I am doing.
Something that only runs once instead of every pass thru mainline.
Thank you for your response
Rolo
http://www.amxforums.com/showthread.php?t=1213
push[dvtp, 214] (*Source_control*)
{
SEND_COMMAND dvTP,"'@PPX-??'" (*clears previous popup*)
SEND_COMMAND dvTP,"'@PPN-source'" (*brings up popup named source*)
this is how I go round it if I understand right..this way the each canel out as you push another button hence state doesnt change on each pass..I dont know if this helps you..
"one selects the kitchen" means what? Push the kitchen button on the panel that goes to the kitchen page? Does nothing but update the popups?
The event you're looking for that should update the popup is the room selection. WHICH popup is triggered depends on the source of that room. If rooms are pages, then you can open/close popups on the pages using code shown above when the sources are set (i.e. when switching to tuner in kitchen, the tuner popup is opened on the kitchen page(s)).
To manage the exclusivity of popups, use popup groups.
Fred