• 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: Matt Neuburg <email@hidden>
  • Date: Wed, 14 Jun 2006 08:26:44 -0700
  • Thread-topic: sheets and drawers

On or about 6/14/06 6:26 AM, thus spake "Norbert Heger" <email@hidden>:

>
> 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).

Extremely cool. Many thanks! m.

--
matt neuburg, phd = email@hidden, http://www.tidbits.com/matt/
pantes anthropoi tou eidenai oregontai phusei
AppleScript: the Definitive Guide - Second Edition!
http://www.amazon.com/gp/product/0596102119
Take Control of Word 2004, Tiger, and more -
http://www.takecontrolbooks.com/tiger-customizing.html
Subscribe to TidBITS! It's free and smart. http://www.tidbits.com/



 _______________________________________________
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

References: 
 >Re: sheets and drawers (From: Norbert Heger <email@hidden>)

  • Prev by Date: Re: Transparent white NSView
  • Next by Date: Re: Mouse Events & NSResponder
  • Previous by thread: Re: sheets and drawers
  • Next by thread: Re: sheets and drawers
  • Index(es):
    • Date
    • Thread