• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Trying blocks
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Trying blocks
      • From: Bill Cheeseman <email@hidden>
    • Re: Trying blocks
      • From: Greg Parker <email@hidden>
  • Prev by Date: NSManagedObjectModel
  • Next by Date: Breakpoint bubbles
  • Previous by thread: Re: NSManagedObjectModel
  • Next by thread: Re: Trying blocks
  • Index(es):
    • Date
    • Thread