Re: does windowDidClose or not?
Re: does windowDidClose or not?
- Subject: Re: does windowDidClose or not?
- From: mmalcolm crawford <email@hidden>
- Date: Sun, 16 Apr 2006 17:52:21 -0700
On Apr 16, 2006, at 5:33 PM, mmalcolm crawford wrote:
On Apr 16, 2006, at 5:15 PM, Ben Dougall wrote:
windowWillClose is before it has closed so there may be still a
text field in mid edit -- that's possible isn't it? and maybe the
current edit state is not acceptable (according to a formatter or
particular validation) so would need further editing by the user.
so in that situation going to work on the input data at
windowWillClose point will be too early.
If you receive windowWillClose, the window *will* close -- you
don't get a chance to affect the outcome. It sounds like you want
windowShouldClose:,
Re-reading, it looks like you're actually *not* interested in
validation etc. in which case you *do* want windowWillClose:... to
reiterate, if you get windowWillClose: the window is going to close.
You cannot have windowDidClose: since the notification that
accompanies it would be holding an invalid object (the window is
likely to have been deallocated on close).
mmalc
_______________________________________________
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