• 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: Dave <email@hidden>
  • Date: Thu, 12 Sep 2013 20:53:31 +0100

Hi,

Something that may be confusing people is that although LTWCachedNotificationCenter is defined as Sublass of NSNotificationCenter, it does NOT allocate itself as an object and it does not call Super, instead it calls [NSNotificationCenter defaultCenter] as in:

- (void)postNotificationName:(NSString*) theName object:(id) theObject userInfo:(NSDictionary*) theUserInfoDictionary
{
[[NSNotificationCenter defaultCenter] postNotificationName:theName object:theObject userInfo:theUserInfoDictionary];

if (theUserInfoDictionary == nil)
	return;

@synchronized (gNotificationClassDictionary)
	{
	[gNotificationClassDictionary setObject:theUserInfoDictionary forKey:theName];
	}
}



+(void) repostNotiticationName:(NSString*) theName
{
NSDictionary*					myUserInfoDictionary;

@synchronized (gNotificationClassDictionary)
	{
	myUserInfoDictionary = [gNotificationClassDictionary objectForKey:theName];
	}

if (myUserInfoDictionary != nil)
	[[NSNotificationCenter defaultCenter] postNotificationName:theName object:nil userInfo:myUserInfoDictionary];
}


All the Best
Dave

_______________________________________________

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: Dave <email@hidden>)
 >Re: Crashing Problem calling postNotificationName (From: Kyle Sluder <email@hidden>)
 >Re: Crashing Problem calling postNotificationName (From: Dave <email@hidden>)
 >Re: Crashing Problem calling postNotificationName (From: Kyle Sluder <email@hidden>)
 >Re: Crashing Problem calling postNotificationName (From: Dave <email@hidden>)
 >Re: Crashing Problem calling postNotificationName (From: Etienne Samson <email@hidden>)

  • Prev by Date: Re: Crashing Problem calling postNotificationName
  • Next by Date: Re: 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