Re: using Undo with portable C++ data model
Re: using Undo with portable C++ data model
- Subject: Re: using Undo with portable C++ data model
- From: Peter Zegelin <email@hidden>
- Date: Sat, 7 Jun 2008 12:56:55 +1000
On 07/06/2008, at 12:16 PM, John Richetta wrote:
I have some core engine code that is written in C++, with the intent
of keeping it portable. I only have a Cocoa implementation of my
outer application, at present, so it's been a slightly academic
exercise, but so far, most of the code in my data model remains
substantially portable.
Now, as I try to implement undo, I find it difficult and messy to
keep the C++ code portable. I have only come up with two similar
ways to do this, and I'm curious if others have been down this path
and can make any recommendations.
I have had the exact same problem and my solution FWIW is to bypass
NSUndoManager completely and handle it all myself using a stack of
undo/redo commands. So far this has worked fine and was pretty easy to
set up. I am creating a drawing type application and my only worry is
that I will eventually find a situation where I absolutely have to use
NSUndoManager. Implementing a text shape will probably be the real
test if my solution works but I haven't got that far yet.
hth,
Peter
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden