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 (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to