Skip navigation.
 
mlRe: Alert Sheets hard wired in Interface Builder
FROM : Jens Alfke
DATE : Thu May 29 05:39:19 2008

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

Related mailsAuthorDate
mlAlert Sheets hard wired in Interface Builder John Love May 27, 22:28
mlRe: Alert Sheets hard wired in Interface Builder Sherman Pendley May 27, 22:38
mlRe: Alert Sheets hard wired in Interface Builder Kyle Sluder May 27, 22:40
mlRe: Alert Sheets hard wired in Interface Builder Jens Alfke May 28, 06:06
mlRe: Alert Sheets hard wired in Interface Builder Graham Cox May 28, 06:24
mlRe: Alert Sheets hard wired in Interface Builder Scott Ribe May 29, 05:29
mlRe: Alert Sheets hard wired in Interface Builder Kyle Sluder May 29, 05:38
mlRe: Alert Sheets hard wired in Interface Builder Jens Alfke May 29, 05:39
mlRe: Alert Sheets hard wired in Interface Builder Graham Cox May 29, 05:58
mlRe: Alert Sheets hard wired in Interface Builder Chris Hanson May 29, 07:44
mlRe: Alert Sheets hard wired in Interface Builder John Love May 31, 17:43
mlRe: Alert Sheets hard wired in Interface Builder John Love May 31, 18:40
mlRe: Alert Sheets hard wired in Interface Builder Keary Suska May 31, 19:08
mlRe: Alert Sheets hard wired in Interface Builder Jens Alfke May 31, 19:22
mlRe: Alert Sheets hard wired in Interface Builder John Love Jun 1, 20:19
mlRe: Alert Sheets hard wired in Interface Builder Jens Alfke Jun 1, 21:07
mlRe: Alert Sheets hard wired in Interface Builder Nathan Kinsinger Jun 1, 21:15
mlRe: Alert Sheets hard wired in Interface Builder John Love Jun 3, 22:27