FoxInCloud
Activate window - trigger
Gravatar is a globally recognized avatar based on your email address. Activate window - trigger
  Vincent H.
  All
  Oct 22, 2019 @ 01:03am

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 ?

Gravatar is a globally recognized avatar based on your email address. re: Activate window - trigger
  FoxInCloud Support - Thierry N.
  Vincent H.
  Oct 22, 2019 @ 01:58am

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.

Gravatar is a globally recognized avatar based on your email address. re: Activate window - trigger
  Vincent H.
  FoxInCloud Support - Thierry N.
  Oct 22, 2019 @ 02:54am

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 ...

Gravatar is a globally recognized avatar based on your email address. re: Activate window - trigger
  FoxInCloud Support - Thierry N.
  Vincent H.
  Oct 22, 2019 @ 04:29am

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, …)
Gravatar is a globally recognized avatar based on your email address. re: Activate window - trigger
  Vincent H.
  FoxInCloud Support - Thierry N.
  Oct 22, 2019 @ 06:45am

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.

Gravatar is a globally recognized avatar based on your email address. re: Activate window - trigger
  FoxInCloud Support - Thierry N.
  Vincent H.
  Oct 22, 2019 @ 08:48am

ah? strange… only form C has a call-back method.

© 1996-2019