Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Assign method problem
Message
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00381071
Message ID:
00381653
Views:
21
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform