Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Send msg from an object's child to grandparent
Message
 
À
23/02/1998 19:50:38
Nancy Folsom
Pixel Dust Industries
Washington, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00080627
Message ID:
00080659
Vues:
27
>My application object (call it oAPP) base class is container. I've added properties for various objects, including a user (aka security) object (call it oActiveUser). So I have a hierarchy (?) like this: oAPP.oActiveUser is an object created like this:
>
>oAPP.oActiveUser = CREATEOBJECT( 'Login' )
>
>Now, in a method for the oActiveUser I want to refer to a parent method like this:
>
>this.parent.SomeCode()
>
>this.Parent is an expression that can't be evaluated.
>
>1. Which hemasphere of my brain is gone?
>2. If neither, than how can I refer generically to the parent?
>3. Is my oApp's property oActiveUser "just" a reference (i.e. pointer) to the CREATEOBJECT object?
>
>TIA.
>(p.s. on the road, searching kb is hard. Sorry!)

Steve is right about using .AddObject if you want to use the code you're specifying. Seems like you could just use oApp.SomeMethod() and have access to it otherwise you will need to use oApp.oActiveUser.SomeMethod()

Steve Despres
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform