Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Referencing Objects...IDEAS?
Message
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00167801
Message ID:
00167866
Views:
20
Terry,

The leftover .null. are basically a non-issue. Depending on how you structure your app there may never be more than one publicly visible form object. If you launch other forms from method code of a main form with a simple do form xyz the forms don't have an associated memory variable. You can use the _screen.Forms[] collection to get at the forms, or use/develop a more sophisticated framework that has a forms manager class.

>Great. Now, let's say I want to create an object all on its own, and have it remain in memory after the function or procedure is gone (whether or not it can be referenced or not is not important to me, as the object takes care of itself...it is a form). The obvious way to do this is to create a PUBLIC variable and point that to the object so it never goes out scope. Great. But then when the form object closes itself through the "Close" button, my reference is still there, set to .NULL. This is undesirable. I would like to be able to create objects completely on their own, with no references to them (I don't need to reference them, they each do their own thing).

>Bottom line: Can I have a form be created (and stay created) without having a public reference to it?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform