[fpc-devel] Error: Argument can't be assigned to

Graeme Geldenhuys graemeg.lists at gmail.com
Fri May 25 11:45:11 CEST 2007


Hi,

I thought I would try out FPC 2.3.1 (Revision: 7448) and compile
fpGUI.  Compiling fpGUI with 2.0.5 and 2.1.3 works 100%

Compiling it with FPC 2.3.1 (Revision: 7448) using

ppc386 -S2cgi -OG1 -gl -vewnhi -l -Fu../ -Fu. -FUlib/i386-linux/
fpgfxpackage.pas

..I get the following errors.  Any ideas why?

fpGUI/gfx/x11/gfx_x11.pas(798,8) Error: Argument can't be assigned to

--------- code where error occurs  ---------------
  case Attr.Depth of
    1: PixelFormat.FormatType := ftMono;    //  <-- line 798
    4: PixelFormat.FormatType := ftPal4;
    8: PixelFormat.FormatType := ftPal8;
    16: PixelFormat.FormatType := ftRGB16;
    24: PixelFormat.FormatType := ftRGB24;
    32: PixelFormat.FormatType := ftRGB32;
    else
      raise EX11Error.CreateFmt(SWindowUnsupportedPixelFormat, [Attr.Depth]);
  end;

------------------  end -------------------------

PixelFormat and FormatType are defined as follows....


// PixelFormat instance is defined here
TFCustomCanvas = (TObject)
....
public
    property    PixelFormat: TGfxPixelFormat read FPixelFormat;
...
end;


  TGfxImageType = (
    ftInvalid,
    ftMono,		// Monochrome
    ftPal4,		// 4 bpp using palette
    ftPal4A,		// 4 bpp using palette with alpha values > 0
    ftPal8,		// 8 bpp using palette
    ftPal8A,		// 8 bpp using palette with alpha values > 0
    ftRGB16,		// 15/16 bpp RGB
    ftRGBA16,		// 16 bpp RGBA
    ftRGB24,		// 24 bpp RGB
    ftRGB32,		// 32 bpp RGB
    ftRGBA32);	        // 32 bpp RGBA


  TGfxPixelFormat = record
    FormatType: TGfxImageType;
    RedMask: TGfxPixel;
    GreenMask: TGfxPixel;
    BlueMask: TGfxPixel;
    AlphaMask: TGfxPixel;
  end;



-- 
Graeme Geldenhuys

General error, hit any user to continue.



More information about the fpc-devel mailing list