On 12/09/2013, at 11:17 AM, Etienne Samson <samson.etie...@gmail.com> wrote:

> If there's 26 different objects that need that "cache" capacity, that's 26 
> class methods


So just make a tiny class for the sole purpose of storing the latest data 
state. All 26 different sender classes can then use it - since it only stores 
one thing, it must be "the latest", by definition.

It does not make any difference to the loose coupling, you're just substituting 
a different global class for NSNotificationCenter. It does require minor code 
changes to 26 different classes, but that's a small price to pay for 
correctness/simplicity/no side effects over a hack, in my opinion.

--Graham
_______________________________________________

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to