On Sat, Sep 13, 2008 at 4:15 PM, Benoit Minisini < [EMAIL PROTECTED]> wrote:
> On samedi 13 septembre 2008, Ian Roper wrote: > > It would be nice to have this as a standard method for these sort of > > controls. :) > > > Hi Benoit, I am here learning Gambas...I have some questions - don't answer if you too busy with improving Gambas :-) > > You can actually do that easily in your own projects by reimplementing > these > controls. Could you write little more about this reimpiementing controls? I don't understand it at all :-( So if you make a class with a same name as the control it get's instantiated first - how then it is connected to the standard control - by the observer? > > > For example, for the ListBox, creates a "ListBox" class in your project, > and > put that in it: > > --8<-- ListBox.class ---------------------------------------------- > > EXPORT Why is this EXPORT needed? > > > PRIVATE $hObserver AS Observer > > PUBLIC SUB _new() > > $hObserver = NEW Observer(ME) AS "ListBox" > > END Could you explain once and for all this observer-thingy. I know there is something like that in C# and Java but I never understood it properly. Does it have something to do with observer design pattern - which I also don't understand as of yet. How events propagate when you have this own ListBox-class. They first go to your class but how the real thing is connected? Sorry for stupid question which might be obvious... Best Regards Kari Laine > > PUBLIC SUB ListBox_KeyPress() > > ' Put your code there > ... > > END > > PUBLIC SUB ListBox_LostFocus() > > ' Put your code there > ... > > END > > ------------------------------------------------------------------------- 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