Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Designing for multitudinous objects



In response to the various responses, my conclusion is:

NOTIFICATION: Avoid large numbers of NSNotification's; have my user action method contact the altered model or document, rather than having each altered object issue a notification.

UNDO: Use a much more compact means of placing only what's necessary on the Undo stack. For a typical "Move" action this would just be a code to represent the command, as well as the deltas which the objects were moved by. For an action such as changing colors, I'd store a pointer to each object, along with the necessary color information. This means a lot of types and code. Tedious. I may take the (perhaps) easier route of having some sparser classes; this would help somewhat.

MORE CLASSES: Multitudinous points etc. typically don't need to have fields for color, text description, etc. So I figure on using a sparser class for objects like these, and use bulkier classes for objects which typically come in smaller quantities but needing more customizable details.

The plot thickens: I now have to port to Windows. So as I redesign to deal more wisely with multitudinous objects, I have another major consideration. I will put this into a new thread, "Cocoa/Windows parallel dvlpmt".

Bye...Erez
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.