AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein GUI-Design mit VCL / FireMonkey / Common Controls Delphi Error: Inkompatible Typen Reguläre Prozedur u Methodenzeiger
Thema durchsuchen
Ansicht
Themen-Optionen

Error: Inkompatible Typen Reguläre Prozedur u Methodenzeiger

Offene Frage von "Real_Thunder"
Ein Thema von BlueStarHH · begonnen am 31. Aug 2007 · letzter Beitrag vom 27. Feb 2008
Antwort Antwort
Benutzerbild von DeddyH
DeddyH

Registriert seit: 17. Sep 2006
Ort: Barchfeld
27.656 Beiträge
 
Delphi 12 Athens
 
#1

Re: Error: Inkompatible Typen Reguläre Prozedur u Methodenze

  Alt 27. Feb 2008, 08:20
Delphi-Quellcode:
Type TExtStrGrid=Class

  SortCol:integer;
  SortDir:integer;

  PicUp:TImage;
  PicDown:TImage;
  LastDummy:boolean;
  SRow:integer;
  mausdown:boolean;
// Function CompareStringGridRows(item1,item2: Pointer):integer;
  Procedure DrawCell(Sender: TObject; ACol, ARow: Integer; Rect: TRect; State: TGridDrawState);
  procedure MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
  procedure SortGrid(thegrid: TStringGrid; const col: integer);

  Constructor Create;
  destructor Destroy;


end;

implementation

..
..
..

Function {TExtStrGrid.}CompareStringGridRows(item1,item2: Pointer):integer;
var c1,c2: ^char;
    n1,n2: integer;
begin
  c1 :=@TStrings(item1).Strings[sortcol][1];
  c2 :=@TStrings(item2).Strings[sortcol][1];
  while (c1^ <>#0) and (c2^ <>#0) do
  begin
    if ((c1^ in ['0'..'9']) and (c2^ in ['0'..'9'])) then
    begin
      n1 :=0;
      n2 :=0;
      while (c1^ in ['0'..'9']) do
      begin
..
..
..

procedure TextStrGrid.SortGrid(thegrid: TStringGrid; const col: integer);
var rows: TList;
    id,i,j: integer;
    tmp: TStrings;
    tmp_row:string;
begin
try
  rows :=TList.Create;
  rows.Capacity :=thegrid.RowCount-thegrid.fixedrows;
  for i:=theGrid.fixedrows to thegrid.RowCount -1 do
  begin
    tmp :=TStringList.Create;
    for j:=0 to thegrid.ColCount-1 do
      tmp.AddObject(thegrid.cells[j,i],thegrid.Objects[j,i]);
      thegrid.Rows[i].Clear;
      rows.Add(tmp);
    end;
    rows.Sort(@CompareStringGridRows); // Hier die Fehlermeldung..
    for i:=thegrid.fixedrows to thegrid.RowCount -1 do begin
Versuch es mal so.
Detlef
"Ich habe Angst vor dem Tag, an dem die Technologie unsere menschlichen Interaktionen übertrumpft. Die Welt wird eine Generation von Idioten bekommen." (Albert Einstein)
Dieser Tag ist längst gekommen
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 17:49 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz