Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Referencing a parent's object
Message
 
 
À
27/08/2007 13:04:02
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
01250681
Message ID:
01250691
Vues:
14
>>>This is simplified, but oSock and oHandler are on the same level under the oxServer class. In oHandler is the Acknoledgement procedure that needs to know the current status of the port, which is in oSock. How do I make that reference? This.Parent doesn't seem to work as the oHandler is created before oxServer.
>>>
>>>
>>>
>>>oxServer
>>>   oSock
>>>      State
>>>   oHandler
>>>     Acknowledgement procedure (needs to know value of oSock.State)
>>>
>>
>>Are you adding oHandler to oxServer? In other words, what is the code instantiating oHandler and oSock?
>
>
>oxHandler = CREATEOBJECT( "EMPS_Handler_Medinotes_Class" )
>oxServer = CREATEOBJECT( "EMPS_Server_Class",m.Port,oxHandler )
>
So you're passing an object reference of oxHandler to oxServer? Where do you save this object reference? From oxServer you would be able to access oxHandler through this.oxHandlerReference (what is the name of the object property you're saving the oxHandler reference?)
If it's not broken, fix it until it is.


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

Click here to load this message in the networking platform