Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2016-11

Modal windows on Cocoa

7 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Michael Van Canneyt

Hi,

I am not sure whether this is a bug of the cocoa widgetset, or whether this is a general limitation of the Mac.

Imagine a main form, which shows a modal form. The modal form shows a message dialog (ShowMessage or MessageDlg, it makes no difference).

This works perfectly on Linux and Windows.

If you do this on a Mac, then the program hangs: there is no way to press the OK button in the message dialog.

Is this a limitation of the Mac ?
I have never seen a Mac program do this kind of thing, so I could imagine that this is a limitation, but admittedly my experience on the Mac is not as big as on PC...

I made a small sample program to demonstrate the issue: http://www.freepascal.org/~michael/modalbug.zip

If this is supposed to work, and it's actually a bug in the cocoa widgetset I will post it to the bugtracker.

Michael.

Reply by email

zeljko
to Michael Van Canneyt
Michael Van Canneyt wrote 18 lines
Hi, I am not sure whether this is a bug of the cocoa widgetset, or whether this is a general limitation of the Mac. Imagine a main form, which shows a modal form. The modal form shows a message dialog (ShowMessage or MessageDlg, it makes no difference). This works perfectly on Linux and Windows. If you do this on a Mac, then the program hangs: there is no way to press the OK button in the message dialog. Is this a limitation of the Mac ? I have never seen a Mac program do this kind of thing, so I could imagine that this is a limitation, but admittedly my experience on the Mac is not as big as on PC...

I'm still using Qt-4.8.6 (QtCarbon 32bit) for production under mac and it does not have single problem with such windows, also tested with Qt-5.6.2 (QtCocoa 64bit) and there it works correct too, so doesn't look like limitation :)

zeljko

Reply by email

Michael Van Canneyt
to zeljko
zeljko wrote 24 lines
On 13.11.2016 19:52, Michael Van Canneyt via Lazarus wrote: > > Hi, > > I am not sure whether this is a bug of the cocoa widgetset, or whether this > is a general limitation of the Mac. > > Imagine a main form, which shows a modal form. The modal form shows a > message dialog (ShowMessage or MessageDlg, it makes no difference). > > This works perfectly on Linux and Windows. > > If you do this on a Mac, then the program hangs: there is no way to press > the OK button in the message dialog. > > Is this a limitation of the Mac ? I have never seen a Mac program do > this kind of thing, so I could imagine > that this is a limitation, but admittedly my experience on the Mac is > not as big as on PC... I'm still using Qt-4.8.6 (QtCarbon 32bit) for production under mac and it does not have single problem with such windows, also tested with Qt-5.6.2 (QtCocoa 64bit) and there it works correct too, so doesn't look like limitation :)

I didn't know that Qt could be used for mac.

It made me realize that I assumed I was using Cocoa, so I checked, and it turns out it is Carbon, not cocoa :/

When I tried to change it, the IDE sends me to 'Additions and overrides' But when I press 'Set LCLWidgetType', nothing visible happens, and the IDE becomes unresponsive. (Presumably some dropdown list is hidden behind the modal project options dialog...)

I need to switch to another application and back to the IDE, then it becomes responsive again. Since the IDE is built using Carbon, it seems safe to assume there is a bug in the Carbon widgetset.

Michael.

Reply by email

Ondrej Pokorny
to Michael Van Canneyt
Michael Van Canneyt wrote 9 lines
When I tried to change it, the IDE sends me to 'Additions and overrides' But when I press 'Set LCLWidgetType', nothing visible happens, and the IDE becomes unresponsive. (Presumably some dropdown list is hidden behind the modal project options dialog...) I need to switch to another application and back to the IDE, then it becomes responsive again. Since the IDE is built using Carbon, it seems safe to assume there is a bug in the Carbon widgetset.

This is a bug in 1.6.0. It's been already fixed so wait for 1.6.2 or use 1.6 fixes branch. I assume the modal problem is the same bug as well.

Ondrej

Reply by email

Michael Van Canneyt
to Ondrej Pokorny
Ondrej Pokorny wrote 13 lines
On 14.11.2016 8:11, Michael Van Canneyt via Lazarus wrote: > When I tried to change it, the IDE sends me to 'Additions and overrides' > But when I press 'Set LCLWidgetType', nothing visible happens, and the > IDE becomes unresponsive. (Presumably some dropdown list is hidden behind > the modal project options dialog...) > > I need to switch to another application and back to the IDE, then it > becomes > responsive again. Since the IDE is built using Carbon, it seems safe to > assume there is a bug in the Carbon widgetset. This is a bug in 1.6.0. It's been already fixed so wait for 1.6.2 or use 1.6 fixes branch. I assume the modal problem is the same bug as well.

Good news. When is 1.6.2 expected ?

Michael.

Reply by email

Mattias Gaertner
to Ondrej Pokorny
Show quoted text 5 lines
On 14.11.2016 8:18, Michael Van Canneyt via Lazarus wrote: > Good news. When is 1.6.2 expected ? It's been already tagged so expect it soon. 1.6.2 took so long because we waited for FPC 3.0.2.

And stopped waiting and use 3.0.0 for 1.6.2.

Mattias

Reply by email