Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Didn't know this about collections
Message
From
31/05/2017 04:58:42
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Didn't know this about collections
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
SAMBA Server
Database:
MS SQL Server
Virtual environment:
VirtualBox
Miscellaneous
Thread ID:
01651654
Message ID:
01651654
Views:
109
The collection has a default method, which returns an item. So instead of

?loCol.items("first")

using

?loCol("first")

works the same. Even better, if the returned item is an object, I can call its methods

?loCol("first").SomeMethodCall("with", "parameters")

or set its properties

loCol("first").SomeProperty="Some value"

First I thought I saw it somewhere but wasn't sure if it was a VFP collection or some other language. Then I just thought to try and see if it works - and it does.

The question for the collegium is whether this is using the collection as a fox object or via COM (i.e. is there the overhead), and what are the limitations.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Next
Reply
Map
View

Click here to load this message in the networking platform