Hi Rodrigo,
You might be thinking of this article I wrote
https://4js.com/ask-reuben/ig-19/ which detailed a technique I used involving pre-processor to add ON ACTION's to every dialog.
or perhaps you might be thinking of dynamic dialogs
http://4js.com/online_documentation/fjs-fgl-manual-html/#fgl-topics/c_fgl_dynamic_dialogs.html which can be used to write generic/library code.
Reuben