Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Class does not see its parent
Message
 
 
À
16/02/2011 11:25:13
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01500327
Message ID:
01500410
Vues:
43
>>>>Hi everybody,
>>>>
>>>>I have a custom class (defined in a program) that has an object property defined like this
>>>>
>>>>oSomeObject = null
>>>>
>>>>In the Init I instantiate this object using
>>>>
>>>>this.oSomeObject = newobject('MyClass','myClasslib.vcx')
>>>
>>>This is parentless instantiation. If you want the object to have a parent
>>>
>>>this.newobject("oSomeObject", "myclass", "myclasslib")
>>
>>Can you do this with the custom parent class? If yes, then it's a simpler solution for my problem.
>
>You can do that with any parent class which is a container, i.e. has .objects - and I was doing this with Custom for years.
>
o=CREATEOBJECT("custom")
>o.AddObject("oBlaBla", "textbox")
>?o.oblaBla.Parent.Name
>
Right, but turned out my class was a session based class which is not a container.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform