Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Neat feature about Collection Class
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Neat feature about Collection Class
Miscellaneous
Thread ID:
00791053
Message ID:
00791053
Views:
46
I am using the new collection class to manage forms in an app. In the Init of my form baseclass, I am calling a method in my goApp object that adds the form to the goApp.FormList collection object --
goApp.AddForm(THIS)
In the AddForm method, the pertinent lines of code are:
LPARAMETER toForm
...
THIS.FormList.Add(toForm, transform(toForm.hWnd))
Now I have an object reference to every running form in the app in this collection. In the past, if you had something holding an object reference to a form, you would have to set that object reference to null before the form could be completely released [dangling object ref]. This is NOT so with the collection object. When the form is released, that form's item in the collection object is automagically removed when the form goes bye-bye.

Cool, eh?
Mark McCasland
Midlothian, TX USA
Next
Reply
Map
View

Click here to load this message in the networking platform