Plex 2E

  • 1.  Trigger an event when a value change by Programming

    Posted Feb 25, 2016 10:54 AM

    Hi everybody,

     

    I have an event associated with a combo box, but this event is trigger if It changed manually. This Combo can be changed by programming and not only doing a click. The idea is that the event get trigger when it changed by programming. is it possible to Trigger an event when a value change by Programming?



  • 2.  Re: Trigger an event when a value change by Programming

    Posted Feb 25, 2016 12:06 PM

    Look at source code WINAPI/TriggerEvent...



  • 3.  Re: Trigger an event when a value change by Programming

    Posted Feb 25, 2016 01:12 PM

    what do you mean by "change by Programming" can you outline a use case.

     

    I feel as if you mean programming by changing the value within the action diagram but if so why not call the subroutine the logical event in the event handler calls.



  • 4.  Re: Trigger an event when a value change by Programming

    Posted Feb 25, 2016 03:25 PM

    Ah yes, but that assumes there is nothing but a go sub in the event handler



  • 5.  Re: Trigger an event when a value change by Programming

    Posted Feb 25, 2016 03:28 PM

    My case is the following, When I press the button "Procesar", the combox box(Estado Transaccion) change from "Espera" To "Procesado". If the value is "Procesado" all the rows in the GridP get protected, on the contrary if the values is "Espera" all the value in the GriP is set state for default. So, this actions get done when I press the button procesar.

     

                                                   PROCESS.jpg

     

     

     

    My idea is separate these  actions:

    • The Combo box "Estado Transaccion" have an event mapping(modified or updated).

     

    So When I press the Button 'Procesar' the value of the combo box change to 'Procesada', then the combo box should detected this change and trigger the event because it has a Modified Event associated.

     

    is clearer my idea?



  • 6.  Re: Trigger an event when a value change by Programming

    Posted Feb 25, 2016 04:55 PM

    This panel could inherit from

    • Function: UIBASIC/Input
    • Function: UIBASIC/Grid

    And then the following code

    Capture.PNG

     

    This should work for C++, Java and C# desktop client variants....as I see your panel is Java.



  • 7.  Re: Trigger an event when a value change by Programming

    Posted Feb 29, 2016 01:22 PM

    Hi jmroman,

     

    Modified or Updated is a physical event. Which means it is triggered manually.

     

    You want to trigger or call the logical event/process (EstadoTransaccionModified) assocaited with Modified or Updated.

     

    Since , everything is within the same function. All you need to do is structure your action diagram code in logical event(EstadoTransaccionModified) by moving it into a subroutine(Process EstadoTransaccionModified).

     

    And call the subroutine from as many places you want. i.e On the click of "Processar" button call the

    subroutine (Process EstadoTransaccionModified).

     

    Already explained by GeorgeJeffcock.

     

    You could use Crispin's method of Triggering a logical event. (Normally used for triggering logical event of other functions loaded in memory)

     

    Regards

    AA