> Greetings All,
>
[quoted text clipped - 44 lines]
>
> Steve
You have to name it yourself. For example, you can create private similarly
named string constants in each class and assign them a name. Or you can
create read-only property (e.g. Name), where you can return hard-coded name
(or return constant mentioned before). Main point - there is nothing ready -
you must do it.
For public classes there is, possibly, a way by using one of techniques,
which read type lib info, but I don't think this complication is of lesser
"weight" then the one above.
Dmitriy.
Dmitriy Antonov - 27 Oct 2006 05:47 GMT
>> Greetings All,
>>
[quoted text clipped - 56 lines]
>
> Dmitriy.
Oops, sorry. I forgot about obvious and simple solution:
TypeName(Me)
Dmitriy.
canoe414@telecom-digest.zzn.com - 27 Oct 2006 07:32 GMT
> >> Greetings All,
> >>
[quoted text clipped - 62 lines]
>
> Dmitriy.
canoe414@telecom-digest.zzn.com - 27 Oct 2006 08:00 GMT
> Oops, sorry. I forgot about obvious and simple solution:
>
> TypeName(Me)
I see how this will return the name of the class which makes up an
instance of the object.
But I need the inverse - something that will tell me the name of the
instance from within the object.
I can see how to do it manually, I figured there must be an easier way
for an instance of an object to reference itself.
Thx,
Steve
Dmitriy Antonov - 27 Oct 2006 15:28 GMT
>> Oops, sorry. I forgot about obvious and simple solution:
>>
[quoted text clipped - 11 lines]
>
> Steve
In this case you must do it yourself. There is no such thing as an "instance
name". The name of variable, which currently holds an object, is not a good
candidate and even if so, it doesn't exist at run time - it is just an
address in a compiled executable.
Dmitriy.