Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Collections not possible in session classes why
Message
From
30/04/2005 10:29:01
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01008791
Message ID:
01009890
Views:
11
>I trie to create a collection in a session based class; but this is not possible; I get an error.
>
>Could someone explain why?

Yes. The Session base class is designed for lightweight encapsulations of private datasessions. To achieve this, it does not support containership (ADD OBJECT, Addobject(), ...). If you need both private datasessions and containership, use Form instead. Ex:
DEFINE CLASS PrivateWithCollection AS Form
  DataSession = 2  && private DS
  ADD OBJECT SomeCollection AS Collection
ENDDEFINE
-- Randy
Previous
Reply
Map
View

Click here to load this message in the networking platform