× Discussions for CodeTyphon Object Pascal Programming Language

Question Dynamically open a form

  • Peter Pohlmann
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
3 years 10 months ago #9996 by Peter Pohlmann
Dynamically open a form was created by Peter Pohlmann
Hello Gurus !

I have a problem with CT-ide on a mac OS X ..

I try to create a form dynamically. Works on linux ok but somehow on the mac QT
it gives me trouble. It opens alright the new form.
When I close the new form the application will lock up .

One thing i noticed, if I put the show message () .. in the final section
it works ok, but of course i don't want that message box in there.

procedure TForm2.MenuItem2Click(Sender: TObject);


Form5 := TForm5.Create(Application) ;
try
Form5.ShowModal;
finally
// showmessage('in finally F5');
FreeAndNil(Form5);
end;
end;

Any suggestions ?

Thanks,
Peter

Please Log in or Create an account to join the conversation.

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
More
3 years 10 months ago - 3 years 10 months ago #9997 by Sternas Stefanos
Replied by Sternas Stefanos on topic Dynamically open a form
The problem Sir
is in line

Form5 := TForm5.Create(Application) ;

try this
Form5 := TForm5.Create(nil) ;

PilotLogic Architect and Core Programmer
Last edit: 3 years 10 months ago by Sternas Stefanos.
The following user(s) said Thank You: Peter Pohlmann

Please Log in or Create an account to join the conversation.

  • Peter Pohlmann
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
3 years 10 months ago #9998 by Peter Pohlmann
Replied by Peter Pohlmann on topic Dynamically open a form
Thank you !

Please Log in or Create an account to join the conversation.