Re: Close box not showing as dirty when the doc says it's dirty

2013-02-06 Thread Graham Cox
On 07/02/2013, at 5:21 AM, Steve Mills wrote: > So it's like updating that state during drawing is not allowing the window's > isDocumentEdited state to change. > > Since we do have that bug that causes non-dirty docs to become dirty during > their first draw, I'm not going to worry about thi

Re: Close box not showing as dirty when the doc says it's dirty

2013-02-06 Thread Steve Mills
On Feb 5, 2013, at 19:09:54, Lee Ann Rucker wrote: > There's probably a KVO observer on isDocumentEdited; if nothing triggers > setDocumentEdited then it doesn't know to check it. > > updateChangeCount: says > > If you are implementing undo and redo in an application, you should increment > t

Re: Close box not showing as dirty when the doc says it's dirty

2013-02-05 Thread Steve Mills
On Feb 5, 2013, at 19:09:54, Lee Ann Rucker wrote: > There's probably a KVO observer on isDocumentEdited; if nothing triggers > setDocumentEdited then it doesn't know to check it. > > updateChangeCount: says > > If you are implementing undo and redo in an application, you should increment > t

Re: Close box not showing as dirty when the doc says it's dirty

2013-02-05 Thread Lee Ann Rucker
On Feb 5, 2013, at 3:08 PM, Steve Mills wrote: > On Feb 5, 2013, at 15:12:43, Markus Spoettl 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 a

Re: Close box not showing as dirty when the doc says it's dirty

2013-02-05 Thread Graham Cox
On 06/02/2013, at 10:08 AM, Steve Mills wrote: > From the docs for setDocumentEdited: You need to use [NSDocument updateChangeCount:(NSDocumentChangeType) changeType]; --Graham ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please

Re: Close box not showing as dirty when the doc says it's dirty

2013-02-05 Thread Steve Mills
On Feb 5, 2013, at 15:12:43, Markus Spoettl 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 w

Re: Close box not showing as dirty when the doc says it's dirty

2013-02-05 Thread Markus Spoettl
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

Close box not showing as dirty when the doc says it's dirty

2013-02-05 Thread Steve Mills
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 wind