Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2003-02

Strange error

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Mattias Gaertner

Hi all,

I'm trying to port the turbopower internet pro html viewer to lazarus. I use the delphi mode and the fpc 1.0.7 [2003/02/21] for i386. Now there are two strange error messages, and I neither know, what they mean, nor how to get rid of:

iphtml.pas(3662,3) Error: Symbol can't be published, can be only a class
iphtml.pas(3663,1) Error: Symbol can't be published, can be only a class

The lines are:

3656 procedure TIpHtmlNode.ScreenPolygon(
3657       Points : array of TPoint;
3658       const Color : TColor);
3659 var
3660   Pt : TPoint;
3661   i : Integer;
3662   SaveColor : TColor;
3663 begin
3664   for i := 0 to High(Points) do begin
3665     Pt := PagePtToScreen(Points[i]);
3666     Points[i] := Pt;
3667   end;
3668   Owner.Target.Pen.Color := Color;
3669   SaveColor := Owner.Target.Brush.Color;
3670   Owner.Target.Brush.Color := Color;
3671   Owner.Target.Polygon(Points);
3672   Owner.Target.Brush.Color := SaveColor;
3673 end;

and

TIpHtmlNode = class(TPersistent)

Any hints are welcome.

Mattias

Reply by email

Peter Vreman
to Mattias Gaertner
you wrote 9 lines
Hi all, I'm trying to port the turbopower internet pro html viewer to lazarus. I use the delphi mode and the fpc 1.0.7 [2003/02/21] for i386. Now there are two strange error messages, and I neither know, what they mean, nor how to get rid of: iphtml.pas(3662,3) Error: Symbol can't be published, can be only a class iphtml.pas(3663,1) Error: Symbol can't be published, can be only a class

Can you try the 1.1 compiler, it has much more delphi compatiblity fixes.

Peter

Reply by email

Mattias Gaertner
to Peter Vreman
Show quoted text 12 lines
At 11:14 27-2-2003, you wrote: >Hi all, > >I'm trying to port the turbopower internet pro html viewer to lazarus. I >use the delphi mode and the fpc 1.0.7 [2003/02/21] for i386. Now there >are two strange error messages, and I neither know, what they mean, nor >how to get rid of: > >iphtml.pas(3662,3) Error: Symbol can't be published, can be only a class >iphtml.pas(3663,1) Error: Symbol can't be published, can be only a class Can you try the 1.1 compiler, it has much more delphi compatiblity fixes.

I just updated my 1.1. compiler and found a bug. It does not like types like

HDC = type longword;
for methods.

For example:

---------------------------------
unit unit1;
{$mode objfpc}{$H+}
interface
type
  HDC = type longword;
  TMyClass = class
    procedure A(DC: HDC);
  end;
implementation
procedure TMyClass.A(DC: HDC);
begin
end;
end.
---------------------------------

Mattias

Reply by email