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: Steve Mills <email@hidden>
- Date: Tue, 05 Feb 2013 17:08:28 -0600
On Feb 5, 2013, at 15:12:43, Markus Spoettl <email@hidden> wrote:
> 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.
From the docs for setDocumentEdited:
"The window controller uses this flag to control whether its associated window shows up as dirty. You should not call this method directly for window controllers with an associated document; the document calls this method on its window controllers as needed."
As far as undo goes, we have our own cross-platform undo system and menu items, so I don't see us implementing Cocoa's undo on top of that, and we shouldn't be expected to. This is supposed to be what isDocumentEdited is for. I'm not sure why it's not working for some cases.
--
Steve Mills
office: 952-818-3871
home: 952-401-6255
cell: 612-803-6157
_______________________________________________
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