[Gambas-user] circular reference in menubar

Jaap Cramer jaap_cramer at ...67...
Tue May 27 13:32:40 CEST 2008


Thanks!

I used indeed the quit command; removing solved my references. The first
time it raised an #11 error; I cannot reproduce it. Well, I dont think
it's any problem...

I have a last question. You say I have to use Close(). When I use
a .ShowModal, calls it (after it ends) the Close()?

Jaap



On Tue, 2008-05-27 at 13:22 +0200, Benoit Minisini wrote:
> On mardi 27 mai 2008, Jaap Cramer wrote:
> > Hello
> >
> > I am tryping te remove my circular references. I use different forms,
> > with menus. I discoverd, when I remove the menubar-items, the amount of
> > circular referenced decrease. (see example below)
> > Is this normal behaviour? Should I delete all menu-items, created with
> > the menu editor; couldn't this be done automaticly?
> >
> > PUBLIC SUB Form_Close()
> >   Settings["Window/x"] = ME.ScreenX
> >   Settings["Window/y"] = ME.ScreenY
> >   Settings["Window/w"] = ME.W
> >   Settings["Window/h"] = ME.H
> >   Settings["Last/book"] = cbBooks.Index
> >   Settings["Last/chap"] = tbChap.Text
> >   Settings["Options/transState"] = CBool(tglTrans.Value)
> >
> >   'these lines decrease the amount of circular references
> >   ME.Menu1.Delete
> >   ME.Menu2.Delete
> >   ME.Menu3.Delete
> >   ME.Menu4.Delete
> >   ME.Menu5.Delete
> >   ME.Menu6.Delete
> >
> >   mH.zQuit
> > END
> >
> > grt,
> > Jaap
> >
> 
> You are trying to fix the symptoms, not the cause.
> 
> First ensure that:
> - You do not use the QUIT nstruction.
> - You always use the Close() method to close a form.
> - You do not store any reference on a form, or if you do, you release it by 
> hand.
> 
> Regards,
> 






More information about the User mailing list