[Drawkit] Undo not working for drawing / deleting objects

Graham Cox graham.cox at bigpond.com
Fri Jun 20 18:54:33 PDT 2008


Indeed, that is odd.

I'm not sure why you have to use this delegate method in a document- 
based application, since NSDocument has a -setUndoManager: method  
which DKDrawingDocument uses to set a DKUndoManager. It may be that  
this isn't the right way to do it and I *should* be using the delegate  
method. The work on the mini-demo led me to use that method to return  
a DKUndoManager which is how to solve that problem in the non-document  
case, but AFAIK, it doesn't apply in the document case.

DKDrawingDocument sets the undo manager in its -init method. I'm  
wondering if that's correct. I'll check into it.


cheers, Graham





On 21 Jun 2008, at 7:22 am, Brad Larson wrote:

> in my subclass of DKDrawingDocument, which is the delegate for my  
> document window.  It's odd that this was not required for the  
> DrawDemo application.



More information about the Drawkit mailing list