Home AMX User Forum NetLinx Studio

do_push on buttons that open popups via TPdesign

Hi all


I am doing do_push command on a button that is programm to open some popups in TPDesing and not in code.

The button is selected, but the popups are not activated... pressing the button from the panel do activate them.

Is this is the way its suppose to work?

Is there any way to send a command to activate the button like a press from the panel?

thanks

Ady.

Comments

  • ericmedleyericmedley Posts: 4,177
    adys wrote: »
    Hi all


    I am doing do_push command on a button that is programm to open some popups in TPDesing and not in code.

    The button is selected, but the popups are not activated... pressing the button from the panel do activate them.

    Is this is the way its suppose to work?

    Is there any way to send a command to activate the button like a press from the panel?

    thanks

    Ady.

    Do_Push doesn't actuall 'push' the button on the TP per se. It basically triggers a Button_Event in the program. This is yet another good example of the benefits of doing your TP navigation in code, not on the TP. (But I'm not trying to open that heated debate again... ) :D

    I also typically don't do DO_PUSHes on real devices. I'll tie a virtual device to the real device and push the virtual device. But that's just me.
  • adysadys Posts: 395
    ok

    Any Idea what to do instead?

    I don't want to put it in the code, its a lot or command andI want to save traffic.

    let the TP work a little...
  • AMXJeffAMXJeff Posts: 450
    adys wrote: »
    ok

    Any Idea what to do instead?

    I don't want to put it in the code, its a lot or command andI want to save traffic.

    let the TP work a little...

    I would suggest you send commands to the touch panel to open the popups directly. Using the touch panel to perform this function is nice, but you already trying to do it in code, so why not use the method that was designed to perform this functionality. These commands generate very little traffic, you can pretty much slamm G4 panels with commands...

    // Option 1
    SEND_COMMAND dvTP,'@PPN-PopupName;PageName'

    // Option 2
    SEND_COMMAND dvTP,'@PPN-PopupName'
  • adysadys Posts: 395
    its too mess to move them now...

    I have 28 tool bars of 7 buttons each that every button opens 5-6 different popups..

    I am trying to avoid move it to code.

    and its working much much faster this way, much faster then doing it from code.

    My system is allredy full of trafic, and I think putting some of the work on the TP is not so bad.
  • DHawthorneDHawthorne Posts: 4,584
    I don't think you can have it both ways in this case. Either your code flips the pages, or the button has to be physically pressed on the panel. I like to put page flips on the panel myself, but this is one of those times it just won't work.
  • adysadys Posts: 395
    yes..

    This what I am doing now, I moved some pages activation to the code...
Sign In or Register to comment.