Skip navigation.
 
mlRe: Document with Multiple Windows
FROM : Mike Rossetti
DATE : Tue Nov 27 23:21:35 2007

On Nov 27, 2007, at 4:50 PM, Jonathon Mah (<email_removed>) wrote:
> Hi Mike,
>
> On 2007-11-27, at 14:18, Mike Rossetti wrote:

>> I'm close: I can make edits in the main window and see them in the 
>> sub-component windows, and vice versa.  But only the main window 
>> shows dirtiness and can be used to undo/redo.  The additional 
>> windows can save the document but if I try an undo then I just get 
>> a  beep.

>
> In each window controller for the other windows, implement the 
> delegate method -windowWillReturnUndoManager:, and return 
> [managedObjectContext undoManager].


That did the trick for undo/redo!  Thanks!

> I think the dirty status /should/ propagate correctly. Are you 
> creating additional window controllers and adding them to your 
> NSPersistentDocument instance?


Yes, using:

   [NSBundle loadNibNamed:@"InvoiceEditWindow" owner:document];

I also tried a specific:

   [document addWindowController:invoiceEditWC];

and I further tried setting the 'Document Edited' binding for the 
window to the document's isDocumentEdited accessor,

all of these with no success.

Mike

Related mailsAuthorDate
mlDocument with Multiple Windows Mike Rossetti Nov 27, 04:48
mlRe: Document with Multiple Windows Jonathon Mah Nov 27, 05:20
mlRe: Document with Multiple Windows Mike Rossetti Nov 27, 23:21