1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Stackoverflow]

Discussão em 'StackOverflow' iniciado por fdantas, Dezembro 30, 2020.

  1. fdantas

    fdantas Administrator Moderador

    I have been asked to implement an event handler on a fill-in field in a *.w file (in case of F5, something should be done).

    I started doing the following:

    ON F5 OF particular_fill-in_Field
    DO:
    ...
    END.


    This did not work, and later I realised there already was the following present in the source code:

    Inside include-file:

    &GLOBAL-DEFINE SEARCH-KEYBOARD "F5":u
    &GLOBAL-DEFINE SEARCH-MOUSE MOUSE-SELECT-DBLCLICK


    Inside *.w file:

    ON {&SEARCH-KEYBOARD},{&SEARCH-MOUSE} OF particular_fill-in_Field
    DO:
    ...
    END.


    While checking the progress website, I found following URL, explaining the ON-statement:

    ON CHOOSE OF b_next, b_prev DO:
    IF SELF:LABEL = "Next" THEN
    ...


    This leaves me with some questions:

    1. When I added my ON F5 line, there were two event handlers for the F5 (SEARCH-KEYBOARD) event. Why did this even compile and as it compiled, why did it take the already existing line of code and not the one I added?
    2. The example on the URL shows how to handle the same event on different widgets (you can use the SELF object to know which widget launches the event handler), but what about different events on one widget (like in my case, ON {&SEARCH-KEYBOARD},{&SEARCH-MOUSE} OF ...), can I know which event has been triggered, SEARCH-KEYBOARD or SEARCH-MOUSE?

    Continue reading...

Compartilhe esta Página