Title: calling a function from the toolbar Post by: Stefan S. on June 04, 2010, 09:42:32 am Hello,
in each of our application we create a toolbar with a global function. Now I added a new Button "hardcopy" I there a way to call an action when pressing on hardcopy (f.e. in the createToolBarItem section) , WITHOUT changing each program (...on action hardcopy, call print_hardcopy...). We are using genero 2.21 Stefan Title: Re: calling a function from the toolbar Post by: Reuben B. on June 06, 2010, 06:02:38 am Hi Stefan,
There is a feature request in the system Bz559 - ability to define a global action, or idle trigger. In the past I have added similar functionality using the pre-processor. &define END_INPUT ON ACTION hardcopy CALL print_hardcopy() \ END INPUT it was then a simple task to search and replace all your sources 1,$s/END INPUT/END_INPUT/, and to tell the developers to cdoe END_INPUT and not END_INPUT. We did something similar for MENU, CONSTRUCT, DISPLAY ARRAY etc. and had quite a number of actions as well as an ON IDLE for each dialog. Ideally I'd like to see Bz559 implemented but the above technique will give you the same result. Hope that helps, Reuben |