Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Class does not see its parent
Message
De
16/02/2011 10:54:43
 
 
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:
01500403
Vues:
54
This message has been marked as a message which has helped to the initial question of the thread.
>I have another question.
>
>Is there any principal difference between these two approaches:
>
>Parent class
>
>this.oChild = newobject('ChildClass','Classlib.vcx')
>this.oChild.oParent = this
>
>----------------
>And
>
>this.oChild= newobject...
>this.oChild.Initialize(this)
>
>
>Initialize method of the Child class
>
>lparameters toParent
>
>this.oParent = toParent

Not really, but the first approach expects the parent to know where the child stores the reference - am not in favour of this


Third approach = pass the session's reference to the init of the childclass
this.oChild = createObject('ChildClass', m.this)
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform