Re: Undomanager for custom object?
Re: Undomanager for custom object?
- Subject: Re: Undomanager for custom object?
- From: Seth Willits <email@hidden>
- Date: Thu, 15 Mar 2012 11:32:43 -0700
On Mar 14, 2012, at 11:44 PM, Luc Van Bogaert wrote:
> By "strong reference", I assume you mean I should add an ivar of type NSUndoManager to my model object to hold a reference to the document's undoManager, right? If so, I think I understand what you are saying. I will give this a try. Thanks!
>
> But could you also please explain a little more clearly what you mean with "weak reference" to the document?
Strong being retained, weak is not.
@property (readwrite, retain) NSUndoManager * undoManager;
@property (readwrite, assign) NSDocument * document;
Or if you're using ARC, you can actually use the strong and weak keywords
--
Seth Willits
_______________________________________________
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