Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strange Error on .AddProperty
Message
 
 
To
28/02/2009 13:06:15
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01384470
Message ID:
01384790
Views:
49
>>>The error occurs when AddProperty() is called, since it's a new property I am adding and since I pass in the value, there should be no possibility of a data type mismatch, but that is what I get.
>>
>>Yes, I was just thinking about it. I got some weird effects with controls inside the grid long time ago. Is there any way to avoid using AddProperty in your case?
>>
>>BTW, do you have Access or Assign method for Width in some of your controls?
>
>But wouldn't the error (of assigning a date to .width, for example) happen in these methods, and not on the addproperty line?
>Still, you may be into something there. The addproperty() takes arbitrary values, you can assign anything to a property UNLESS it's a built-in property with a specified type and range. Now if it was out of range we'd have a different value. Since Gary has already checked for the .width (being a number), then the remaining thing is to see whether the target property is perhaps defined somewhere as of a different type.
>
>Like I said in the other message, the crucial test would be to rename the property, or at least to try to assign the .width to a property of a different name first.

Yes, trying to use a different name for the property sounds like an idea to try. On the other hand, nOriginalWidth sounds like a very good name already, can you think of something else?
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform