Autor Beitrag
soisseteben
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 111

Win XP
D7
BeitragVerfasst: Sa 07.10.06 18:11 
hi,
Wenn ich den Name einer Formularklasse ändere, bekomme ich immer die Fehlermeldung: "Deklaration der Klasse ***** fehlt oder ist fehlerhaft". D.h. das passiert, wenn ich das Formular und die Klasse über den "Neues Formular"-Button erzeuge. Mache ich das "von Hand" in einer extra Unit kann ich die Klasse benennen wie ich will. Wie man bei bequem erzeugten Formularen den Klassennamen ändern?

Hier mein Code, der den Fehler produziert. Dabei hab ich aus "Form1" "Formx" gemacht:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
type
  TFormx = class(TForm)
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var
  Form1: TFormx;


ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
program Project1;

uses
  Forms,
  Unit1 in 'Unit1.pas' {Form1};

{$R *.res}

begin
  Application.Initialize;
  Application.CreateForm(TFormx, Form1);
  Application.Run;
end.


Danke schonmal!

_________________
„Wer nur nach dem Zweck der Dinge fragt, wird ihre Schönheit nie entdecken.“ - (Halldór Laxness)
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Sa 07.10.06 19:04 
Du mußt auch die Bezeichnung in der Formulardatei (dfm) ändern.

_________________
Markus Kinzler.
soisseteben Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 111

Win XP
D7
BeitragVerfasst: Sa 07.10.06 19:29 
Ahh, Danke für die wie immer kurze, rpägnante Hilfe. :flehan:

_________________
„Wer nur nach dem Zweck der Dinge fragt, wird ihre Schönheit nie entdecken.“ - (Halldór Laxness)