Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
From VFP, what exactly is a Collection from a COM object
Message
From
28/02/2000 22:54:25
 
 
To
28/02/2000 15:32:46
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00338642
Message ID:
00338884
Views:
10
>Hi all (again),
>
>When one creates a reference to an object (say an ASP object, since that is what I am looking at) within VFP the correct way to reference certain values is with this syntax:
>
>
>* For the ASP Request Object passed as param to a COM Server
>cVal = oObj.form("txtBox").Item()
>
>

Bill,

You have to remember that VB has default properties and methods where VFP doesn, so if you are using a VB com object in VFP you have to sepcify the default properties and methods. I think you can get these if you look in the object browser. But, I think the above in VB if you had the same thing in VFP you would have to use...

cVal = oObj.Form.Item('txtBox').Value

I could be off... basically Item is the default method for a VB collection and value or text is generally the default property. THe above I have neve seen with Item tacked on though. The above may be

cVal = oObj.Form.Item('TxtBox').Item().Value

The TxtBox item of the form might be a collection, but it sounds like a control. Is this VB script? You can find alot about this in Ricks Strahls article on calling VFP COM objects from ASP pages.

Good luck...

BOb
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform