Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can an object know of it's existence?
Message
 
À
02/12/2003 13:33:08
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00855003
Message ID:
00855124
Vues:
26
Hi Jim!

Following Stefan's suggestion, why not try somthing like:
_SCREEN.AddObject("Myclass", "MyObjname")
then you'll be able to reference it by _SCREEN.MyObjname.
IOW, AddObject to a parent object (_SCREEN, Application, etc) that's visible at the application level.

Sorin


>Hi Stefan,
>
>My problem is that I need the variable that holds the object reference internally. The NAME property could have just as easily been a custom property.
>
>In it's simplest form:
>
>ox = CREATEOBJECT("myclass")
>
>I need the "ox" in the INIT.
>
>>In general, the .NAME property is meaningless unless an object is parented, in which case it equals the object's name within the parent. This makes sense since an object can have any number of names but at most one parent.
>>
>>So, if your objects needs a 'global name' then you need some sort of anchor that is itself a global object.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform