[Gambas-user] Object names

Rob sourceforge-raindog2 at ...94...
Fri Nov 10 22:31:34 CET 2006


On Friday 10 November 2006 16:11, Christopher Brian Jack wrote:
> I still do not have a way to get the IDE names assigned to
> objects as indicated below and I did not get a worable
> response.  Can someone look at this again and tell me how it
> is done?

It can't be done currently, and as far as I can tell it's by 
design.  I wish there were a .name property on every object, 
because there is a lot of legacy VB code that's a pain to 
convert without it.

You have to do something like this:

> PUBLIC SUB SomeSub(client as Control)

If client = SomeTextBoxOnMyForm
	...
End If

> END

Unfortunately, this isn't useful for debugging, and the solution 
is to use tags or other kludges.  Seeing as how we can name 
event handlers using strings at run time using Object.Attach, 
meaning symbol names are never completely stripped out, I can't 
understand the opposition to getting control names at run time 
too.

Rob




More information about the User mailing list