Field editor undo vs document dirty

2009-04-07 Thread Quincey Morris
I can't work out if this simple and I'm just missing it, or if this is hard ... In a NSDocument-based application, I have some text fields in the document window. Typing in one of these text fields (that is, typing characters but not pressing Tab or Return to end editing) is of course

Re: Field editor undo vs document dirty

2009-04-07 Thread Kyle Sluder
On Tue, Apr 7, 2009 at 2:52 AM, Quincey Morris quinceymor...@earthlink.net wrote: The first thing I don't understand is whether that's a bug. Although the document isn't really changed (because the typing hasn't been committed yet), but the presence of undoable typing perhaps ought to prevent

Re: Field editor undo vs document dirty

2009-04-07 Thread Adam R. Maxwell
On Apr 6, 2009, at 11:52 PM, Quincey Morris wrote: I can't work out if this simple and I'm just missing it, or if this is hard ... In a NSDocument-based application, I have some text fields in the document window. Typing in one of these text fields (that is, typing characters but not

Re: Field editor undo vs document dirty

2009-04-07 Thread Quincey Morris
On Apr 7, 2009, at 08:06, Adam R. Maxwell wrote: Have your controller object implement the NSEditor protocol. Send the document objectDidBeginEditing:/objectDidEndEditing: at the appropriate times (maybe using text delegate notifications), and it will send you commitEditing/discardEditing