[Gambas-user] Object names

Benoit Minisini gambas at ...1...
Sat Nov 11 19:28:32 CET 2006


On Friday 10 November 2006 23:18, Christopher Brian Jack wrote:
> On Fri, 10 Nov 2006, Rob wrote:
> > 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.
>
> What about adding a project option: [x] Create Symbol Lookup Class
>
> Implemented as a static class that automagically generates the big long
> list of If's needed to be able to look up names for an object handle and
> make sure the IDE always regenerates it prior to compiling or recompiling.
>
> The only problem is this would also require [x] Make form controls public,
> and that is not a good thing.
>

There is no object name like in VB just because I don't use it, and so I never 
did it. 

But I am not against them, I just never took the time to implement them. I 
will do them for sure, this is planed...

And in Gambas, the compile has a '-g' option, and has all information needed 
for looking up symbols. Just look at the debugger in the svn repository 
version.

Regards,

-- 
Benoit Minisini





More information about the User mailing list