• 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
Block Behavior
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Block Behavior


  • Subject: Block Behavior
  • From: koko <email@hidden>
  • Date: Wed, 15 Feb 2012 13:14:32 -0700

I need to know why a line of code that is OK outside a Block is invalid inside.



=================
    [sp beginSheetModalForWindow:[self window] completionHandler:^(NSInteger result)
    {
        if (result == NSFileHandlingPanelOKButton)
        {
            Str px("a");
            prefs.Set((char*)"Designer1", (char*)"savepath", px ); <-- GIVES ERROR, NO MATCHING SET FUNCTION
        }
     }];

    Str px("a");
    prefs.Set((char*)"Designer1", (char*)"savepath", px ); <-- SAME CODE OUTSIDE BLOCK IS OK
=================
_______________________________________________

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: Block Behavior
      • From: Dave Zarzycki <email@hidden>
    • Re: Block Behavior
      • From: Greg Parker <email@hidden>
    • Re: Block Behavior
      • From: David Duncan <email@hidden>
    • Re: Block Behavior
      • From: Mike Abdullah <email@hidden>
  • Prev by Date: Re: Sandbox - Security Scoped URLs (10.7.3)
  • Next by Date: Re: CGContextSaveGState
  • Previous by thread: Re: CGContextSaveGState
  • Next by thread: Re: Block Behavior
  • Index(es):
    • Date
    • Thread