Rundialogs sheet=true (nope)

Unless I am missing something, always a possibility, you have to go back several OS versions for sheet=true to cause a dialog to be attached to the current window. It appears instead, I think, as a floating dialog centered on the current window. I can’t recall how far back you must go for the dialog to appear as a sheet attached to the current window. But using sheet=true will remove the title bar (is that the right name?) from the dialog window, so it appears without any surrounding elements – my preference. I wasn’t quite sure what to suggest for changes to the help page for rundialog. Here’s a dialog without and with a sheet=true option.


Looks like the rundialog help page already has this update about how sheets now work.

Sheet

To make the dialog appear as a sheet attached to the current window (instead of as a standalone modal dialog) add sheet=true to the list of options. NOTE: with the introduction of OS 11, Big Sur, Apple has changed the operation of sheets. They no longer slide down from the title bar of the current window. Instead, they open a dialog centered in the current window. (my emphasis)

I think I should have read past the first sentence.

I greatly preferred the way sheets used to work. Unfortunately, Apple didn’t ask me. This new method makes sheets on macOS work more like the way they do on iOS. I think that’s a bad thing, but obviously Apple thinks it’s a good thing.

It’s doing a lot more than that. When you open a dialog as a sheet, it is modal to the window it is attached to. So you can’t do anything in that window – but you can still click to other windows. So for example you can open Panorama’s search dialog (which is a sheet) and then open and use the Help window. Or you could switch to a procedure view and copy some text from the code to paste in the Find/Select dialog.

When you open a dialog without sheet=true, the dialog will be globally modal. In other words, you cannot do anything else until the dialog is dismissed.

In the operational sense, the difference between dialog sheets and non-sheet dialogs is the same as it always has been. Non-sheet dialogs are globally modal, while sheet dialogs are modal only to the window they are attached to. You’ll also notice that a dialog sheet will move around if you move the window it is attached to. Non-sheet dialogs are not associated with any window - they are completely independent.

What Apple changed is the appearance of dialog sheets. They stylistically made them look like iOS sheets. But the operation hasn’t changed at all, they work the same even though they look different.

You shouldn’t choose sheets vs non-sheets based on appearance - make the choice based on operation. If the task the dialog is to perform is related to the current window, it should be a sheet. If the task is global, not related to any window, then use a non-sheet dialog.

A global, non-sheet dialog should be pretty rare. In fact, I don’t think Panorama uses any non-sheet dialogs. For tasks that are not related to any window or database, Panorama uses a non-modal window instead of a dialog. For example, the Preferences/Settings window, and the Server Administration window.

Ok, I did just now think of a couple of non-sheet dialogs in Panorama - 1) the Find & Open dialog, and 2) the Open View dialog. Neither of these dialogs are not associated with any window, so they are non-sheet, global dialogs. You can’t do anything else until you dismiss the dialog. Ah, I thought of one more - the Error Wizard. But as you can see, these are super rare. All of the other dialogs - Find/Select, Sort, Hide Fields, Field Blueprints, Database Options, etc., all of them are associated with a particular window, so they use the sheet=true option. I would recommen that you always use the sheet=true option unless you are really building a dialog that is independent from any window.

Just to recap, the sheet=true option still causes the dialog to be attached to the current window. It’s just that the appearance of that attachment has changed.

Thank you for the explanation. There was a lot that I did not know.