Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Releasing Form Object - Best Practices
Message
From
09/01/2004 12:57:12
 
 
To
09/01/2004 12:27:21
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00865496
Message ID:
00865502
Views:
18
Hi Tracy,

--------------
I typically do the following:

DO FORM e_custcv NAME Oe_custcv LINKED WITH lvchoice
IF UPPER(TYPE('oe_custcv'))="O" .AND. Oe_custcv<>.NULL.
Oe_custcv.VISIBLE=.F.
Oe_custcv.RELEASE()
ELSE
Oe_custcv=.NULL.
RELEASE Oe_custcv
ENDIF

this is not complete because VFP release the form, but m.Oe_custcv is not released:
DO FORM e_custcv NAME Oe_custcv LINKED WITH lvchoice
IF VARTYPE(m.oe_custcv)=="O"
	Oe_custcv.RELEASE
ENDIF
RELEASE Oe_custcv
------------
However, couldn't I simply just do:

DO FORM e_custcv NAME Oe_custcv LINKED WITH lvchoice
RELEASE Oe_custcv

This is good for me because LINKED clause is for do this.

But if it is a Modal form, you can:
On FORMCLASS::Load()
PUBLIC ('m.o'+m.this.name)
STORE m.this TO ('m.o'+m.this.name)

On FORMCLASS::UnLoad()
RELEASE ('m.o'+m.this.name)

On program you simple:

DO FORM e_custcv WITH lvchoice
Fabio
Previous
Reply
Map
View

Click here to load this message in the networking platform