Big Sur changes

Hm… the order went from default, alternate, cancel to default, cancel, alternate. That makes sense? Of course, I can switch the order for BS. Ups. I had switched alternate and cancel button in my code.

But the dialog is just a garden variety message dialog:

dim theWAlert as new MessageDialog
theWAlert.IconType = MessageDialog.IconTypes.None
'some code
dim theButton as MessageDialogButton = theWAlert.ShowModal

So how can it lose focus?

You are definitely configuring your dialogs wrong in the code you omitted. Cancel is the button immediately to the left of Default. Alternate is the far away one. You’ve set the alternate button as a cancel action.

You should probably not mess with the intended order of the buttons. The ActionButton is the default and on the right in 10.15 and lower. CancelButton is the cancel, and AlternateActionButton is the alternate. They have keyboard shortcuts mapped to them, so you shouldn’t use AlternateActionButton as the default to reorder them. Though I’ll be honest, your screenshots don’t look like you’re trying to hijack the order, so maybe I’m misunderstanding.

I’ve included screenshots of the following code to demonstrate what I mean by the order changing:

Var Dialog As New MessageDialog
Dialog.Message = "Message"
Dialog.Explanation = "Explanation"
Dialog.ActionButton.Caption = "Action"
Dialog.CancelButton.Caption = "Cancel"
Dialog.AlternateActionButton.Caption = "Alternate"
Dialog.CancelButton.Visible = True
Dialog.AlternateActionButton.Visible = True

Call Dialog.ShowModalWithin(Self)

So like I said, changed from “Alternate, Cancel, Default” to “Default, Alternate, Cancel” which makes more sense.

2 Likes

But why are all my dialogs not in focus?

I’m not convinced they’re not. If you’ve changed which button is the default, such as Dialog.AlternateActionButton.IsDefault = True, Big Sur might not be agreeing with that and drawing none of the buttons as default.

Sigh… I checked other dialogs, too, and those also show up not in focus. Renaming a simple button doesn’t change the focus.

We’d probably have to see some real code to diagnose further.

Not even messagedialogs are simple anymore. So. Some simple code:

dim theAlert as new MessageDialog
theAlert.Message = "theMessage"
theAlert.Explanation = "theExplanation"
call theAlert.ShowModal

Do the code in a button and everything looks like like it should. Put the code in the Open event and the dialog isn’t in focus.

Xojo or BS?

But I don’t get any dialog with a default button. So I must have some other problem.

For the record, the code provided looks like this on my DTK.

Screen Shot 2020-07-31 at 11.51.33 AM

I doubt it has anything to do with running on ARM though.

Even in the Open event? That BS doesn’t like me at all.

Yes. Here are more characters to make the post hit the 10 character limit.

3 Likes

You know @Dana_Brown, this is a site configurable option for admins. It’s annoying having a minimum character count.

2 Likes

All set.