Re: CalendarStore question
Re: CalendarStore question
- Subject: Re: CalendarStore question
- From: Ben Kazez <email@hidden>
- Date: Wed, 20 Feb 2008 16:19:19 -0600
Date: Wed, 20 Feb 2008 15:16:29 -0500
From: Daniel Wambold <email@hidden>
Subject: CalendarStore question
To: email@hidden
Message-ID: <email@hidden>
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
I have recently added CalendarStore interactivity to a program I've
written, but I'm confused by the documentation regarding
notifications. In the docs for the CalCalendarStore class, this is
stated:
"CalCalendarsChangedExternallyNotification
Posted by the shared NSDistributedNotificationCenter object...."
OK, but the notification seems to occur in my app's
NSNotificationCenter defaultCenter rather than the
NSDistributedNotificationCenter defaultCenter. My program works
perfectly well with a plain old:
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(myUpdateCalendarList:)
name:@"CalCalendarsChangedExternallyNotification"
object:nil];
Therefore, I have two questions: 1. What have I misunderstood about
where notifications get posted?
This may actually be a bug in the Calendar Store documentation. I
believe you only need to register for notifications with
NSNotificationCenter.
2. How does the independent
CalendarStore code send notifications to my program without having to
use the DistributedNotification system? I reread the docs on
notifications and still don't quite get what I've missed here. Thanks
in advance for your insight!
Calendar Store uses distributed notifications behind the scenes to
make this possible. You should only need to register for notifications
with the local notification center, and Calendar Store will take care
of the rest.
Ben
_______________________________________________
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