Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can I do this? I keep getting errors?
Message
 
À
04/06/2002 15:27:54
John Baird
Coatesville, Pennsylvanie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00664692
Message ID:
00664702
Vues:
18
>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?

1. Basically it will work if you do something like this:
oCust = CREATEOBJECT("customerInterface.Customer")
oCust.oData = CREATEOBJECT("DataManager.DataManager")
oCust.oData.XXXX()
DEFINE CLASS CustomerInterface AS SESSION OLEPUBLIC
oData = null
ENDDEFINE

DEFINE CLASS DataManager AS SESSION OLEPUBLIC
someproperty = 3
PROCEDURE XXXX
* do something
ENDPROC
ENDDEFINE
2. Nice code box will work if you enclose your code in < pre > < /pre > tags (without spaces in them) :)
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform