• 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
Challenge 18 in Hillegass Book
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Challenge 18 in Hillegass Book
      • From: Graham Cox <email@hidden>
  • Prev by Date: Re: CGImageSourceCreateFromURL failed with error -11
  • Next by Date: NSSearchField bindings almost work
  • Previous by thread: Re: How to obtain NSApplication from kCGWindowOwnerPID?
  • Next by thread: Re: Challenge 18 in Hillegass Book
  • Index(es):
    • Date
    • Thread