Re: One NSTextView, several model objects - how to synchronise undo manager

2010-03-19 Thread Rui Pacheco
I need to come back to this as something's not right and I can't find out what. I am now initialising a new instance of NSUndoManager when I create my model object. When I type I can see undoManagerForTextView being called and a valid undo manager returned to the text view. My problem is, when I

Re: One NSTextView, several model objects - how to synchronise undo manager

2010-03-19 Thread Rui Pacheco
You are right, I forgot to check the delegate methods. On 17 March 2010 14:41, Keith Blount wrote: > I might be missing something, but can you not just use the NSTextView > delegate message, -undoManagerForTextView:? This is what I do in my app. I > have a single text view that can have various

Re: One NSTextView, several model objects - how to synchronise undo manager

2010-03-17 Thread Keith Blount
I might be missing something, but can you not just use the NSTextView delegate message, -undoManagerForTextView:? This is what I do in my app. I have a single text view that can have various text storage objects swapped into it, and I have each of those text storages associated with a different

Re: One NSTextView, several model objects - how to synchronise undo manager

2010-03-17 Thread Rui Pacheco
Is there a way to bind the text view's undo manager to an instance of NSUndoManager on my model object? I can get to the text view undo manager but I don't seem to be able to set it. On 17 March 2010 13:34, Keary Suska wrote: > On Mar 16, 2010, at 6:09 PM, Rui Pacheco wrote: > > > I've a window

Re: One NSTextView, several model objects - how to synchronise undo manager

2010-03-17 Thread Keary Suska
On Mar 16, 2010, at 6:09 PM, Rui Pacheco wrote: > I've a window with a fairly complex layout - one NSTextView and several > tables, all displaying different types of data. To keep things in order, > I've created a model object that holds the data for all these interface > elements. The window may

One NSTextView, several model objects - how to synchronise undo manager

2010-03-16 Thread Rui Pacheco
Hi all, I've a window with a fairly complex layout - one NSTextView and several tables, all displaying different types of data. To keep things in order, I've created a model object that holds the data for all these interface elements. The window may also hold several instances of the model object