Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Releasing windows defined by a form
Message
De
04/09/2007 06:35:15
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
04/09/2007 04:48:37
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
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01252092
Message ID:
01252104
Vues:
14
>Hi,
>
>I have a form, lets call it FormA which defines a window in its init event and release it in its unload event as below
>
>-------------
>init event
>-------------
>Line1:
>DEFINE WINDOW Output ;
> AT 0, 0 Size 39, 60 ;
> IN Desktop ;
> NAME oOutputWin ;
> FONT "Verdana", 11 Style "B" ;
> TITLE "Output display" ;
> FLOAT ;
> GROW ;
> NOMDI ;
> MINIMIZE
>Line2:
>oOutputWin.Name = [frmOutput]
>
>------------------
>unload event
>------------------
>RELEASE WINDOWS Output
>DODEFAULT()
>
>When I run FormA, I use debugger to watch the _SCREEN.FORMS, both reference for FormA and the 'Output' window it defines are present.
>When I close FormA, again from the _SCREEN.FORMS, I find that only FormA's reference is gone, the reference for 'Output' window remains!
>However, if Line2 in the init event is removed both FormA and 'Output' window's reference will be nicely released.
>
>My question (I am very curious),
>Why the line 'oOutputWin.Name = [frmOutput]' will stop the 'Output' window from being released properly in the unload event of FormA?
* init
* define ...
oOutputWin.Name = [frmOutput]
this.AddProperty('oOutputWin',oOutputWin)

* unload
this.oOutputWin.release()
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform