Re: Block Behavior
Re: Block Behavior
- Subject: Re: Block Behavior
- From: Dave Zarzycki <email@hidden>
- Date: Wed, 15 Feb 2012 22:34:06 -0500
Koko,
Are you using C++? (Probably.) If you are, then do you have a "const" version of Set? (Probably not.)
If the above is not true, then what is the exact compiler error, and can you reduce this down to a test case?
Thanks!
davez
On Feb 15, 2012, at 3:14 PM, koko <email@hidden> wrote:
> 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
_______________________________________________
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