RE: window:willPositionSheet:usingRect: not called in full-screen mode
RE: window:willPositionSheet:usingRect: not called in full-screen mode
- Subject: RE: window:willPositionSheet:usingRect: not called in full-screen mode
- From: Lee Ann Rucker <email@hidden>
- Date: Wed, 25 Feb 2015 17:40:23 +0000
- Thread-topic: window:willPositionSheet:usingRect: not called in full-screen mode
> Great, because that's exactly what I'm using it for
The toolbar case or the "certain control" one? When you're in fullscreen mode, the toolbar isn't actually attached to your window. It's attached to a separate one so it can slide down with the menubar. But if it's the control, it wouldn't surprise me if Apple forgot they'd mentioned that option and didn't think about it when they decided whether this delegate method needed to be called.
________________________________________
From: cocoa-dev-bounces+lrucker=email@hidden [cocoa-dev-bounces+lrucker=email@hidden] on behalf of Arjan van Leeuwen [email@hidden]
Sent: Wednesday, February 25, 2015 6:47 AM
To: email@hidden
Subject: window:willPositionSheet:usingRect: not called in full-screen mode
Hi,
To open a save file sheet, I'm starting an NSSavePanel as a sheet
via beginSheetModalForWindow:completionHandler:. Because my application
needs custom positioning for the sheet, the window delegate of my main
window overrides window:willPositionSheet:usingRect:. According to the
documentation, this
Tells the delegate that the window is about to show a sheet at the
> specified location, giving it the opportunity to return a custom location
> for the attachment of the sheet to the window.
And
This method is useful in many situations. If your window has a toolbar, for
> example, you can specify a location for the sheet that is just below it. If
> you want the sheet associated with a certain control or view, you could
> position the sheet so that it appears to originate from the object (through
> animation) or is positioned next to it.
Great, because that's exactly what I'm using it for :). However, when my
app is in full-screen mode, this function never gets called. Other related
delegate functions, like windowWillBeginSheet: and windowDidEndSheet: do
get called correctly on the delegate, so the delegate is obviously still
there and as far as I can see should be receiving a call to
window:willPositionSheet:usingRect:.
Does anyone know what I can do to make the framework call
window:willPositionSheet:usingRect:, even in full-screen mode? Or if not,
what other way should I use to position the sheet that will work in all
situations?
Thanks,
Arjan
_______________________________________________
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
_______________________________________________
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