Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dangling reference
Message
 
 
À
30/05/2002 13:42:42
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00663016
Message ID:
00663127
Vues:
25
>>>Hi Nadya,
>>>
>>>do you mean, you're adding an object to _SCREEN or to the form?
>>>
>>>Armin
>>>
>>>>I found, that if form has a private DS and in the life of the form we add some object to the screen, the Form's datasession remains open after form is closed...
>
>I've noticed the things happening the other way around: any object's method will run in the datasession in which the object was created. It seems you've found the connection from the other end: any datasession will stay alive as long as there's any object which would want to run in it. There seems to be an implicit reference here.
>
>>It's a program by Rick Bean, which simulates timeout messagebox in VFP6. In the program code the timer object is added to the screen. This somehow caused form's DS to remain open. Yesterday in the everning I logged through PCAnywhere and tried few approaches to remove reference, but got errors. So finally I got rid of _screen at all and release the variable, which holds the object reference at the end of the program. This fixed the problem.
>
>>However, the point of adding this object to the screen, as I understand it, was to not instantiate the object again, if it was already added. Anyway, Init doesn't take much time, so I guess, it was the best approach to take.
>
>I think you could still addobject() it to _screen, as long as you Set DataSession to 1 just before that, or you could add it sometime early in the application before you show any form (and thus all the code still lives in DataSession 1).

It's an interesting idea. I will try to experiment with it later, since the program already fixed...

Ok, now time to stop reading UT and back to Data Entry form :)
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform