fgl_getlastwidgetid()

 

fgl_getlastwidgetid() returns the identifier of the last triggered widget.

 

Syntax:

 

CALL fgl_getlastwidgetid()

 

Usage and examples:

 

The function will be especially useful for applications with complex, many-level static menus and multiple actions because it provides a simple, customer-friendly tool for optimizing the application performance and developing a better structured 4gl code.

Moreover, it can be used with any Lycia widget or event.

 

4gl code

MAIN

DEFINE id_var STRING

OPEN WINDOW w WITH FORM "fgl_getlastwidgetid" ATTRIBUTE(BORDER)

MENU

  ON ACTION "act1"

   LET id_var = fgl_getlastwidgetid()

   CALL fgl_winmessage("", id_var,"info")

  ON ACTION "act2"

   LET id_var = fgl_getlastwidgetid()

   CALL fgl_winmessage("", id_var,"info")   

  ON ACTION "act3"

    EXIT MENU

END MENU

END MAIN

 

after triggering a widget,

 

we get the result

depending on its id

 

 

In the example program, basic steps for using  fgl_getlastwidgetid() include:

 

 

 

Example programs:

CVS server: client.querix.com

CVS repository: /lycia_doc_examples

User: client

Project: lycia_library/functions

Program: fgl_getlastwidgetid

 

Project: static_menu

 

Related articles:

identifier

Wigdets