[Gambas-user] Object names

Christopher Brian Jack brian at ...1334...
Fri Nov 10 23:07:46 CET 2006


On Fri, 10 Nov 2006, Rob wrote:

Maybe it's opposed because it would be a useful additional functionality
that would make coding and debugging a lot easier.  Gotta make it obscure
and complicated instead (like the hexadecimal object handles -- those are
just so not helpful for debugging).

The only other thing I can think of is to make a base class inheriting
Object (so it could work for containers and controls) with an extra String
parameter that forces storage of a name when instanciated and provide a
property to retrieve it.  However, becuase the IDE would not be able to
create objects of the class (it wouldn't pass the required parameter), the
form designer would be inop, pretty much making such a debugging class
useless, even as a component.

> 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
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>

.=================================================.
|  Christopher BRIAN Jack aka "Gau of the Veldt"  |
+================================================='
| oevna at ...1544...
`=================================================-
Hi Spambots, my email address is sputnik at ...1334...
Hi Humans, my email address uses rot13 cipher





More information about the User mailing list