Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Form controls sometimes invisible
Message
De
10/07/2009 14:36:35
Gary Foster
Pointsource Consulting LLC
Chanhassen, Minnesota, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01409187
Message ID:
01411479
Vues:
55
Christof,
>>Could it be something in the dataenvironment?
All my forms go against SQL Server using SPT and in the case of forms B and C, only do SELECTS to load data. I don't do anything with the dataenvironment in any form in the app.

>>A safer way to find out if a form is releasing is to track Init and Destroy events.
I've put wait windows and sometimes set step on in Load, Init, Release, QueryUnload, Destroy and Unload and no matter how the form is closed, everything fires as expected.

The framework is a Codebook mutant that just instantiates the form class and has a oFormObject.Show() waiting for a Hide() from the form. The forms may set a property that gets looked at after the Show() and then the form object is released. It's likely that the form isn't REALLY being released, but I don't know what to do about it that I haven't already done. What I'm doing now is to set a public variable(which I hate to use) and then explictly release the form in a commad button click() and override the framework QueryUnload method, which only calls a method that determines whether to set a form property and then Hide()s the form so the code can drop out of the Show().

Gary


>Hi Gary,
>
>>1. The forms seem to be really releasing, i.e., _screen.forms increments and decrements as it’s supposed to. When a form is released the _screen.formcount goes down and the name disappears from the _screen.forms collection.
>
>A safer way to find out if a form is releasing is to track Init and Destroy events. When an object remains in memory in almost all cases its Destroy event is not firing. Dangling references can be the result of FOR EACH loops on a collection without the FOXOBJECT clause,.
>
>>2. The problem form has a pageframe with nested containers and controls, but even removing the entire pageframe makes no difference in the behavior
>
>Could it be something in the dataenvironment? Maybe some form is locking a record and not releasing the lock which - for some unknown reason - confuses VFP. Other than that my only idea would be to remove one piece of the standard framework at a time until the form behaves properly.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform