Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding object properties at runtime.
Message
De
14/06/1997 17:05:00
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
12/06/1997 10:11:54
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00036082
Message ID:
00036397
Vues:
32
> >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 :)

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform