Hi,

Using fpc 2.1.5 on Mac Intel, I am getting a wierd error on this line:

 Buffers[CurrentBuffer].DrawTo(MainForm.Canvas.Handle, 0,0);

With the following declarations:

 public
   { Public declarations }
   CurrentBuffer : Boolean;
   Buffers: array [Boolean] of TBitmap32;
....

This exception:

TApplication.HandleException Invalid type cast

And this backtrace:

Breakpoint 1, 0x0000e0a6 in fpc_raiseexception ()
(gdb) bt
#0  0x0000e0a6 in fpc_raiseexception ()
#1  0x00056682 in SYSUTILS_RUNERRORTOEXCEPT$LONGINT$POINTER$POINTER ()
#2  0x00010fd7 in SYSTEM_HANDLEERRORADDRFRAME$LONGINT$POINTER$POINTER ()
#3  0x0000cf71 in fpc_class_as_intf ()
#4  0x00027ebf in TMAINFORM__TRANSFORMFRAME (SENDER=0xfb3020,
DONE=true, this=0xf2c810) at MainUnit.pas:359
#5  0x00022bf4 in TAPPLICATION__IDLE (WAIT=true, this=0xfb3020) at
application.inc:299
.....

What kind of typecast is that? I don't see any on the code. And why is
fpc_class_as_intf being executed? I don't see any interfaces being
used.

This code comes from a delphi example application, and I'm a little
lost about what is wrong or how to fix it.

Maybe the sintax array [Boolean] doesn't work and I should substitute
it by something like [0..1]

thanks,
--
Felipe Monteiro de Carvalho
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to