On samedi 13 septembre 2008, Kari Laine wrote: > Hi, > > i am trying to understand this observer. I include a little project that I > tested with. > > PUBLIC SUB Form_Open() > 'ListBox1.Add("box1row1") > 'ListBox1.Add("box1row2") > 'ListBox1.Add("box1row3") > > if these lines are uncommented the observer ceases to work. > > I cannot get the focus to move so that LostFocus would be triggered. > > I tried to make observer to react on TextBox events without success. > > Heading to Gambas-ide to find example .... > > Best Regards > Kari Laine
I finally succeeded in reading your attachment. You didn't do what I told Ian Ropper. The class in your project must be named "ListBox", and be exported, so that you overrides the default ListBox class. You are exporting a form of your project, which is useless. I suggest you read the document on the wiki about the Gambas object model. I will update it to add more explanation about the Observer class, but everything done by this class is explained in its page documentation. 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