Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can I do this? I keep getting errors?
Message
De
04/06/2002 16:05:04
John Baird
Coatesville, Pennsylvanie, États-Unis
 
 
À
04/06/2002 15:54:54
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00664692
Message ID:
00664706
Vues:
24
Thanks guys... but I got it working in the meantime....

>John,
>
>You could add a property to the CustomerInteface class and assign an instance of the DataManager to this property. Try something like this:
>
>DEFINE CLASS CustomerInterface AS SESSION OLEPUBLIC
>  *-- object reference
>  oDataMgr = NULL
>
>  PROCEDURE Init
>    *-- instantiate DataManager
>    This.oDataMgr = CREATEOBJECT("DataManager.DataManager")
>  ENDPROC
>
>ENDDEFINE
>
>You can now access public methods and properties of the DataManager with the following syntax:
>
>
>oCust = CREATEOBJECT("customerInterface.Customer")
>oCust.oDataMgr.AnyPublicMethod()
>?oCust.oDataMgr.AnyPublicProperty
>
>
>2. Put your code between < PRE > and < /PRE > tags (without the spaces)
>
>HTH
>>I have:
>>
>>DEFINE CLASS CustomerInterface AS SESSION OLEPUBLIC
>>and
>>DEFINE CLASS DataManager AS Session OLEPUBLIC
>>
>>I can:
>>oData = CREATEOBJECT("DataManager.DataManager")
>>oCust = CREATEOBJECT("customerInterface.Customer")
>>
>>?oData.cDbName
>>?OCust.GetFirstName()
>>
>>but can I create oDAta inside oCust and do this?
>>oCust.oData.XXXX()
>>
>>I keep getting oData is not a valid object error....
>>
>>
>>
>>2. How do you get that code formatted in that nice little white box?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform