On samedi 20 septembre 2008, Kari Laine wrote:
> On Sat, Sep 20, 2008 at 5:52 PM, Benoit Minisini <
>
> [EMAIL PROTECTED]> wrote:
> > On samedi 20 septembre 2008, Kari Laine wrote:
> > > Hi,
> > >
> > > I am trying to learn Object.Attach and Object.Detach. I have following
> > > code in a little program
> > >
> > >   Object.Attach($hTextBoxView, ME, "TextBoxView")
> > > '  Object.Detach($hTextBoxView)
> > >
> > > If object.detach is commented out it works as supposed. SUBs in ME
> > > handle events. If Object.Attach is also commented out FORM's subs take
> > > care of events. But then I tried to see whether Object.Detach returns
> > > event-handling to original Form-based - it doesn't. I have some basic
> > > misunderstanding in this - could someone comment, please.
> >
> > Objects just do not remember the old objects they were attached to.
> >
> > Thanks Benoit,
>
> Where do events go then? 

They are lost. As if the object was never attached to anything.

> Is there way to do "remembering" myself in code? 

Store the old observers yourself.

Regards,

-- 
Benoit Minisini

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to