Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi prozedur innerhalb einer klasse (https://www.delphipraxis.net/21979-prozedur-innerhalb-einer-klasse.html)

Pseudemys Nelsoni 10. Mai 2004 23:09


prozedur innerhalb einer klasse
 
hallo :]

Delphi-Quellcode:
Type
  TStatusWindowClass = class
    StatusWindow: TForm;
    StatusBox: TRichEdit;
    StatusTextBox: TEdit;
    procedure CreateStatusWindow;
  end;

sagt mir jemand was an dieser procedure nicht stimmt?

fehler ist:

Zitat:

[Fehler] IRC.pas(13): Ungenügende Forward- oder External-Deklaration: 'TStatusWindowClass.CreateStatusWindow'

Luckie 10. Mai 2004 23:11

Re: prozedur innerhalb einer klasse
 
Hast du sie denn schon irgendwo implementiert im Implementation-Abschnitt?

Pseudemys Nelsoni 10. Mai 2004 23:14

Re: prozedur innerhalb einer klasse
 
jo, hab ich, mit:

Delphi-Quellcode:
procedure TStatusWindowClass.CreateStatusWindow;
begin

end;
geht weder mit noch ohne :(

Luckie 10. Mai 2004 23:17

Re: prozedur innerhalb einer klasse
 
Delphi-Quellcode:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ComCtrls;

type
  TForm1 = class(TForm)
    Edit1: TEdit;
    RichEdit1: TRichEdit;
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

Type
  TStatusWindowClass = class
    StatusWindow: TForm;
    StatusBox: TRichEdit;
    StatusTextBox: TEdit;
    procedure CreateStatusWindow;
  end;

implementation

{$R *.dfm}

procedure TStatusWindowClass.CreateStatusWindow;
begin

end;

end.
Kein Kommentar, geht.

Pseudemys Nelsoni 10. Mai 2004 23:41

Re: prozedur innerhalb einer klasse
 
stimmt, jetzt gehts.
Hatte ausversehen

procedure CreateStatusWindow;
begin

end;

statt:

procedure TStatusWindowClass.CreateStatusWindow;
begin

end;


danke fürs testen :wink:


Alle Zeitangaben in WEZ +1. Es ist jetzt 02:33 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz