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 16:41:11
 
 
To
28/02/2000 16:23:05
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00338642
Message ID:
00338704
Views:
12
I hadn't thought of that (using Access)....interesting use of the method, Erik.

>It's fairly easy by creating an Access method for your array. In the access method, if the index passed is a character expression, use the expression to find a member object, and return a reference to it. This type of set up is only distinguishable from a real collection in one way- FOR EACH does not work on it, unless the array REALLY is an array of object references.

>Bill- we cannot build real collections in VFP, this is as close as we can get. Working with collections defined by VFP or another COM server is no problem though.
>
>
>>The equivalent would be an object's collection in VFP. You can create them by adding a property with array elements, like MyCollection[10]. Now what's going to be a bear here is that I don't see a way to directly prototype
cVal = oObj.form("txtBox").Item()
>>
>>
>>>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()
>>>
>>>
>>>What exactly is form("txtBox") in this case? A Collection? That's what it would be called in VB(I think), but what are we seeing from a VFP point of view? Is it a method call? an array? A Collection Object? More importantly can it be emulated in a custom VFP class?
>>>
>>>This is related to my earlier post #338620 Concerning the ASP objects. I need to emulate one for a test, and if I can't get the real thing, I could create an object that mimics it, but the above syntax is getting in the way.
>>>
>>>Any ideas are greatly appreciated,
>>>
>>>TIA,
>>>Bill Caputo
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Previous
Reply
Map
View

Click here to load this message in the networking platform