| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
I probably don't understand the Objective-C features, but I am trying to iterate over a list of objects (from the rear) and discover the first one to satisfy a given boolean expression.
my code is:
@interface VectorOfStates : NSMutableArray
{
...
}
-(State*) FindLastIf:(SEL) aPred;
...
@end
// find last location on statestack
-(State*) FindLastIf:(SEL) aPred
{
NSEnumerator *enumerator = [self reverseObjectEnumerator];
id object;
while (object = [enumerator nextObject])
{
if((BOOL)[object aPred]) <------------------------- warning here
| References: | |
| >re Boolean Predicates (From: John James <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.