Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Neat feature about Collection Class
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00791053
Message ID:
00791058
Vues:
29
>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?

That is neat, Mark. Thanks for the heads-up.
George

Ubi caritas et amor, deus ibi est
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform