Re: Display an Alert Sheet at a Specified Screen Position
Re: Display an Alert Sheet at a Specified Screen Position
- Subject: Re: Display an Alert Sheet at a Specified Screen Position
- From: Quincey Morris <email@hidden>
- Date: Thu, 26 Mar 2015 23:45:45 +0000
On Mar 26, 2015, at 16:00 , Graham Cox <email@hidden> wrote:
>
> Your requirement isn't clear - do you want a sheet to appear as if unattached to a host window, just floating in space? Even if you can achieve it, users will simply assume your app is buggy. Ideas like this are never seen in the wild for good reason.
I’ve been following this thread from the beginning, and have come to the conclusion that the OP was never interested in an alert or a sheet as such. I think what’s being asked for is just an anchored app- or window-modal floating panel that displays an error message. There really isn’t a standard UI element of this kind (that I can think of). The nearest would be a non-dismissable popover anchored at the point of the error.
If the intention is that the “alert” should be app-modal, then a modal NSAlert window has the correct behavior, but there are consistency reasons for not moving it from its standard position.
If the intention is that the “alert” should be window-modal, and positioned relative to the window, then a sheet with custom positioning (window:willPositionSheet:usingRect:) would have the correct behavior, but AFAIK custom sheet positioning is basically never done. (And I don’t know that you can force custom positioning on a NSAlert sheet.)
Without knowing more context, I’m not sure NSPopover is the right thing either. If not, it probably ought to be some kind of custom NSPanel.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden