Re: sheets and drawers
Re: sheets and drawers
- Subject: Re: sheets and drawers
- From: Norbert Heger <email@hidden>
- Date: Wed, 14 Jun 2006 15:26:32 +0200
On Jun 13, 2006, at 20:14, Matt Neuburg wrote:
When a window has a drawer and you open a sheet on it, don't you
think the
stuff in the drawer should be disabled? My experience is that it is
not. Is
it just me?
I mean to say, a sheet is supposed to be window-modal (meaning you
have to
deal with the sheet before you can deal with anything in the
window); a
drawer, surely, should not be a sneaky way around this. Yet it
appears to be
just that.
It seems you've discovered an AppKit bug. Fortunately it can be
easily fixed by adding these few lines to your project:
-------------------------------------------------------------------
@interface NSDrawerWindow : NSWindow
- (NSWindow *)_parentWindow;
@end
@implementation NSDrawerWindow (AttachedSheetBugfix)
- (NSWindow *)attachedSheet { return [[self _parentWindow]
attachedSheet]; }
@end
-------------------------------------------------------------------
NSWindow invokes [self attachedSheet] in order to determine if an
event shall be processed or not. If there is a sheet attached, the
event will be ignored. However, NSDrawerWindow (a private subclass of
NSWindow) always returns nil for "attachedSheet", since the sheet is
not attached to the drawer but to its parent window.
The above category fixes this issue by implementing -[NSDrawerWindow
attachedSheet] and returning the parent window's attached sheet.
I've filed a bug (radar://4585685).
n.h.
--
norbert heger
http://www.obdev.at/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden