I think the problem has to do with the sample app's bindings. Here is
the project I've changed to get it compile on 10.5.
http://idisk.mac.com/lee.gillen-Public/SimpleCalendar.zip
The changes are:
- The SDK targets changed from 10.4u and not 10.5.
- The messages to -eventPredicateWithStartDate:endDate:calendars: were
changed from NSPredicate objects to CalCalendarStore objects.
- A method calling CalCalendarStore's -saveEvent:span:error: didn't
include the error param.
Apple Bug ID: 5625184
I was not able to figure out the problems with adding and removing
events. So I created a similar application using some code from the
SimpleCalendar app. It's a lot simpler than SimpleCalendar as it
doesn't have a calendar view. You can download the code here.
http://idisk.mac.com/lee.gillen-Public/SimplerCalendar.zip
Lee
On Nov 14, 2007, at 11:19 PM, Lee wrote:
> The SimpleCalendar sample code does not allow adding events. When I
> run the application the "Add" and "Remove" buttons are disabled.
>
> I've looked at the code and all looks fine, can you figure out what
> is wrong?
>
> http://developer.apple.com/samplecode/SimpleCalendar/index.html
>
> Thanks,
> Lee
>
> PS: To run the application in debug I had to remove the 10.4 SDK in
> the project settings.