Re: NSDistributedNotificationCenter question
Re: NSDistributedNotificationCenter question
- Subject: Re: NSDistributedNotificationCenter question
- From: Ronald Oussoren <email@hidden>
- Date: Sun, 8 Jun 2003 20:31:22 +0200
On Sunday, Jun 8, 2003, at 19:09 Europe/Amsterdam, Julien Jalon wrote:
On Sunday, Jun 8, 2003, at 17:15 Europe/Paris, Ronald Oussoren wrote:
Hi,
I'm one of the authors of PyObjC and one of our users complained that
NSDistributedNotificationCenter doesn't work. Luckily for me a
Objective-C version of his demo program gives exactly the same
behaviour. I could not find in the documentation *why* it behaves as
it does, hence this email.
The program below listens for nofications on the default distributed
nofication center. It then posts a notification from the same
process. The thing that confuses my is that the receiver of the
program cannot access the original 'object' of the nofication, it is
always 'nil'. Why is this?
Ronald
[...]
This not really a bug but a feature. As stated in
NSDistributedNotificationCenter:
"- (void)postNotificationName:(NSString *)notificationName
object:(NSString *)anObject
Creates a notification with the name notificationName, associates it
with the string anObject, and posts it to the notification center.
anObject may be nil."
I know that, and I did use a string as the object. This string just
"disappeared" before it reached the object listening for the event.
Ronald
_______________________________________________
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.