i am working on the challenge exercises for aaron hillegass' book, 3rd edition, for chapter 18 challenge. i have setup the application with a subclass of NSDocument (MyDocument), a subclass of NSView (DrawPadView), and a model component called Shape.

basically as the user uses the mouse to draw shapes, i have an NSMutableArray in DrawPadView that contains the various shapes drawn by the user.

when it comes time to save this file, MyDocument is going to do all the work, but the only way i can think of to get an NSMutableArray in MyDocument to have the values of the array in the DrawPadView is to use the NSNotificationCenter.

is this ok? should i have my NSDocument class register as an observer of the NSView class? i was not sure if this was going against MVC or any other cocoa design patterns.

i have been racking my brain to get this thing to save and really just keep hitting dead ends, but this path sounds logical to me... any thoughts?
_______________________________________________

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