Hi,
Here is the sequence of events and my problem :
- open child form 1 - Activate event of form 1 triggers
- open child form 2 from the valid of a textbox on form 1 - Activate event of form 2 triggers
- 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
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
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.…