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:
00381697
Views:
24
Right, I see what you mean. I was just working on a class that had a property that has to be a number between 0 and 255. The assert checks it being entered incorrectly at design time and the assign handles it at runtime.

Thanks.

>Yes, you can use asserts exactly like that. In my case it's not really as much a "design time" error as it is a safety valve.
>
>>Right, I thought asserts in that case would be better. In your expample you could just:
>>
>>ASSERT RIGHT(This.MyValue, 1) == '\' ;
>> MESSAGE 'Property MyValue must contain the trailing backslash'
>>
>>In the class init. Now it runs when you are developing and you can turn it off when you compile the finished app.
>>
>>Or am I misunderstanding how asserts are used?
Roi
'MCP' Visual FoxPro

In Rome, there was a poem.
About a dog, who found two bone.
He lick the one, he lick the other.
He went pyscho, he drop dead!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform