You can't dynamically add a trigger to a widget, but if you want to fire the trigger already on the widget then
apply "leave" to MyHandle.
That should do it. Or something similar - not got the exact syntax to hand.
You have any idea for this problem ?
See my problem :
I have one frame with many fill-ins, and one disable fill-in, but this fill-in have a on-leave event.
This on-leave event put values in other fill-ins after then.
I need that one other fill-in call this on leave event.
I have given you the solution. You say you have a handle. Apply "leave" to the handle. But the widget has to be active for the trigger to fire if I remember correctly, so enable the widget, apply leave, disable the widget.
As Cringer says, you need to apply "leave". In this basic example, when you leave one widget it also applies leave to another widget:
Code:
ON LEAVE OF FILL-IN-1 IN FRAME FRAME1
DO:
APPLY "LEAVE" TO FILL-IN-2.
END.
ON LEAVE OF FILL-IN-2 IN FRAME FRAME1
DO:
MESSAGE "LEAVE has been applied to this widget" VIEW-AS ALERT-BOX.
END.
I don't have source of the window where are this fill ins.
The window have a call for external program (i have source of this program), so i have only handles of components.
This is a patern from Totvs ( enterprise that makes ERP system in brazil ).
This external program is call when the window open, so when window open i need change the on leave of fill in 1 for call the fill in 2 leave.
If you can obtain the handle of the window using one of the below, then read all the frames and widgets and for the relevant fill-ins set to run a procedure as per post #6.
How the external program is called - persistently or not?
If external program is called persistently then look at fi-proc.p.
If external program is not called persistently then you must run persistent procedure to handle leave event. See how to do that (once) in fi-proc.p and use fi-persproc.p as template.
fi-proc.p and fi-persproc.p must be placed in folder named "temp" in the working directory.
Use fi-win.w to see both cases demo.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.