[Gambas-user] Gambas Help - PLEASE - Object Arrays - Need help ASAP
Rob
sourceforge-raindog2 at ...94...
Thu Nov 6 19:54:14 CET 2008
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
More information about the User
mailing list