• 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: Undo logic location?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Undo logic location?


  • Subject: Re: Undo logic location?
  • From: Jim Correia <email@hidden>
  • Date: Thu, 6 Jan 2005 09:12:54 -0500

On Jan 6, 2005, at 1:51 AM, Tom Davies wrote:

and I set the owner of the Catalogue to the MyDocument instance, but I'd rather not have undo logic in my model at all.

1. Where does the undo logic belong?

That's a good question.

<http://homepage.mac.com/mmalc/CocoaExamples/controllers.html>

See the section on undo. You can put undo in the model (but you have to have some way of getting the undo manager to the model objects) or you can observe in say the model-controller (document) and do as you did.

Aaron's example is fairly simply in terms of the model. A flag list of Persons, each with two properties. The observer method for undo doesn't feel like it would scale well to more complicated models, perhaps with more properties, and objects that themselves contained arrays of different model objects.

The method of giving the model objects an undo manager seems straight forward enough. One potential problem I see with this is that getting the undo name right may require some controller code that is aware of higher level actions.

Does anyone have experience with using this in a real world sized system? Which approach worked better (or not) and why?

Thanks,
Jim

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Undo logic location?
      • From: mmalcolm crawford <email@hidden>
    • Re: Undo logic location?
      • From: glenn andreas <email@hidden>
References: 
 >How Do I Flip An NSScrollView? (From: Dan Saul <email@hidden>)
 >Re: How Do I Flip An NSScrollView? (From: David Jeffery <email@hidden>)
 >Undo logic location? (From: Tom Davies <email@hidden>)

  • Prev by Date: RE: scaleUnitSquareToSize: weirdness (workaround found)
  • Next by Date: Re: IB hierarchy question Š
  • Previous by thread: Undo logic location?
  • Next by thread: Re: Undo logic location?
  • Index(es):
    • Date
    • Thread