• 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: Alert Sheets hard wired in Interface Builder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Alert Sheets hard wired in Interface Builder


  • Subject: Re: Alert Sheets hard wired in Interface Builder
  • From: Jens Alfke <email@hidden>
  • Date: Wed, 28 May 2008 20:39:19 -0700


On 28 May '08, at 8:29 PM, Scott Ribe wrote:

Yes, the method could be in NSWindow and call
on NSApplication to get that done, but, should a window really be able to
have such a drastic effect on the events going to other windows???

It doesn't. A sheet doesn't change anything in the app's overall state, since it's asynchronous. The event loop runs normally and dispatches events normally. The most significant change is that the host window ignores most events (and just beeps) while it has a sheet open, but the app itself shouldn't care about that.


In any case, regardless of where the implementation of the functionality lives, the API should be designed in a way that makes sense conceptually to clients. Even if it was NSApplication or NSRunLoop that had to do most of the work of opening a sheet, it would be a simple matter for a public NSWindow method to call a private implementation method elsewhere. There are a number of other cases of that. (For example, -[NSDictionary initWithContentsOfFile:] is probably just a wrapper around NSPropertyListSerialization.)

—Jens

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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

References: 
 >Re: Alert Sheets hard wired in Interface Builder (From: Scott Ribe <email@hidden>)

  • Prev by Date: Re: Alert Sheets hard wired in Interface Builder
  • Next by Date: Re: Alert Sheets hard wired in Interface Builder
  • Previous by thread: Re: Alert Sheets hard wired in Interface Builder
  • Next by thread: Re: Alert Sheets hard wired in Interface Builder
  • Index(es):
    • Date
    • Thread