Re: Fetching a CalEvent with earliest startDate
Re: Fetching a CalEvent with earliest startDate
- Subject: Re: Fetching a CalEvent with earliest startDate
- From: Lee Gillen <email@hidden>
- Date: Mon, 4 Feb 2008 23:50:47 -0500
Given an array of CalEvents how can I fetch a single CalEvent with
the earliest startDate?
I am getting an array of CalEvents from:
NSArray *calendarEvents = [[CalCalendarStore defaultCalendarStore]
eventsWithPredicate:eventsPredicate];
NSDate *minDate = [calendarEvents valueForKeyPath:@"@min.startDate"];
I don't see any method in NSPredicate or NSExpression that allows me
to do an evaluation function @min on an object's date value ivar.
The solution was using simple KVC.
_______________________________________________
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