Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to add a collection to an object in code?
Message
From
13/03/2004 20:14:53
 
 
To
13/03/2004 15:32:55
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00886003
Message ID:
00886036
Views:
14
Hi, Peter-

To add to David's reply, be sure to set the objects so created and assigned to properties to .NULL. The best way, IMO, is to create a subclass of the class itself. So,
ox = Createobject( "MyCustom" )
ox.oCollection = createobject( "collection" )
...

DEFINE CLASS MyCustom AS CUSTOM
  oCollection = .NULL. 
PROCEDURE Destroy()
  THIS.oCollection = .NULL.
ENDPROC
ENDDEFINE
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform