On Thursday 06 November 2008 13:37, Doriano Blengino wrote: > i.e., LAST is a reference to the object that raised the event, and you > can compare it to anything you like (probably widgets).
Yes, that should work, but with limitations. You would have to hardcode the name of the control you wish to compare against at compile time. Gambas lacks enough introspection at present to obtain a reference to an object using its symbol name at run time. (As far as I know, the same is true of VB.) > The tag system is another way - sometimes tags are better, sometimes > control/widget reference is. Agreed. This will be easier if you have "OK" and "Cancel" buttons across the bottom of the screen and want to tell which one got pressed, but if you have an array of 64 buttons (or text boxes, like one of my clients) it might be time to start assigning tags at control creation. Rob ------------------------------------------------------------------------- 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