Home AMX User Forum NetLinx Studio

Page tracking - what am I doing wrong?

adysadys Posts: 395
Hi all

I am trying to do some page tracking so I can open some popups when 3th side module is changing a page (RocketGui for squeeze box)

I have enabled the page tracking in the TP
I am listening to the TP on my code

DATA_EVENT[dvTPFamilyRoom]
{

COMMAND:
{
printDebug("'Family TP DATA.TEXT: ',DATA.TEXT")
}

STRING:
{
printDebug("'Family TP DATA.TEXT: ',DATA.TEXT")
}
}


I get nothing

What am I doing wrong?

When looking at device netlinx notification I can see all the messages that the TP is sending.

Thanks,

Ady.

Comments

  • DHawthorneDHawthorne Posts: 4,584
    Page tracking only works if the page flip was done by the panel. It doesn't work when done in code.
  • adysadys Posts: 395
    Thanks Dave, its done from the panel, all of the page flip and popup are from the panel.
    I can see it from the netlinx but not in my code.

    BTW, you gave me an idea, would it be better to add a string command to the panel buttons so I can know when the page has been flipped?

    Or maybe I can listen to the button itself.... I don't want to sit on the same event that the module is listening to, but maybe this is the best solution?

    Thanks,

    Ady
  • adysadys Posts: 395
    Maybe I should listen to port 1? and not the usual ports?

    looks like the is another module that catching the messages and not mine
    DATA_EVENT[dvTP_Port_1]

    Why I am not getting them on both DATA_EVENT?
    only one listening on DATA_EVENT is available for port 1?
  • adys wrote: »
    Maybe I should listen to port 1? and not the usual ports?

    looks like the is another module that catching the messages and not mine
    DATA_EVENT[dvTP_Port_1]

    Why I am not getting them on both DATA_EVENT?
    only one listening on DATA_EVENT is available for port 1?

    Any strings that are sent from the TP to the master are sent on port 1, even if it is a text input box that has a different port assigned. Your dvTPFamilyRoom will have to be port 1 in order for your data_event to trigger when a string is sent.
  • TurnipTruckTurnipTruck Posts: 1,485
    If you want to track pages that are flipped from code, just send the TPAGEON command after the flip. I often do it as a function. This allow any variable that you are using to catch page flips to be updated whether the flips comes from the panel or code.
    <code>
    DEFINE_FUNCTION fnPageFlip(DEV dvPanel,CHAR cPageName[])
    {
    SEND_COMMAND dvPanel,"'PAGE-',cPageName"
    SEND_COMMAND dvPanel,'TPAGEON'
    }
    </code>
  • adysadys Posts: 395
    Thanks

    I decided to go with the old way and listen to any of the buttons that open the specific pages
Sign In or Register to comment.