SRL Archive - Delphi/FPC Help and Tutorials

Delphi Problem


Daniel

2008-03-14 04:38:22

I am trying to make this delphi application which is an auto talker as my third script. I had saved it, then closed Delphi then re-opened the file and when i press RUN the form's caption is Form1 and it is blank. Here is the code:

unit InstantTalker;

interface

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

type
TForm1 = class(TForm)
Label1: TLabel;
Label2: TLabel;
ComboBox1: TComboBox;
ComboBox2: TComboBox;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
Label8: TLabel;
Edit1: TEdit;
ComboBox3: TComboBox;
ComboBox4: TComboBox;
Label9: TLabel;
Edit2: TEdit;
ComboBox5: TComboBox;
ComboBox6: TComboBox;
Edit3: TEdit;
Edit4: TEdit;
Edit5: TEdit;
ComboBox7: TComboBox;
ComboBox8: TComboBox;
ComboBox9: TComboBox;
ComboBox10: TComboBox;
ComboBox11: TComboBox;
ComboBox12: TComboBox;
Label10: TLabel;
Label11: TLabel;
Label12: TLabel;
CheckBox1: TCheckBox;
Button1: TButton;
Button2: TButton;
Label13: TLabel;
Label14: TLabel;
procedure Exit(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Exit(Sender: TObject);
begin
if(ComboBox1.Text[1]='1') then
begin
Edit2.Visible := False;
Label9.Visible := False;
ComboBox3.Visible := False;
ComboBox4.Visible := False;
Edit3.Visible := False;
Label10.Visible := False;
ComboBox5.Visible := False;
ComboBox10.Visible := False;
Edit4.Visible := False;
Label11.Visible := False;
ComboBox6.Visible := False;
ComboBox11.Visible := False;
Edit5.Visible := False;
Label12.Visible := False;
ComboBox7.Visible := False;
ComboBox12.Visible := False;
end;
if(ComboBox1.Text[1]='2') then
begin
Edit2.Visible := True;
Label9.Visible := True;
ComboBox3.Visible := True;
ComboBox5.Visible := True;
Edit3.Visible := False;
Label10.Visible := False;
ComboBox5.Visible := False;
ComboBox10.Visible := False;
Edit4.Visible := False;
Label11.Visible := False;
ComboBox6.Visible := False;
ComboBox11.Visible := False;
Edit5.Visible := False;
Label12.Visible := False;
ComboBox7.Visible := False;
ComboBox12.Visible := False;
end;
if(ComboBox1.Text[1]='3') then
begin
Edit2.Visible := True;
Label9.Visible := True;
ComboBox3.Visible := True;
ComboBox4.Visible := True;
Edit3.Visible := True;
Label10.Visible := True;
ComboBox5.Visible := True;
ComboBox10.Visible := True;
Edit4.Visible := False;
Label11.Visible := False;
ComboBox6.Visible := False;
ComboBox11.Visible := False;
Edit5.Visible := False;
Label12.Visible := False;
ComboBox7.Visible := False;
ComboBox12.Visible := False;
end;
if(ComboBox1.Text[1]='4') then
begin
Edit2.Visible := True;
Label9.Visible := True;
ComboBox3.Visible := True;
ComboBox4.Visible := True;
Edit3.Visible := True;
Label10.Visible := True;
ComboBox5.Visible := True;
ComboBox10.Visible := True;
Edit4.Visible := True;
Label11.Visible := True;
ComboBox6.Visible := True;
ComboBox11.Visible := True;
Edit5.Visible := False;
Label12.Visible := False;
ComboBox7.Visible := False;
ComboBox12.Visible := False;
end;
if(ComboBox1.Text[1]='5') then
begin
Edit2.Visible := True;
Label9.Visible := True;
ComboBox3.Visible := True;
ComboBox4.Visible := True;
Edit3.Visible := True;
Label10.Visible := True;
ComboBox5.Visible := True;
ComboBox10.Visible := True;
Edit4.Visible := True;
Label11.Visible := True;
ComboBox6.Visible := True;
ComboBox11.Visible := True;
Edit5.Visible := True;
Label12.Visible := True;
ComboBox7.Visible := True;
ComboBox12.Visible := True;
end;
end;

end.

The editor form shows everything but when i press run nothing happens.

hessels92

2008-03-14 04:41:31

hmmm delphi such a bitch u gotta make sure u save all and i sugest not renaming and just making new folder for each project and saving in there…. this prob wont help ur problem but just for future ref

Daniel

2008-03-14 04:48:02

From: hessels92
hmmm delphi such a bitch u gotta make sure u save all and i sugest not renaming and just making new folder for each project and saving in there…. this prob wont help ur problem but just for future ref


You have got to be kidding me? So i have to start all over again?

hessels92

2008-03-14 04:49:57

umm im not sure try open the form file i think cause u have 2 save twice but yea its a bitch i have done that be4 if u have the code u can copy paste

Daniel

2008-03-14 05:38:57

From: hessels92
umm im not sure try open the form file i think cause u have 2 save twice but yea its a bitch i have done that be4 if u have the code u can copy paste
Tried it, didn't work :(