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 protected])
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 [email protected]