Autor Beitrag
blocade
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 23



BeitragVerfasst: Mi 27.07.05 14:41 
ich weißt nich, ob jemand anders das problem auch schon mal hatte. ich weiß auch nciht unter welchem begriff ich es hätte suchen sollen, also mach ich einfach mal einen neuen thread auf.

ich bin gerade dabei ein kleines spiel zu programmieren.
und da wollte ich für die karte eine legende programmieren, welche in einer neuen form angezeigt werden soll.
also hab ich einfach datei -> neu -> formular gemacht. dort ein paar labels etc eingefügt.

jedoch, wenn ich nun das spiel starten will zeigt er folgenden fehler an (direkt beim start!):

Im Projekt Projekt1.exe ist eine Exception der Klasse EClassNotFound aufgetreten. Meldung: 'Klasse TButton nicht gefunden'. Prozess wurde angehalten. Mit einzelne Anweisung oder Start fortsetzten.


hat jemand eine ahnung woran das liegt?
maxk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1696
Erhaltene Danke: 1

Win XP, Debian Lenny
Delphi 6 Personal
BeitragVerfasst: Mi 27.07.05 15:37 
Das liegt wahrscheinlich daran, dass eine Exception der Klasse EClassNotFound mit der Meldung "Klasse TButton nicht gefunden" aufgerufen wird. Für weitere Informationen bitte Glaskugel oder Sourcecode (entscheidene Stücke sind wahrscheinlich die Creates der Forms) verlegen ;)

Gruß,
maxk

_________________
Ein Computer wird das tun, was Du programmierst - nicht das, was Du willst.
blocade Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 23



BeitragVerfasst: Mi 27.07.05 15:49 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
program Project1;

uses
  Forms,
  Ueingabe in 'Ueingabe.pas' {Form1},
  Umapfeld in 'Umapfeld.pas',
  Uspiel in 'Uspiel.pas' {Form2},
  Ugebaeude in 'Ugebaeude.pas',
  Ustadt in 'Ustadt.pas',
  Uspieler in 'Uspieler.pas',
  Umap in 'Umap.pas' {Form3},
  Ukartenlegende in 'Ukartenlegende.pas' {Form4};

{$R *.RES}

begin
  Application.Initialize;
  Application.CreateForm(TForm1, Form1);
  Application.CreateForm(TForm2, Form2);
  Application.CreateForm(TForm3, Form3);
  Application.CreateForm(TForm4, Form4);     <---- das markiert er blau, also k.a. ob es dran liegt, aber is ja irgendwie alles gleich, wie bei den anderen forms auch :D
  Application.Run;
end.





hier noch der code von form4:


ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
unit Ukartenlegende;

interface

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

type
  TForm4 = class(TForm)
    shape_legende_id1: TShape;
    shape_legende_id2: TShape;
    shape_legende_id3: TShape;
    shape_legende_id4: TShape;
    shape_legende_id5: TShape;
    shape_legende_id7: TShape;
    shape_legende_id6u8: TShape;
    label_legende_id1: TLabel;
    label_legende_id2: TLabel;
    label_legende_id3: TLabel;
    label_legende_id4: TLabel;
    label_legende_id5: TLabel;
    label_legende_id7: TLabel;
    label_legende_id6u8: TLabel;
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var
  Form4: TForm4;

implementation

{$R *.dfm}

procedure TForm4.Button1Click(Sender: TObject);
begin
  form4.Hide;
end;

end.






keien ahnung ob ihr noch mehr quellcode gebraucht.
wenn ja, sagt einfach bescheid!
maxk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1696
Erhaltene Danke: 1

Win XP, Debian Lenny
Delphi 6 Personal
BeitragVerfasst: Mi 27.07.05 15:52 
Der Source von Form4 ist ja nicht weiter problematisch. Poste doch mal bitte das, was bei Form1,2,3 in FormCreate steht (falls vorhanden)

_________________
Ein Computer wird das tun, was Du programmierst - nicht das, was Du willst.
Heiko
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3169
Erhaltene Danke: 11



BeitragVerfasst: Mi 27.07.05 15:54 
Der Fehler müsste in Unit3 leigen, da Delphi meistens die Zeile darunter mackiert.
blocade Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 23



BeitragVerfasst: Mi 27.07.05 15:58 
das ist der source-code von der unit, die zu form3 gehört:


ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
unit Umap;

interface

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

type
  TForm3 = class(TForm)
    procedure button_legende_anzeigeClick(Sender: TObject);
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var
  Form3: TForm3;
  karte: array[1..1600] of Tfeld;

implementation

{$R *.dfm}


procedure TForm3.button_legende_anzeigeClick(Sender: TObject);
begin
  form4.show;
end;

end.




ich hoffe das kann weiter helfen :)
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19346
Erhaltene Danke: 1754

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Mi 27.07.05 15:59 
Schließ Delphi und starte es neu, dann öffne das Projekt und zeige in Delphi das Formular aus Unit3 an, dann sollte nach einem neuen Kompilieren das Problem behoben sein.
(Jedenfalls, wenn es das ist, das sich bei mir hinter dieser Meldung verbirgt, wenn diese auftaucht...)
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19346
Erhaltene Danke: 1754

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Mi 27.07.05 16:01 
In dem Source zu Unit3 ist ja gar kein Button drin. Füge mal in alle Units in die uses Klausel die Unit Buttons ein, irgendwo muss wohl ein Button drufsein, diese Unit aber nicht!

Oder lass mal ALLE Formulare in Delphi anzeigen, das könnte das Problem auch schon beheben!


Zuletzt bearbeitet von jaenicke am Mi 27.07.05 16:02, insgesamt 1-mal bearbeitet
Heiko
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3169
Erhaltene Danke: 11



BeitragVerfasst: Mi 27.07.05 16:01 
Oder schicke mal das ganze Programm, falls der Vorschlag von jaenicke nicht funktioniert.


Zuletzt bearbeitet von Heiko am Mi 27.07.05 16:02, insgesamt 1-mal bearbeitet
blocade Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 23



BeitragVerfasst: Mi 27.07.05 16:02 
wenn ich delphi schließe und dann nur form3/unit3 vom projekt öffne, kommt immer noch genau der gleiche fehler :(
blocade Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 23



BeitragVerfasst: Mi 27.07.05 16:07 
ah, jetzt gehts!
hab den button in form3 hinzugefügt (also im source-code).
komisch, weil normal macht der das ja immer automatisch wenn man den button auf die form drauf packt!?
wie dem auch sei, jetzt funktioniert es endlich und ich kann weiter machen!! :)

danke an alle!!

mfg
blocade