• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: sheets and drawers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: sheets and drawers
      • From: Matt Neuburg <email@hidden>
References: 
 >sheets and drawers (From: Matt Neuburg <email@hidden>)

  • Prev by Date: How to implement Saving a Currency Converter document using Cocoa bindings ?
  • Next by Date: Re: Drawing text on top of a progress bar
  • Previous by thread: sheets and drawers
  • Next by thread: Re: sheets and drawers
  • Index(es):
    • Date
    • Thread