Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
RemoveObject in Init
Message
From
28/02/2001 18:38:15
 
 
To
28/02/2001 09:51:01
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00480229
Message ID:
00480798
Views:
9
Hi Daniel,

Could you send me the code which failed this technique? I would like to investigate the cause of this behavior.

Glenn

>Glenn:
>
>>>>>>
>I cannot explain why in the VFP model why during instanciation you cannot remove an object but I can offer a work around.
>
>According to Drew Speedie, to properly instanciate forms in VFP follow LISAG (Load,Instanciate,Show,Activate,Gotfocus). If in the Activate event you test for the presence of this object and if it exists removeit eg.
>
>Form::Activate
>if type('this.badobject') = 'O'
>this.removeobject('BadObject')
>endif
>
>you will successfully accomplish your objective.
>>>>>>
>
>I just tried Drew's idea to remove the object in the Activate event and it ain't working! This.BadObject is still an object whose properties cannot be evaluated. It's comforting that this workaround fails because some objects don't have an Activate event in which I could put the code.
>
>I guess I wil be checking for Type('Thisform.BadObject.Name') = 'C' from now on...
>
>Thanks for the help,
>
>Daniel
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform