Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Strange Error on .AddProperty
Message
De
01/03/2009 10:50:01
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01384470
Message ID:
01384824
Vues:
43
>>>>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?

nSavedWidth, nSalvagedWidth, nNotTooOriginalWidth, nWidthBefore, nPreviousWidth, nPriorWidth, nHistoricalWidth, nBaroqueWidth...

Oh, I meant to lose the underscore.

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
Répondre
Fil
Voir

Click here to load this message in the networking platform