Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Releasing Toolbars
Message
De
03/12/1998 17:20:32
 
 
À
18/11/1998 22:47:39
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00158836
Message ID:
00163877
Vues:
26
>Hi Barbara,
>
>I'm not up to 6 yet. So does this mean that oRef=.NULL. is recommended over the UDF Release? I have references to the toolbar from another form, and references of that form in the toolbar.
>
>Thanks in aadvance.
>
>>>Nick,
>>>
>>>>You can add RELEASE method to your toolbar with
>>>>RELEASE this in it.
>>>
>>>Thanks. It works. That's a neat way to get the job done.
>>
>>Keep in mind that this does not always work in VFP6. In VFP3 and VFP5 if you add a method with the same name as an existing method (in another control type) it will behave identically. In other words, 'RELEASE' will release your toolbar. However, this is NOT always true in VFP6.
>>
>>Barbara

I think Barbara may be slightly mistaken as to the suggested technique here. In my base classes, if any VFP class is missing a .Release() method, I add one to my base class with just one line of code:
RELEASE This
In other words, I do not assume that VFP will behave the same way just because I named it the same. This code, on the other hand, will work in all cases that I have found, including VFP 6.

Thanks, incidentally, to Doug Hennig for illustrating that technique to me.
David M. Stowell
Ravenslake Consulting
Chicago, Illinois

e-mail: davidstowell@ravenslakeconsulting.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform