Sign in Join

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

Mailing lists / lazarus / 2003-11

Internal error 55665566

5 messages · 5 people ·

Reply by email Subscribe to this list Your subscription

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

Tony Maro

This is pretty cool. Compile the unit below (I put it in a package, but it may do it anywhere) and I get "Internal error 55665566".

If I add "controls" to the uses section, the error vanishes.

unit worldcurrency;
{$mode objfpc}{$H+}
interface
uses
  Classes, SysUtils, stdctrls;
type
  TCurrencySelector = class(TCustomComboBox)
  private
    FFormats: TStringList;
    FCurrencyFormat: String;
    function GetCurrencyFormat: String;
    procedure Populate;
    procedure AddFormat(AName, AFormat: String);
  public
    constructor create(AOwner: TComponent); override;
    destructor destroy;
  published
    property CurrencyFormat: String read GetCurrencyFormat;
    { Expose ancestor properties }
    property Anchors;
    property ArrowKeysTraverseList;
    property AutoDropDown;
    property Ctl3D;
    property DropDownCount;
    property Enabled;
    property Font;
    property ItemHeight;
    property Items;
    property ItemWidth;
    property MaxLength default -1;
    property OnChange;
    property OnChangeBounds;
    property OnClick;
    property OnCloseUp;
    property OnDrawItem;
    property OnDropDown;
    property OnEnter;
    property OnExit;
    property OnKeyDown;
    property OnKeyPress;
    property OnKeyUp;
    property OnMouseDown;
    property OnMouseMove;
    property OnMouseUp;
    property ParentCtl3D;
    property ParentFont;
    property ParentShowHint;
    property ShowHint;
    property TabOrder;
    property TabStop;
    property Text;
    property Visible;
  end;
procedure Register;
implementation
procedure Register;
begin
  RegisterComponents('CheckBook',[TCurrencySelector]);
end;

{ TCurrencySelector }

procedure TCurrencySelector.Populate;
begin
  Self.Items.Clear;
  // data taken from:
  // http://www.thefinancials.com/vortex/CurrencyFormats.html
  AddFormat('Argentina Peso', '$#.###,##');
  AddFormat('Armenia Dram', '#,###.##AMD');
end;
function TCurrencySelector.GetCurrencyFormat: String;
begin
  Result := '';
  if Self.ItemIndex < 0 then exit;
  result := FFormats[Self.ItemIndex];
end;
procedure TCurrencySelector.AddFormat(AName, AFormat: String);
begin
  Items.Add(AName);
  FFormats.Add(AFormat);
end;
constructor TCurrencySelector.create(AOwner: TComponent);
begin
  inherited create(AOwner);
  Style := csDropDownList;
  Text := '';
  Sorted := False;
  FFormats := TStringlist.Create;
  Populate;
end;
destructor TCurrencySelector.destroy;
begin
  FFormats.Free;
end;
end.

Reply by email

Florian Klaempfl
to Tony Maro
Tony Maro wrote
This is pretty cool. Compile the unit below (I put it in a package, but it may do it anywhere) and I get "Internal error 55665566". If I add "controls" to the uses section, the error vanishes.

This is a known issue of 1.0.x it is caused by type aliases or "reexported" properties.

Reply by email

Unknown author
to Tony Maro: This is pretty cool. Compile the unit below (I put it in a package, but it may do it…

Citeren "Vasily I. Volchenko" :

2. What's about "Can not create pipe" error?

As far as I can see and test, it has been fixed.

_____________________________________________________________________ Snel en voordelig ADSL nu voor iedereen bereikbaar. Zon Breedband Budget voor EUR 14,95 per maand. Nu tijdelijk geen aansluitkosten. Bestel snel op zonnet.nl/breedband

Reply by email