Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Make name of Define Window local?
Message
 
 
To
05/03/2015 03:18:21
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01616221
Message ID:
01616281
Views:
36
>>Hi,
>>
>>When I use the code DEFINE WINDOW myWindow, after I am done with using this window I call RELEASE WINDOW myWindow.
>>
>>If I were to declare this variable (e.g. myWindow) LOCAL, before defining the window, do I still need to RELEASE it?
>
>That's only the string with the window name. You may need to play with DEFINE WINDOW myWindow NAME oWindow to get an object reference, which may be local if you declare it so.
>Now whether the window will vanish when oWindow is destroyed, I don't know, but since it's a form anyway, you can just say oWindow.release().

Thank you for the suggestion. I am wondering, though, if you DEFINE the window and do not RELEASE WINDOW, how would you determine if there is still a reference to this object?
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform