Autor Beitrag
JayEff
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2971

Windows Vista Ultimate
D7 Enterprise
BeitragVerfasst: Fr 07.01.05 00:36 
Ich bekomme beim laden meines Projekts in Delphi folgende Fehlermeldung:
user defined image
Was soll ich tun? Ich habe in der Projektdatei den Aufruf von CreateForm verändert, und ich vermute auch dass daran der Fehler liegt, aber wie bekomme ich mein Projekt wieder geladen??? Hier der Inhalt der .dpr datei..
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
program Matrix;

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

{$E scr}

{$R *.res}

var
  str:string;
begin
  Application.Initialize;
  Str := Copy(ParamStr(1), 12);
  if Str = '/c' then Application.CreateForm(TForm2, Form2)
  else Application.CreateForm(TForm1, Form1);
  Application.Run;
end.


(wie man erkennen kann ist es ein Bildschirmschoner ^^)

edit: Achja: die Datei wird auch sicher nicht geladen: ich kann unter Ansicht/Formulare oder so nichts anzeigen lassen.

_________________
>+++[>+++[>++++++++<-]<-]<++++[>++++[>>>+++++++<<<-]<-]<<++
[>++[>++[>>++++<<-]<-]<-]>>>>>++++++++++++++++++.+++++++.>++.-.<<.>>--.<+++++..<+.
IngoD7
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 629


D7
BeitragVerfasst: Fr 07.01.05 12:37 
Titel: Re: "Fehler im Modul: Der Aufruf von Application.Create
Also:

Herr von und zu Delphi akzeptiert in der Projektdatei kein Application.CreateForm() ohne Semikolon dahinter. Frag nicht, warum. Die Anweisung hinter then macht also den Ärger.

Herr von und zu Delphi mag aber natürlich auch kein Semikolon vor einem else.

Daher würde ich jenes machen:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
begin
  Application.Initialize;
  Str := Copy(ParamStr(1), 12);
  if Str = '/c' then 
     begin 
     Application.CreateForm(TForm2, Form2); 
     end
  else 
     begin 
     Application.CreateForm(TForm1, Form1); 
     end;
  Application.Run;
end.


Das begin .. end hinter else brauchst du nicht unbedingt, aber wer weiß, was du noch alles da vorhast ... :P
JayEff Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2971

Windows Vista Ultimate
D7 Enterprise
BeitragVerfasst: Fr 07.01.05 18:44 
also das is ja wohl nich die ... sc.. bug hey.. oO

_________________
>+++[>+++[>++++++++<-]<-]<++++[>++++[>>>+++++++<<<-]<-]<<++
[>++[>++[>>++++<<-]<-]<-]>>>>>++++++++++++++++++.+++++++.>++.-.<<.>>--.<+++++..<+.
IngoD7
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 629


D7
BeitragVerfasst: Fr 07.01.05 20:38 
JayEff hat folgendes geschrieben:
also das is ja wohl nich die ... sc.. bug hey.. oO
Heißt was genau?
JayEff Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2971

Windows Vista Ultimate
D7 Enterprise
BeitragVerfasst: Fr 07.01.05 20:48 
sc... steht für sch_eiss und bug kennst du, oder? ich finde,dass das ein Bug ist, dass hinter Application.CreateForm() ein ; sein muss.

_________________
>+++[>+++[>++++++++<-]<-]<++++[>++++[>>>+++++++<<<-]<-]<<++
[>++[>++[>>++++<<-]<-]<-]>>>>>++++++++++++++++++.+++++++.>++.-.<<.>>--.<+++++..<+.
IngoD7
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 629


D7
BeitragVerfasst: Fr 07.01.05 21:11 
JayEff hat folgendes geschrieben:
sc... steht für sch_eiss und bug kennst du, oder? ich finde,dass das ein Bug ist, dass hinter Application.CreateForm() ein ; sein muss.


Und die ersten drei Punkte standen für "Möglichkeit", nehme ich an. :roll: Mööönsch, ich wollte wissen, ob es hingehauen hat. Naja, nehme mal an, dass dem so ist.

P.S.: Ich denke übrigens auch, dass das ein Bug ist.
JayEff Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2971

Windows Vista Ultimate
D7 Enterprise
BeitragVerfasst: Sa 08.01.05 04:16 
da ich den thread als beantwortete Frage gekennzeichnet habe, JA es hat geklappt :D

_________________
>+++[>+++[>++++++++<-]<-]<++++[>++++[>>>+++++++<<<-]<-]<<++
[>++[>++[>>++++<<-]<-]<-]>>>>>++++++++++++++++++.+++++++.>++.-.<<.>>--.<+++++..<+.
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Sa 08.01.05 04:38 
Titel: Re: "Fehler im Modul: Der Aufruf von Application.Create
IngoD7 hat folgendes geschrieben:
Herr von und zu Delphi akzeptiert in der Projektdatei kein Application.CreateForm() ohne Semikolon dahinter. Frag nicht, warum. Die Anweisung hinter then macht also den Ärger.

