TPD4's popups control
Tryll
Posts: 33
It seems that whenever I use more than one or two poups on a page, TPD4 cannot properly preview them in the preview tool. Particularly if the popups are attached to button events. Is this a known issue (that some of them fail to display.)
Being pretty new to AMX development, let me ask, do you actually use TPD4's automation for popup display, or pretend it doesn't exist and do all popup management with Netlinx code? Should I just strip all that stuff out of my newly created panel template and do it all olde schoole?
Being pretty new to AMX development, let me ask, do you actually use TPD4's automation for popup display, or pretend it doesn't exist and do all popup management with Netlinx code? Should I just strip all that stuff out of my newly created panel template and do it all olde schoole?
0
Comments
FYI: If you put popups in the same group they are mutually exclusive, that is you can't have them on screen simultaneously.
I did have groups that I didn't even realize I was making.
So, I take it that you do use TPD4's popup control, and don't handle all popups through code?
i have seem this problem before, and not when popups are in the same group.
for example... program one button in a panel to popup more than one popuppage. in PanelPreview, only one of your popup requests will occur.
but the panel program file will work fine in the panel itself.
i haven't checked if a newer version of Preview has addressed the problem.
not necessarily true. i do a mix of panel popup requests and code popup requests, depending on the application needs.
i also make sure that when the program restarts, it forces all panels to close all current popups that maybe open (as the panel comes online), just in case some invalid window is still displayed after a reboot.
example:
ONLINE:
{
SEND_COMMAND Panel,'AKEYR' // close any keyboard that may have been open
SEND_COMMAND Panel,'@PPX' // close any popups that may have been open
}
I'll probably attempt a hybrid of some sort, using a bit of both, as my panel shapes up.
Hide popup...
hide popup...
show popup...
show popup...
toggle popup...
etc.
Usually, it looked like the second show command was not working. I haven't had a chance yet to see if it can be resolved by correcting any grouping errors.
Personally, that would be the route I would take, excepft for a very few in-panel page flips. I like to know what pop-up page I'm on, so I nearly do all of my page flips in code. This way, if a panel falls offline or you send a new panel update (but not code) and you put this information in the panel's DATA_EVENT, when it comes back online it'll know where it was, and go to those pages. The user would never even know you did something to it, or that it fell offline.
And if you do your page flips in the panel, and the user changes sources while it's offline . . . they're now viewing a control page of a source they're not controlling - not a good idea as I'm almost certain that would confuse him/her.
Just my meager opinion . . .
So... any magic spells for Netlinx managing page flips? Any way to build out arrays of page commands, or something similar, or do you just stack up the send_commands?
Edit: After looking at my code, you could set up an array of the pop-up's names, and do something like this and avoid a CALL or FUNCTION all together:
Perhaps I'm not following correctly.
But then aren't you back at the same problem of possibly viewing the wrong page if the panel were to fall offline and they hit a source page or whatnot?
The whole beauty of AMX is that the master has enough strength or brains to fix problems itself. Well . . . I guess only if you put enough time and effort into making it fix the problems. Otherwise, I'd tell a client go buy a Harmony or a Pronto or something that can't manage itself.
One good example of a code-based flip I use all the time is for projector warmup/cooldown. I pop up a modal dialog that counts down the time needed to wait before the system is ready to proceed, and every now and then, the popup reaches zero and never closes. So I always put a hidden button in the corenr, and tell my client if it gets "stuck" to press that corner. Otherwise, with a modal popup, they would have a dead panel due to a momentary communications glitch. Another is volume bargraphs. I pop them up when the volume button is presses, then off again 8 seconds after release. Sometimes they just don't go away, so I make them if you tap the bargraph itself it closes the popup. Experiences like this have made me shun code based changes where I can. Many times, it's just not feasible, and I feel you need to make allowances in those cases for the worst case of the command getting missed.
I don't know if you are still around or not. But you just saved what is left of my sanity.