• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: using Undo with portable C++ data model
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >using Undo with portable C++ data model (From: John Richetta <email@hidden>)

  • Prev by Date: Re: using Undo with portable C++ data model
  • Next by Date: Re: IKImageBrowserView is bonkers
  • Previous by thread: using Undo with portable C++ data model
  • Next by thread: Re: using Undo with portable C++ data model
  • Index(es):
    • Date
    • Thread