Gilt in der Projektdatei nicht: vor else kein Komma? :gruebel: Ich habe eher ein Problem damit, dass wenn Form1 die hauptform ist und die if-Abfrage nicht zu trifft, dass dann kein Hautpformular existiert.
IngoD7
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 629


D7
BeitragVerfasst: Sa 08.01.05 12:57 
Titel: Re: "Fehler im Modul: Der Aufruf von Application.Create
Luckie hat folgendes geschrieben:
IngoD7 hat folgendes geschrieben:
Herr von und zu Delphi akzeptiert in der Projektdatei kein Application.CreateForm() ohne Semikolon dahinter. Frag nicht, warum. Die Anweisung hinter then macht also den Ärger.

Gilt in der Projektdatei nicht: vor else kein Komma? :gruebel:

Doch das gilt. Aber gemeinsam mit nach Application.CreateForm() immer ein Semikolon kam es zum Problem. Die "Semikolon-Pflicht" ist der Bug. Das "kein Semikolon vor else" ist normal. Beides gemeinsam hat sich gebissen.


Luckie hat folgendes geschrieben:
Ich habe eher ein Problem damit, dass wenn Form1 die hauptform ist und die if-Abfrage nicht zu trifft, dass dann kein Hautpformular existiert.
Hauptform ist doch immer das erste wirklich erzeugte Formular, oder nicht? Das ist dann hier durchaus mal Form2.
tommie-lie
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 4373

Ubuntu 7.10 "Gutsy Gibbon"

BeitragVerfasst: Sa 08.01.05 13:18 
Es lässt sich aber auch weiterhin ohne Semikolon kompilieren.
Und wer es debuggen will, kann folgenden Workaround verwenden:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
procedure MyCreateForm(FormClass: TFormClass; var Reference);
begin
  Application.CreateForm(FormClass, Reference);
end;

begin
  Application.Initialize;
  if Condition then
    MyCreateForm(TForm1, Form1)
  else
    MyCreateForm(TForm2, Form2);
  Application.Run;
end.

_________________
Your computer is designed to become slower and more unreliable over time, so you have to upgrade. But if you'd like some false hope, I can tell you how to defragment your disk. - Dilbert
IngoD7
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 629


D7
BeitragVerfasst: Sa 08.01.05 14:23 
tommie-lie hat folgendes geschrieben:
Es lässt sich aber auch weiterhin ohne Semikolon kompilieren.
Und wer es debuggen will, kann folgenden Workaround verwenden:


Och, da finde ich meinen Vorschlag mit begin..end um die Anweisung (mein erstes Posting oben im Thread) aber irgendwie einfacher. :)
tommie-lie
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 4373

Ubuntu 7.10 "Gutsy Gibbon"

BeitragVerfasst: Sa 08.01.05 14:27 
IngoD7 hat folgendes geschrieben:
Och, da finde ich meinen Vorschlag mit begin..end um die Anweisung (mein erstes Posting oben im Thread) aber irgendwie einfacher. :)
Aber meins ist kürzer... hmm... nee, auch nicht.
Naja, meins ist von mir :mrgreen:

Im Ernst, deins wäre sogar schneller, weil bei dir kein Prozedur-Overhead mehr vorkommt, das Assembler-Resultat ist also bei dir "direkter" als bei mir. Aber meins ist für die Übersichts-Fetischisten, die bei einzelnen Befehlen in if-Abfragen ums Verrecken kein begin und end setzen möchten ;-)

_________________
Your computer is designed to become slower and more unreliable over time, so you have to upgrade. But if you'd like some false hope, I can tell you how to defragment your disk. - Dilbert
IngoD7
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 629


D7
BeitragVerfasst: Sa 08.01.05 14:38 
tommie-lie hat folgendes geschrieben:
Aber meins ist kürzer... hmm... nee, auch nicht.
Naja, meins ist von mir :mrgreen:

:mrgreen: *gröööhl* :D
JayEff Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2971

Windows Vista Ultimate
D7 Enterprise
BeitragVerfasst: Sa 08.01.05 17:11 
tommie-lie hat folgendes geschrieben:
Es lässt sich aber auch weiterhin ohne Semikolon kompilieren.

Kompilieren schon, nur wenn man die Projektdatei LADEN will, dannnnnnn wirds Problematisch... ^^

_________________
>+++[>+++[>++++++++<-]<-]<++++[>++++[>>>+++++++<<<-]<-]<<++
[>++[>++[>>++++<<-]<-]<-]>>>>>++++++++++++++++++.+++++++.>++.-.<<.>>--.<+++++..<+.