Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding object properties at runtime.
Message
De
16/06/1997 09:02:21
 
 
À
14/06/1997 17:05:00
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00036082
Message ID:
00036498
Vues:
37
>> >If there is no such way, does anyone know of a workaround, besides
>> defining the properties before loading the class?
>>
>> Personally, I prefer to have class property-array as a place to store
>> undetermined number of 'properties' (array is resizeble, isn't it?).
>
>Yes, but that's exactly the reason we use properties instead of arrays -
>array members are accessed by index number, and properties by name. I
>have had a similar question for adding methods to a form
>programmatically (from, say, a builder or a conversion routine), and
>have written to m$.foxwish (or whatever the name was), and got nothing
>back, unless a serial form message is something.
>
>I think the whole idea was to have properties (pre)designed, and that
>adding properties at runtime could lead to... er, unpredictable results.
>Besides, checking every time if a property exists is a kind of
>toothache.
>
>See I've been a nice boy and didn't ask you what do you need it for :)

You would be even nicer if checked first who posted the question.
Edward Pikman
Independent Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform