Skip navigation.
 
mlRe: CalendarStore question
FROM : Ben Kazez
DATE : Wed Feb 20 23:19:19 2008

> Date: Wed, 20 Feb 2008 15:16:29 -0500
> From: Daniel Wambold <<email_removed>>
> Subject: CalendarStore question
> To: <email_removed>
> Message-ID: <<email_removed>>
> 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

Related mailsAuthorDate
mlCalendarStore question Daniel Wambold Feb 20, 21:16
mlRe: CalendarStore question Ben Kazez Feb 20, 23:19