Hi Thierry,
A window "A" calls a window "B" that calls "C". When returning to window "A", I would like to trigger an action.
Because wFormCallBack () was not applicable, I tried activate(). But this method is not invoked when "A" returns to the foreground.
Is there a solution ? .trigger() in jQuery ?
Vincent,
A.*.wFormCallBack() triggers if B is modal… Have you tried that? (.wForm('B.scx', .T., parms …))
Is A a master form or a child form?
Contrary to jQueryUI and PWC, Bootstrap Modal has no support for the .focus() event (that we use to trigger .Activate()) however we could implement something equivalent.
Thank you for your answer.
It is at the closing of "C" that I return the focus to "A".
A is a child form.
however we could implement something equivalent
It would be great ...
It would be a billable evolution…
However it'd trigger not only when control returns from C to A but each time it gets focus, eg. at initial activation.
You can also let form A specify the full address of a callback method for form C:
procedure formA.*.Click && for example
…
thisForm.wForm('formB.scx', .T., parm1, …, Sys(1272, this) + '.wFormCallBack')
…
* -------------
procedure formB.Load
…
this.addproperty('cCallBack_C', '')
…
return dodefault()
* -------------
procedure formB.Init
lparameters parm1, …, cCallBack_C && add a parameter here
…
thisForm.cCallBack_C = evl(m.cCallBack_C, '')
* -------------
procedure formB.*.Click && for example
…
thisForm.wForm('formC.scx', thisForm.cCallBack_C, …)
OK Thierry,
I'll see with you, because it seems to me that the callBack (whose address is passed as a parameter on each screen) only triggers when screen B is closed (and run window C), nothing when screen C is released.