predicate with smallest x-coordinate?
predicate with smallest x-coordinate?
- Subject: predicate with smallest x-coordinate?
- From: Bob Ueland <email@hidden>
- Date: Thu, 8 Nov 2007 07:17:06 -0800 (PST)
I have a Fish class with two ivars declared like this
@interface Fish : NSObject
{
NSString *name;
NSRect frame;
}
....
I create a NSMutableArray which contains a number of Fish objects. When I want to filter out all Fish objects whose name begins with letter B i use
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"name beginswith 'B'"];
That works. But now I want to filter out the Fish that has the smallest x-coordinate (that is the smallest frame.origin.x). How should I write my predicate?
Thanks Bob
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
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