FROM : Kyle Sluder
DATE : Thu May 29 05:38:33 2008
On Wed, May 28, 2008 at 11:29 PM, Scott Ribe <<email_removed>> wrote:
> Probably because it involves the run loop and event dispatch, since the
> running a window as a sheet must ensure that the window to which the sheet
> is attached does not receive events, yet a click in that parent window must
> bring the pair forward...
Hrm. I thought that at first but then I came to the conclusion that
this argument doesn't really hold water. Plenty of operations on
view-level code are going to affect the run loop mode (-[NSResponder
presentError:], for example), and event dispatch is only relevant to
the NSWindow to which the sheet is attached anyway.
I can live with "it was put in the wrong place", and Jens makes a
point that this seems like a mechanical transformation is possible,
which is usually further evidence that something's wrong.
-[SomeSingleton makeThisObject:doThis:] instead of -[ThisObjectClass
doThis:] seems to actually fit the definition of the anti-pattern. Oh
well, it's not *broken*, and that's the important part.
--Kyle Sluder
DATE : Thu May 29 05:38:33 2008
On Wed, May 28, 2008 at 11:29 PM, Scott Ribe <<email_removed>> wrote:
> Probably because it involves the run loop and event dispatch, since the
> running a window as a sheet must ensure that the window to which the sheet
> is attached does not receive events, yet a click in that parent window must
> bring the pair forward...
Hrm. I thought that at first but then I came to the conclusion that
this argument doesn't really hold water. Plenty of operations on
view-level code are going to affect the run loop mode (-[NSResponder
presentError:], for example), and event dispatch is only relevant to
the NSWindow to which the sheet is attached anyway.
I can live with "it was put in the wrong place", and Jens makes a
point that this seems like a mechanical transformation is possible,
which is usually further evidence that something's wrong.
-[SomeSingleton makeThisObject:doThis:] instead of -[ThisObjectClass
doThis:] seems to actually fit the definition of the anti-pattern. Oh
well, it's not *broken*, and that's the important part.
--Kyle Sluder






Cocoa mail archive

