• 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
Re: Crashing Problem calling postNotificationName
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Crashing Problem calling postNotificationName


  • Subject: Re: Crashing Problem calling postNotificationName
  • From: Graham Cox <email@hidden>
  • Date: Thu, 12 Sep 2013 11:28:11 +0200

On 12/09/2013, at 11:17 AM, Etienne Samson <email@hidden> 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 (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


References: 
 >Crashing Problem calling postNotificationName (From: Dave <email@hidden>)
 >Re: Crashing Problem calling postNotificationName (From: Dave <email@hidden>)
 >Re: Crashing Problem calling postNotificationName (From: Graham Cox <email@hidden>)
 >Re: Crashing Problem calling postNotificationName (From: Dave <email@hidden>)
 >Re: Crashing Problem calling postNotificationName (From: Etienne Samson <email@hidden>)
 >Re: Crashing Problem calling postNotificationName (From: Graham Cox <email@hidden>)
 >Re: Crashing Problem calling postNotificationName (From: Etienne Samson <email@hidden>)

  • Prev by Date: Re: Crashing Problem calling postNotificationName
  • Next by Date: Analyser reports memory leak… where?
  • Previous by thread: Re: Crashing Problem calling postNotificationName
  • Next by thread: Re: Crashing Problem calling postNotificationName
  • Index(es):
    • Date
    • Thread