Re: Exception in __startup

From: Anders Isaksson (anders.isaksson_at_REMOVEcej.se)
Date: 02/11/05


Date: Fri, 11 Feb 2005 08:45:34 +0100

On Thu, 10 Feb 2005 15:00:40 -0700, Leroy Casterline
<casterle@ccltd.com> wrote:

>
>exception class : EVariantTypeCastError
>exception message : Could not convert variant of type (String) into type
>(Double).

Could it be as simple as a missing .ini file (or Registry entry).
Wouldn't you get this error trying to convert an empty string to a
double?

Or perhaps you are bitten by a locale induced problem? I believe Finland
uses decimal comma, just like us in Sweden, not decimal point as the US
do.

So, maybe your program is trying to convert "3.14159" when Windows is
configured for decimal comma ("3,14159"). It could be a form property
somewhere.

Assuming that any data stored as string *always* contain the decimal
point, in a Delphi program I would make sure that the 'initialization'
part of the main unit contains the following:

  DecimalSeparator := '.'; // This program assumes decimal point
  Application.UpdateFormatSettings := False; // Don't accept changes
while running

What this converts to for BCB, I don't know.

-- 
Anders Isaksson, Sweden
BlockCAD: http://w1.161.telia.com/~u16122508/proglego.htm
Gallery: http://w1.161.telia.com/~u16122508/gallery/index.htm