I stepped away from the book for a bit, and I'm now trying to work through the Challenge 18 of Hillegass's Cocoa book (3rd edition).

The gist of the challenge is to create a document-based application allowing the user to draw ovals in arbitrary locations and size using NSBezierPath, as well as adding save and undo.

My question is along the lines of the "proper" way to design the classes. I'll have a custom view class that will do the drawing, and the collection of ovals will be an iVar of the MyDocument class, so that I can support de/coding and undo. What's the best way to make the oval collection available for drawing from the document class to the custom view (and the reverse, to pass new ovals drawn by the user from the view to the document for storage).

Thanks for the help.
-James

_______________________________________________

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

This email sent to [EMAIL PROTECTED]

Reply via email to