[Gambas-devel] BUG on Object.Parent(o)

Fabien Bodard gambasfr at ...4...
Sat Jan 7 14:50:16 CET 2006


Le Vendredi 6 Janvier 2006 21:48, Benoit Minisini a écrit :
> On Friday 06 January 2006 13:26, Fabien Bodard wrote:
> > Le Jeudi 5 anvier 2006 23:48, Benoit Minisini a écrit :
> > > On Thursday 05 January 2006 20:30, Fabien Bodard wrote:
> > > > Hi Benoit ...
> > > >
> > > > This is a small exemple that raise a crash...
> > > >
> > > >
> > > > Regards,
> > > > Fabien
> > >
> > > Same problem than you sent me in french. But now I understand better
> > > what you wanted to do.
> >
> > En fait je problème est que dans mon système chaque objet a une fonction
> > le dessinant...
> > Pour la Classe ReportLabel qui sert a la fois de label et de champ
> > suivant les donnée demandé dans la propriété command, l'évènement doit
> > être appelé par le label lui même en passant les champ appelé ou les
> > information demandé. Dans la version 1.9.22 tout allais bien ... mais
> > avec la 1.9.23 ça plante... En effet mon exemple envoyé était mal
> > construit, mais dans gb.report, l'objet Report est créé et attaché a son
> > parent avant la création de tout autre composant donc ce n'est pas le
> > soucis...
> >
> > > The problem is that during the _new method, the created object is not
> > > yet attached to its parent, and so Object.Parent() returns NULL!
> > >
> > > But I really don't see the need of what you want to do...
> >
> > Ben si tu a une autre idée je veut bien l'entendre...
> >
> >
> > Amicalement,
> > Fabien Bodard
> >
> > PS:
> >
> > Y'a quand même un bug !
>
> Write in english if you post on the mailing-list please! :-)
Sorry ... :-(


>
> And what is the bug?
>
> I can't attach the object to its parent during the constructors are
> executed, because if the object raises an event, he will be in a not-ready
> state, as the constructors are not finished. Did you talk about that?
ok i understand now... in fact i was trying to join automagiquely the label to 
the report parent but i've mabe another way to do that more simply and 
without bug... I think i can join it at the file loading.

o = new Label(hcont) as "ReportObject"
and use a 2 level events...


PUBLIC SUB ReportObject_Data(Command)
  RAISE Data(Command)
END


>
> Regards,





More information about the Devel mailing list