Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
RemoveObject in Init
Message
De
28/02/2001 18:38:15
 
 
À
28/02/2001 09:51:01
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00480229
Message ID:
00480798
Vues:
8
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform