reopen mdichild result sigsegv error
Original Reporter info from Mantis: hawkeye
-
Reporter name: andre christian
Original Reporter info from Mantis: hawkeye
- Reporter name: andre christian
Description:
I had tried to open mdichild with code. it worked well at first time, then i close the form with OnClose event and wrote CloseAction := cafree.
Then i tried to open the same but unfortunately it result error on SIGSEGV.
I put my code below (which used to create mdichild). I always use this code on delphi 7 everytime and always works.
procedure TfrmMain.CreateMDIChild(frm : TFormClass; var form: TForm);
var
i:integer;
bCreated:boolean;
begin
bCreated:=False;
for i:= 0 to MDIChildCount-1 do
begin
if MDIChildren[i] is frm then
begin
form:=MDIChildren[i] as frm ;
jmlform := i;
bCreated:=True;
Break;
end;
end;
I had tried this on windows 7 and ubuntu 12.04 with lazarus 1.0.4
if not bCreated then
begin
form := frm.Create(Application);
form.Show;
end
else form.Show;
end;
Mantis conversion info:
- Mantis ID: 23801
- OS: windows 7, ubuntu 12.04
- Platform: windows,linux
- Version: 1.0.4