Home AMX User Forum AMXForums Archive Threads AMX Hardware

Bug with panels?

jjamesjjames Posts: 2,908
Here's an interesting bug (or what appears to be a bug.) I stumbled across this one because I wasn't managing my pages properly - anyway....

I've got several popups in a group called "Overlay", and one of those is "VOLUME 1", and another is "POWER 1". Long story short, I wasn't cancelling a WAIT and kept sending out @PPF-VOLUME 1, except VOLUME 1 was not open and instead POWER 1 was . . . well, it was still closing out POWER 1 at the end of the WAIT. I can even open up POWER 1 and send the popup close command for the volume page and the power page still goes away. I'm guessing that it has to do because they are in the same group, that since one page isn't open, it closes that group rather than ignoring it.

I've seen this problem so far on the 5200i (2.60.38), 1200VG (2.72.11) and the 700Vi (2.81.6); can anywhere verify with older or newer (if available) firmware?

Thanks!

Comments

  • viningvining Posts: 4,368
    I think the documentation states that closing any member of a group will close all members of a group. At least that the way I've been using it so I don't need to know which pop up of the group is being displayed. I can just pick one pop up name in the group for my code to close what ever may be displayed.
  • jjamesjjames Posts: 2,908
    That's dumb!

    Ahh . . . well if that's the case - that's just bass-akwards!

    If I wanted to close the entire group - then I'd use an @CPG command, not an @PPF. That's pretty stupid . . .
  • ColzieColzie Posts: 470
    jjames wrote: »
    If I wanted to close the entire group - then I'd use an @CPG command, not an @PPF. That's pretty stupid . . .

    This is one reason I love this forum. I didn't know about the CPG command - I can't wait to use it!!!
  • mpullinmpullin Posts: 949
    :-/

    I was under the impression that @CPG didn't work that way and the AMX recommended approach was to send a @PPF to any popup in the group to turn the group off...
    AMX PI wrote:
    "'@CPG-<popup group name>'"
    Clear all popup pages from a specified popup group.

    Syntax:
    SEND_COMMAND <DEV>,"'@CPG-&lt;popup group name>'"

    Variable:
    popup group name = 1 - 50 ASCII characters. Name of the popup group.

    Example:
    SEND_COMMAND Panel,"'@CPG-Group1'"
    Clears all popup pages from the popup group 'Group1'.
    Clearing from a popup group doesn't mean hiding them all, it just means... that popup group won't have any popups in it anymore O_o
  • jjamesjjames Posts: 2,908
    mpullin wrote: »
    I was under the impression that @CPG didn't work that way and the AMX recommended approach was to send a @PPF to any popup in the group to turn the group off...

    Clearing from a popup group doesn't mean hiding them all, it just means... that popup group won't have any popups in it anymore O_o
    Yeah - just found that out....

    I'll tell you, that's pretty silly. So in order to close a group, you have to specify a page in the group, rather than the group itself . . . that makes sense - ugh.
  • a_riot42a_riot42 Posts: 1,624
    jjames wrote: »
    Yeah - just found that out....

    I'll tell you, that's pretty silly. So in order to close a group, you have to specify a page in the group, rather than the group itself . . . that makes sense - ugh.

    Why is this considered a bug? I have found it quite convenient.
    Paul
  • mpullinmpullin Posts: 949
    Hey jj, this approach may work for you... first make a small transparent popup called "hider" with a very short timeout...
    "'@APG-&lt;pop-up page name>;<popup group name>'"
    Add a specific popup page to a specified popup group. Add the popup page to a group if it does not already exist. If the new popup is added to a group which has a popup displayed on the current page along with the new pop-up, the displayed popup will be hidden and the new popup will be displayed.
    "'@DPG-&lt;pop-up page name>;<popup group name>'"Delete a specific popup page from a specified popup group if it exists.
    ... so you would issue two commands here: '@APG-hider;evil_group' and then '@DPG-hider;evil_group'. The hider page will be added to evil_group, displacing any popup from that group that may have been shown, and then removed from evil_group so that the technique can be used again. This way you can hide all popups from a group without having to know the names of any popups in the group.
  • ColzieColzie Posts: 470
    I generally create a popup in each group specifically for closing the group.

    In my Sources group my popups are named "Sources - DVD", "Sources - BluRay", etc., and I have a "Sources - Off" (mostly an empty popup page) that I call with PPF.

    It is a bit more on the TP side, but my code feels better when I close a group by PPF'ing "Sources - Off" instead of "Sources - DVD" with a comment that this will close the entire group.

    That is why I was excited when I thought CPG would close the group - it would have saved a popup page in each group and the code would have felt even better.
  • jjamesjjames Posts: 2,908
    Yeah - it is a real shame that they don't have a command to close pages in a popup; they have it in the panel, but not in code. So sad . . .

    Oh well . . . I guess you learn something everyday.
  • a_riot42a_riot42 Posts: 1,624
    jjames wrote: »
    Yeah - it is a real shame that they don't have a command to close pages in a popup; they have it in the panel, but not in code. So sad . . .

    Oh well . . . I guess you learn something everyday.

    How are you getting a page in a popup?
    Paul
  • jjamesjjames Posts: 2,908
    a_riot42 wrote: »
    How are you getting a page in a popup?
    Paul

    Sorry . . . close popup groups.
  • DHawthorneDHawthorne Posts: 4,584
    I've been using the old "@PPF' for a page in a group to close the entire group for as long as I can remember. But I have to add, I am not a big fan of using PPF liberally; I would rather manage my pages so the they are grouped in a way that the new activity closes anything not current. And I utterly despise the PPX command - too many module writers seem to think it a good thing to hard code into their module without any respect to whatever else the panel might be doing ... it's very frustrating to be staring at your panel that suddenly has no means of navigating off the page anymore ...
Sign In or Register to comment.