3

Delphi 10.2 Tokyo, firemonkey framework.

I am experiencing a weird issue with Mac OSX and file dialogs.

I have a form, lets say "Form1". This form open another form "Form2" modal via a buttonclick. "Form2" has a button, which open a file dialog (for example selectdirectory, or NSOpenPanel etc.), and when I close this file dialog, "Form2" will move iun z-order behind the main form, stays active, and cannot brought back to front. This happen only on Mac, not with Windows as target platform.

I first thought that I might have something somewhere in my code causing that, so I created a new test project, with the 2 forms I mentioned, and it does exactly the same.

What am I doing wrong? Is there something I need to take care of on Mac OSX regarding file dialogs?

Here you see the settings dialog in the background, above the main form. The settings dialog has a button, which calls SelectDirectory(...), all is normal so far.

enter image description here

When I now close the file dialog, the Settings form moves behind the main form, stays active, and I cannot bring the form back to front.

enter image description here

  • I have a similar problem, with C++ Builder Berlin. – Anthony Burg Jun 27 '17 at 23:04
  • Form1 opens Form2 modally, Form2 opens Form3 modally, Form3 opens Form4 modally. Close Form4. Now Form2 is in front, while Form3 is still active. Only happens on macOS, not Windows. Explicitly calling Form3's Show() after Form4 closes doesn't bring Form3 to the front. – Anthony Burg Jun 27 '17 at 23:06
  • Note I only get this bug going from Form3 -> Form4 and then closing. If I only open up to Form2 -> Form3, then close Form3, it works properly. – Anthony Burg Jun 27 '17 at 23:55
  • Maybe this has to do with the modal dialogs problem referenced in this link http://quabr.com/28135592/showmodal-form-that-opens-nsopenpanel-is-force-closed-in-delphi-firemonkey-osx – Mike Dixon Jun 28 '17 at 11:33
  • 1
    I have faced this same issue with FMX in 10.2 Tokyo - it looks like a bug. See https://quality.embarcadero.com/browse/RSP-18103 and https://quality.embarcadero.com/browse/RSP-17765 – Rohit Jun 30 '17 at 05:18
  • Workaround: I have been able to solve this bug in the situation I described above by hiding Form2 before modally showing Form3 (and then showing Form2 after Form3 returns). So, Form2->Hide (). ... Form2->Show (). – Anthony Burg Jun 30 '17 at 17:17

0 Answers0