Challenge 18 in Hillegass Book
Challenge 18 in Hillegass Book
- Subject: Challenge 18 in Hillegass Book
- From: "James G." <email@hidden>
- Date: Fri, 8 Aug 2008 15:55:33 -0700
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 (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