Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: [1]
  Reply  |  Print  
Author Topic: calling a function from the toolbar  (Read 8096 times)
Stefan S.
Posts: 90


« 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
Reuben B.
Four Js
Posts: 1119


« Reply #1 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

Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines