aussage kräftige fehlermeldung:umyMemo.pas(11,43) Fatal: Com

Für Fehler in Lazarus, um diese von anderen verifizieren zu lassen.
Antworten
pluto
Lazarusforum e. V.
Beiträge: 7192
Registriert: So 19. Nov 2006, 12:06
OS, Lazarus, FPC: Linux Mint 19.3
CPU-Target: AMD
Wohnort: Oldenburg(Oldenburg)

aussage kräftige fehlermeldung:umyMemo.pas(11,43) Fatal: Com

Beitrag von pluto »

Hallo,
als ich heute ein projekt complieren woltle bekomme ich folgende fehlermeldung sond kam keine:
umyMemo.pas(11,43) Fatal: Compilation aborted

und zwar in dieser unit:

Code: Alles auswählen

unit umyMemo;
 
{$mode objfpc}
 
interface
 
uses
/  Classes, SysUtils, LResources, Controls, Graphics, Dialogs, ExtCtrls,Tools,lcltype,contnrs,lclintf;
 
type
  TCharItem = class
    Brush:TBrush;
    Pen:TPen;
    Font:TFont;
    sel:Boolean;
    Position,size:TPoint;
    DisplayText:Char;
    ChrBmp:TBitMap;
  end;
 
  TMyMemo = class(TCustomControl)
  public
    TextView:TSTringlist.Create;
    buffer:TBitMap;
    buffer2:TBitMap;
    CT:TPoint;
    start:Boolean;
    CharList:TObjectList;
    TextRect:TRect;
    m:TPoint;
 
    procedure AddCharItem(Stringlist:TSTringList; CharItem:TCharItem);
    function SetSelItem(mx,my,ex,ey:Integer):TPoint;
    procedure StringToCharItem(str:String);
    procedure SettzeBild(index:Integer = -1);
    procedure NewDrawBmp(index:Integer);
 
    constructor Create(AOwner:TComponent;w,h:Integer);
    procedure KeyDown(var Key: Word; Shift: TShiftState);override;
    procedure KeyPress(var Key: char);override;
    procedure MouseDown(Button: TMouseButton;
      Shift: TShiftState; X,Y: Integer);override;
    procedure MouseMove(Shift: TShiftState; X,
      Y: Integer);override;
    procedure MouseUp(Button: TMouseButton;
      Shift: TShiftState; X,Y: Integer);override;
 
    procedure Paint;override;
 
  private
 
  end;
 
implementation
 
constructor TMyMemo.Create(AOwner:TComponent;w,h:Integer);
begin
  inherited Create(AOwner);
 
  TextRect.left:=0; TextRect.top:=0;
  TextRect.Right:=W; TextRect.Bottom:=H;
  Width:=w; Height:=h;
 
  CharList:=TObjectList.Create;
  buffer:=TBitmap.Create;
  buffer.Width:=Width; buffer.Height:=Height;
  buffer.Canvas.FillRect(buffer.canvas.ClipRect);
 
  buffer2:=TBitmap.Create;
  buffer2.Width:=Width; buffer2.Height:=Height;
  buffer2.Canvas.FillRect(buffer2.canvas.ClipRect);
 
 
  textT:=TStringlist.Create;
  TextView:TSTringlist.Create
 
  textT.add('Dies ist ein Test von Heute, Wie geht es dir so ?');
  textT.add('Dies ist ein Test von Heute, Wie geht es dir so ?');
  textT.add('Dies ist ein Test von Heute, Wie geht es dir so ?');
  textT.add('Dies ist ein Test von Heute, Wie geht es dir so ?');
  textT.add('Dies ist ein Test von Heute, Wie geht es dir so ?');
  textT.add('Dies ist ein Test von Heute, Wie geht es dir so ?');
end;
 
procedure TMyMemo.NewDrawBmp(index:Integer);
begin
end;
 
procedure TMyMemo.SettzeBild(index:Integer = -1);
begin
end;
 
procedure TMyMemo.StringToCharItem(str:String);
begin
end;
 
function TMyMemo.SetSelItem(mx,my,ex,ey:Integer):TPoint;
begin
end;
 
procedure TMyMemo.AddCharItem(Stringlist:TSTringList; CharItem:TCharItem);
//var
//  CharItem:TCharItem;
begin
{  CharItem:=TCharItem.Create;
  CharItem.Brush:=TBrush.Create;
  CharItem.Pen:=TPen.Create;
  CharItem.Font:=TFont.Create;
  Charitem.Position:=Point(0,0); Charitem.Size:=Point(0,0);
  Charitem.DisplayText:=char;
  Charitem.ChrBmp:=TBitMap.Create;
 
  Charitem.chrBmp.Canvas.Brush:=Charitem.brush;
  Charitem.chrBmp.Canvas.Pen:=Charitem.Pen;
  Charitem.chrBmp.Canvas.Font:=Charitem.Font;
 
  Charitem.ChrBmp.Width:=Charitem.ChrBmp.Canvas.TextWidth(Charitem.DisplayText)+5;
  Charitem.ChrBmp.Height:=Charitem.ChrBmp.Canvas.TextHeight(Charitem.DisplayText)+5;
  Charitem.chrBmp.Canvas.FillRect(0,0,Charitem.ChrBmp.Width,Charitem.ChrBmp.Height);
  Charitem.ChrBmp.Canvas.TextOut(0,0,Charitem.DisplayText);
  CharList.Add(charitem);
  SettzeBild;}
end;
 
procedure TMyMemo.Paint;
begin
  Buffer.Canvas.TextRect(Rect(0,0,Width,Height),0,0,TextView.Text);
//  Der cuser wird gezeichnet
//  buffer.canvas.pen.color:=clred;
//  buffer.canvas.moveto(ct.x,zi );
//  buffer.canvas.LineTo(ct.x,zi+15);
//  Paintbox1.Canvas.CopyRect(TextRect,buffer.canvas,TextRect)
  inherited Paint;
  Canvas.Draw(0,0,buffer)
end;
 
 
procedure TMyMemo.KeyDown(var Key: Word; Shift: TShiftState
  );
begin
  if (key in [ord('A')..ord('Z')]) or (Key in [ord('a')..ord('z')]) or (shift <> []) or (key = VK_SPACE) then begin
    start:=True;
  end;
end;
 
procedure TMyMemo.KeyPress(var Key: char);
begin
  inherited keypress(key);
  if start = true then begin
    AddCharItem(key);
    Invalidate;
    start:=False;
  end;
end;
 
procedure TMyMemo.MouseDown(Button: TMouseButton;
  Shift: TShiftState; X,Y: Integer);
begin
  inherited MouseDown(button,shift,x,y);
  m.x:=x; m.y:=y;
end;
 
procedure TMyMemo.MouseMove(Shift: TShiftState; X,
  Y: Integer);
begin
  inherited MouseMove(shift,x,y);
  if ssleft in Shift then begin
    SetSelItem(m.x,m.y,x,y);
//    Invalidate;
  end;
  //PaintBox1.Invalidate;
end;
 
procedure TMyMemo.MouseUp(Button: TMouseButton;
  Shift: TShiftState; X,Y: Integer);
begin
  inherited MouseUP(button,shift,x,y);
end;
 
end.
kann mir jemmand sagen was ich falsch gemacht habe ?
MFG
Michael Springwald

Benutzeravatar
theo
Beiträge: 10890
Registriert: Mo 11. Sep 2006, 19:01

Beitrag von theo »

Also was ich auf den ersten Blick sehe:
Du haste einen einfachen Slash nach "uses" vor "Classes"

pluto
Lazarusforum e. V.
Beiträge: 7192
Registriert: So 19. Nov 2006, 12:06
OS, Lazarus, FPC: Linux Mint 19.3
CPU-Target: AMD
Wohnort: Oldenburg(Oldenburg)

Beitrag von pluto »

stimmt ! aber dran hat es nicht gelegen !
alles was nach der fehlermeldung kommmt ist dem complier egal !
und nur bei diesem projekt !
MFG
Michael Springwald

pluto
Lazarusforum e. V.
Beiträge: 7192
Registriert: So 19. Nov 2006, 12:06
OS, Lazarus, FPC: Linux Mint 19.3
CPU-Target: AMD
Wohnort: Oldenburg(Oldenburg)

Beitrag von pluto »

habe die ursache gefunden der fehler lag:
TextView:TSTringlist.Create
das muss so aussehen
TextView:TSTringlist.
ein kleiner schreibt fehler meiner seits *g* ich frage mich aber warum der complier das nicht sagen kann !
MFG
Michael Springwald

Christian
Beiträge: 6079
Registriert: Do 21. Sep 2006, 07:51
OS, Lazarus, FPC: iWinux (L 1.x.xy FPC 2.y.z)
CPU-Target: AVR,ARM,x86(-64)
Wohnort: Dessau
Kontaktdaten:

Beitrag von Christian »

umyMemo.pas(11,43) Fatal: Compilation aborted
Die Fehlermeldung tritt eigentlich nur auf wenn du die compilierung manuell abbrichst
W.m.k.A.h.e.m.F.h. -> http://www.gidf.de/

pluto
Lazarusforum e. V.
Beiträge: 7192
Registriert: So 19. Nov 2006, 12:06
OS, Lazarus, FPC: Linux Mint 19.3
CPU-Target: AMD
Wohnort: Oldenburg(Oldenburg)

Beitrag von pluto »

? wie kann ich den dann manuel abbrechen ? als ich den qullecode fehler beseitig habe konnte ich es problemlos komplieren !
MFG
Michael Springwald

Antworten