Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Assign method problem
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00381071
Message ID:
00381653
Vues:
17
Roi,

Not really, if you want the Assign method to validate something that was done via the property sheet, you must set the property to itself in the Init() method. You want this done at design and run time.

I for example have a path property of a class, I want to ensure that my class code can always just lcFile = this.cPath + this.cFilename. So the cPath assign does the addbs(). If the cPath set on the prop sheet doesn't have the terminal \ there's a runtime error because the assign was not triggered during object construction. Assigning the property to itself in Init() gets around the problem. I ER'd this a long time ago to MS already, property sheet assignments should respect the Access/Assign methods.

>Wouldn't an assert get around that? The assert won't run in the finished app, right?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform