Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Previous Active object
Message
From
02/08/2001 14:35:06
 
 
To
02/08/2001 12:46:33
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00538416
Message ID:
00539013
Views:
23
>>Right. You would create it as a custom property. Form|Add Property. I'd add it to my form baseclass.
>>
>>If you go this route, please do make sure you set the property to .NULL. in the destroy of the form. If you don't, when you close the form, it won't really release because there will be an orphaned reference to the object in .oLastActive.
>
>Nancy,
>
>PMFJI, but does that mean that any property that holds an object reference needs to be set to NULL in the destroy? That might explain some shutting down issues I've had lately...

Any property that you assign an object to during runtime. Yes. You don't have to do this for ADDOBJECT, for example. The following is my standard class template:
DEFINE CLASS MyForm AS FORM
  MyObjectRef = .NULL.
  PROCEDURE INIT( toPassedObject)
    THIS.MyObjectRef = toPassedObject
  ENDPROC
  PROCEDURE DESTROY()
    WITH THIS
      STORE .NULL. TO .MyObjectRef && I usually have more than 1 ref, so this is a nicely general layout.
    END WITH
  ENDPROC
ENDDEFINE
Previous
Reply
Map
View

Click here to load this message in the networking platform