Re: Close box not showing as dirty when the doc says it's dirty
Re: Close box not showing as dirty when the doc says it's dirty
- Subject: Re: Close box not showing as dirty when the doc says it's dirty
- From: Markus Spoettl <email@hidden>
- Date: Tue, 05 Feb 2013 22:12:43 +0100
On 2/5/13 9:59 PM, Steve Mills wrote:
Do I need to do anything to force the close box to update its status from non
dirty to dirty? Our document subclass overrides isDocumentEdited and is
returning true, yet the close box appears clean. If I Close, isDocumentEdited
again returns true and the save dlog appears. If I create a new window for
the document, that 2nd window's close box appears as dirty. Same doc, 2
different windows, 2 different states. Color me confused.
I don't think it's meant to be overridden that way because the framework doesn't
realize that the state has changed. You should probably call -setDocumentEdited:
instead, or, as an alternative, implement undo and use an NSUndoManager which
manages this stuff for you.
Regards
Markus
--
__________________________________________
Markus Spoettl
_______________________________________________
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