Trying blocks
Trying blocks
- Subject: Trying blocks
- From: Charlie Dickman <email@hidden>
- Date: Wed, 28 Oct 2009 20:56:58 -0400
I am trying to implement a block in one of my apps. The code looks
like this...
BOOL (^fillWindow)(void) = ^(void) {
BOOL empty = YES;
int s = 0;
for (NSTextField *theTextField in textFieldArray) {
int textFieldValue = [[theTextField stringValue] intValue];
empty = empty && (textFieldValue == 0);
[thePuzzle replaceObjectAtIndex: s++ withObject: [NSNumber
numberWithInt: sudokuTextFieldValue]];
}
return empty;
};
if (!fillWindow()) {...
It compiles fine but the load fails with...
"__NSConcreteGlobalBlock", referenced from:
___block_holder_tmp_1.1207 in Controller.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
Can anyone explain this and help me with what I'm not doing or not
doing right?
Charlie Dickman
email@hidden
_______________________________________________
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