Richard R wrote: > Hello. I am making software extension for Caligari's Truespace which > supports values for some physics properties that have a max of > 6.9814636e+012 ( i think that spells out to be 6981463600000) This is > probably a 64 bit type value.
Probably? What does the documentation say it is? If it's an integer type, than it probably is an Int64. If it's a floating-point type, then it might be Single; Single supports 8 significant digits, which is what the number has in scientific notation. Expanding it to an integer type makes up five digits of precision that the original notation didn't have. > I have a custom control called tsxSpinEdit > which is a number editor. I have one for integer type and one for real type. > Even if I change the value type to Currency I still get an EReadError > Invalid property value when it runs. If you just change the type of a class's property, then when the streaming system next reads that property's value form a DFM resource, the data type in the DFM won't match the type of the property. Delete the property value from the DFM, load the DFM in the IDE, and then save it. Now the property should get stored using the format for the new property type. Even without changing the DFM, you could simply load the form in the IDE, press the Ignore button when it displays the EReadError exception message, and then re-save the form. The format should take care of itself. > Is there a way to make delphi > compatible with this value? Any of Delphi's floating-point types should be able to hold the value you mention. Note that Currency is not a floating-point type. It's an Int64 scaled by 10000. > The largest I can use is 2E9 without an error. Exactly 2 billion, or 2147483647? The latter value is the maximum signed 32-bit integer value. -- Rob __________________________________________________ Delphi-Talk mailing list -> [email protected] http://www.elists.org/mailman/listinfo/delphi-talk
