Hi.

I have class MyDot. This class has function:
- (BOOL) containsPoint: (NSPoint) pt;

I have also NSArray, which contains several MyDot objects:
NSArray* dots;

I want to get new array
NSArray* newDots
which contains MyDot objects and
for these dots containsPoint:(NSPoint)pt = YES.

How can I do that?

I would like to write something like that:

NSPoint checkedPoint = NSMakePoint(100, 100);

NSPredicate* predicate = [NSPredicate predicateWithFormat: @"containsPoint %p == YES ", checkedPoint]; //i don't know what to write here

NSArray* newDots = [dots filteredArrayUsingPredicate: predicate];

I would be glad if you helped me.

--
Alexey Baev








_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to