I couldn’t resist :-)
I want to change dynamically the subforms displayed in a parent form and need
to execute some code in the subform(s) after a call to OBJECT SET SUBFORM
So, just after setting the subform I want I call EXECUTE METHOD IN SUBFORM.
This doesn’t work (at least in v16R4 and v16R5):
The reference to the subform is not updated immediatly after OBJECT SET SUBFORM
so the method called by EXECUTE METHOD IN SUBFORM is executed in the wrong
subform.
This can be verified by calling OBJECT GET SUBFORM after OBJECT SET SUBFORM.
The only workaround I found is:
Add a button with a shortcut, call POST KEY every time you want to change the
subform and execute a code like this from this button:
OBJECT GET SUBFORM(*;”subformArea";$y_table;$t_subform)
Case of
: ($t_subform=“subform1")
EXECUTE METHOD IN SUBFORM(“subformArea”;”methodSubform1”)
: ($t_subform=“subform2")
EXECUTE METHOD IN SUBFORM(“subformArea”;”methodSubform2”)
End case
Alberto.
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ: http://lists.4d.com/faqnug.html
Archive: http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:[email protected]
**********************************************************************