Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Defining Methods in Classes for Objects Added at Runtime
Message
De
20/02/2006 12:23:22
 
 
À
20/02/2006 12:16:27
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01096949
Message ID:
01097551
Vues:
16
>Hi Fabio,
>
>>>I still don't see a difference between:
>>>
>>>DEFINE CLASS oC AS CONTAINER
>>>  ADD OBJECT oL AS LABEL
>>>ENDDEFINE
>>>******and:
>>>DEFINE CLASS oC2 AS CONTAINER
>>>  PROCEDURE INIT()
>>>    THIS.ADDOBJECT("oL2","LABEL")
>>>  ENDPROC
>>>ENDDEFINE
>>>
>>>DEFINE CLASS oL2 AS LABEL
>>>ENDDEFINE
>>>
>
>>
>>differences:
>>
>>- the init() sequence
>>- the ZOrder and TabIndex position
>>- as work .RemoveObject(): leave a Zombi with ADD OBJECT
>>
>
>Fair enough. I thought of the first two, the third seems a bug. But my point was that, regardless of which option is used, interaction with instances of the container ar runtime will be the same? FWIW, I tend to use the second way everytime - seems simpler to code, simpler to understand and more flexible. Any good reasons to use the 'ADD OBJECT' approach?
>

1. If you use Class Designer or Form Designer,
they support ADD OBJECT ( mappend on VCX/SCX record ) only.

2. Performance

>Regards,
>Viv
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform