FoxInCloud
Form.activate event not triggering
Gravatar is a globally recognized avatar based on your email address. Form.activate event not triggering
  Paul
  All
  Jul 30, 2019 @ 10:02pm

Hi,

Here is the sequence of events and my problem :

  1. open child form 1 - Activate event of form 1 triggers
  2. open child form 2 from the valid of a textbox on form 1 - Activate event of form 2 triggers
  3. close form 2 (thisform.release) - Activate event of form 1 does not trigger, as it would do in the VFP event model

For some background : Lots of code looks at _Screen.activeform, but this is a problem when running FiC in debug mode because the web connection status form becomes the active form and upsets the "normal" behaviour you see in lan mode.
So, I put some code in form.Activate to set a property on a global object that points to that form and I refer to that property instead of _screen.activeform.
Great, except when running in FiC the previous form is not being "reactivated" when the active form is closed.

Is this expected behaviour or am I doing something wrong?

Thanks
Paul

Gravatar is a globally recognized avatar based on your email address. re: Form.activate event not triggering
  Gilles Lajot-Sarthou
  Paul
  Jul 30, 2019 @ 11:42pm

Hi Paul I think that you will use a callBack parameter in form1.wForm() like THISFORM.wForm("form2.scx", "THISFORM.activate", ...). After form2.release() FIC will run the form1.activate(). Regards

Gravatar is a globally recognized avatar based on your email address. re: Form.activate event not triggering
  FoxInCloud Support - Thierry N.
  Paul
  Jul 31, 2019 @ 08:23am

Paul,

FoxInCloud triggers form.[de]activate() from the browser side, regardless of which window or form is currently active in the VFP IDE (which does not exist in COM mode).

In classic mode as you use, form.activate() relies on the jQueryUI Dialog's .focus() event which triggers, as far as I know, when focusing in any control contained in the Dialog.

As FAA points out, all _Screen.activeForm need be replaced by wActiveForm() of awPublic.prg; eg.:

local wActiveForm
wActiveForm = wActiveForm()
* _Screen.activeForm.…
wActiveForm.…
Gravatar is a globally recognized avatar based on your email address. re: Form.activate event not triggering
  Paul
  FoxInCloud Support - Thierry N.
  Aug 4, 2019 @ 03:12pm

Thanks, didn't notice that. wactiveform() works for me, I think...still testing.

© 1996-2019