O$6.1 $iremoteForms

Mike Matthews omnis at lineal.co.uk
Thu Dec 29 04:37:23 EST 2016


So an old problem.  I like the idea of the evToTop though, that should help me.

And you are right about the $construct, it runs after the whole original method has finished, so unlike the thick client.

I began top keep a small list of what is the current subform, an d then the new one, but it looks like I may have to keep a full list and a solid $ref to each one.

Thank you for your help.

Mike




Mike Matthews,
 Managing Director, SQLWorks Software Ltd

Tel: +44 (0)1271 375999

Email: mike.matthews at sqlworks.co.uk

Web: www.sqlworks.co.uk

Use SQLWorks, forget Sage, ACT!, Opera, Access & SAP

On 29 Dec 2016, at 00:17, Vik Shah <Vik at Keys2Solutions.com.au> wrote:

> 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
> 
> 
> 
> 
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com






More information about the omnisdev-en mailing list