I am having the dandiest time trying to figure out why my modal form will not close! Using Delphi XE-5 and FireMonkey Mobile App (Android), i followed the the info "ShowModal Dialogs in FireMonkey Mobile Apps"
for demo purposes, i created a new Firemonkey Mobile delphi application and added a secondary firemonkey mobile form. From the main form, i use the code from the article:
procedure TForm1.Button1Click(Sender: TObject);
var
Form2: TForm2;
begin
Form2 := TForm2.Create(nil);
Form2.ShowModal(procedure(ModalResult: TModalResult)
begin
if ModalResult = mrOK then
begin
//
end;
Form2.DisposeOf;
end);
end;
On the secondary form, i assign the "Ok" and "Cancel" buttons modalresult property to "mrCancel" and "mrOK", respectively. However, when the modal dialog is shown, neither button makes the dialog close. I even tried adding onClick events and assigning the modalresult by code. Why wont the form close? I guess I need assurance that I did everthing right and possible its my PHONE (device)?
ShowModal
really isn't modal in the Windows sense. – Ken White