[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Slightly odd behaviour with enumerateObjectsUsingBlock:

From: Thomas Davie
Subject: Slightly odd behaviour with enumerateObjectsUsingBlock:
Date: Mon, 28 Feb 2011 11:22:48 +0000

While this seems to work right, I'm getting a pretty odd behaviour with 
enumerateObjectsUsingBlock: producing an odd log.  Does anyone know what's up 

~/Documents/Test$ ./obj/Test
Calling [GSInlineArray -enumerateObjectsUsingBlock:] with incorrect signature.  
Method has address@hidden:8^{?=^vii^?}16, selector has 
2011-02-28 11:04:51.802 Test[25104] 0 - a
2011-02-28 11:04:51.805 Test[25104] 1 - b
2011-02-28 11:04:51.805 Test[25104] 2 - c
address@hidden:~/Documents/Test$ cat Test.m
#import <Foundation/Foundation.h>

int main(int argc, char **argv)
    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
    NSArray *array = [NSArray arrayWithObjects:@"a", @"b", @"c", nil];
    [array enumerateObjectsUsingBlock:^ void (id obj, NSUInteger idx, BOOL 
         NSLog(@"%lu - %@", idx, obj);
    [pool drain];
    return 0;

The same happens with my (mostly copied from array so no surprise) 
implementation for NSSet.  I've filed a bug report to go with this one (id 


Tom Davie

reply via email to

[Prev in Thread] Current Thread [Next in Thread]