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



Thanks, M(m)alcolm.

Yes, it's redesign time. I will have my action notify my document directly that its views need to be redrawn, or that other specific tasks need to be done. One notification (or actually a direct message without the NSNotification system) instead of gazillions. The objects which are changing don't need to be notified of anything, other than to be changed by the user action.

NSKeyValueObserving is available staring with Panther, but I have to support 10.2. At any rate, I'll be doing a lot more direct messaging, rather than using NSNotification.

Bye...Erez

On 29-Jan-04, at 1:35 PM, mmalcolm crawford wrote:


On Jan 29, 2004, at 8:42 AM, Erez Anzel wrote:

In a nutshell, I could have around 100,000 objects which the user imports/selects/edits/whatever, all in one command. Currently each object broadcasts a notification when it is changed, and each window controller is an observer.

It's quite possible that a redesign may greatly ease the situation. Why do all these objects have to send notifications to the controller? Is there no way that the controller can be notified of an event, and it simply messages the objects directly?

If the "notifications" have to be sent from the objects, and you're running on Mac OS X 10.3, you might consider using key-value observing, which may be more efficient -- and more flexible.
<http://developer.apple.com/documentation/Cocoa/Conceptual/ KeyValueObserving/index.html>

mmalc
_______________________________________________
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.

References: 
 >Designing for multitudinous objects (From: Erez Anzel <email@hidden>)
 >Re: Designing for multitudinous objects (From: mmalcolm crawford <email@hidden>)



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.