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:33:17 -0700
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:, which gives you the option of telling the window
not to close if there are edits that you need to validate. See
<http://developer.apple.com/documentation/Cocoa/Conceptual/
AppArchitecture/Tasks/GracefulAppTermination.html>, <http://
developer.apple.com/documentation/Cocoa/Conceptual/CocoaFundamentals/
CocoaDesignPatterns/chapter_5_section_3.html#//apple_ref/doc/uid/
TP40002974-CH6-SW19>, and <http://developer.apple.com/documentation/
Cocoa/Conceptual/CocoaFundamentals/CommunicatingWithObjects/
chapter_6_section_4.html#//apple_ref/doc/uid/TP40002974-CH7-SW18>.
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