O$6.1 $iremoteForms

Vik Shah Vik at Keys2Solutions.com.au
Wed Dec 28 19:17:41 EST 2016


HI Mike,

This very issue has plagued subforms for a long time. To remedy this we used $event of the remote forms and evToTop to trigger the post-construct or (re)initialisation routines. 

We had to also devised an event handling system to manage remote forms going behind in the form stack and this worked in the opposite manner to that of evToTop. 

Todo what I’ve suggested here, you’ll need to maintain a subform stack and all your subforms would be imbued with pointers to their parent forms and all the parent forms would manage their child form/subform stacks. This way when a subform is brought to the top, the parent window can either let the subform’s event evToTop to trigger or the parent form can use the child form’s link/pointer to call a $toTop method to reinitialise itself. 

On a final note, I’d avoid relying on the subform’s $construct as its execution is asynchronous to the general stack execution or at least from what I recall the $construct for subforms was something we couldn’t manage in the sequence of events the way we’d hope it should have worked.

Hope that helps.

Regards,

Vik Shah
Director
Keys2Solutions
AU: +61 411 493 495
SE: +46 21-495 01 05
US: +1 (415) 413 4172

> On 29 Dec 2016, at 9:56 AM, Mike Matthews <omnis at lineal.co.uk> wrote:
> 
> Hello All,
> 
> I have a remote form that has sub windows in it.  I can change the subform using:
> 
> $cinst.$objs.oSubForm.$classname.$assign(pSubFormName)
> 
> But once it has been instantiated once, it stays in the list of $iremoteforms inside the $iremotetask.  And therefore the $construct is only run once.
> 
> How do you clear the usage of this form in the list of $iremoteforms, so that when I use it again, the $construct will run?
> 
> And then a final thought, is this a good thing to do, i.e., keep adding and then removing subforms this way, or should I find a better way of running a method inside the subform?
> 
> Thanks
> 
> Mike
> 
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com







More information about the omnisdev-en mailing list