Re: iCal Integration
Re: iCal Integration
- Subject: Re: iCal Integration
- From: Gideon King <email@hidden>
- Date: Fri, 24 Feb 2012 08:49:33 +1000
I don't see anything in the API to detect it - I have encountered calendars that don't support tasks, and if I try to save a task to them, I get an error with code 1025 (CalCalendarNotEditableError), and deal with that in my code.
isEditable returns YES for a calendar which only supports events, so you still have to try to save a task to it before you know it won't store tasks.
I haven't come across one that can't save events yet. Do you know what error code you get back when you try to save an event to a calendar which doesn't support events? I'm assuming it's the same code?
I haven't looked at the "type" property to see if the values there bear any relationship to what can be saved to it, but that seems like the only other property that could potentially be relevant…
HTH
Gideon
On 23/02/2012, at 1:19 PM, Jeremy Matthews wrote:
> I have a simple app which, as a byproduct, creates tasks and events in iCal. Prior to 10.7, the user would choose from a popup list populated by all calendars within the [CalCalendarStore defaultstore], which worked great and created both events and tasks perfectly fine.
>
> Now, in 10.7, it seems as if a CalDAV (alal iCloud) or Exchange calendar is separated into two separate objects - one for events and one for tasks, and the result is the user is shown a list of calendars...and in many cases users appear to see duplicates, when in reality there are those two separate "calendars".
>
> So now, when a user selects the calendar, they might get an event created, but not tasks, and vice-versa.
>
> Is there any known way of dealing with this, or any way to easily find out which "calendar" supports events vs tasks, instead of firing off a "test" tasks and finding out the hard way? Or perhaps, a better solution altogether?
>
> Thanks,
> jeremy
_______________________________________________
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