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

Re: Block Behavior


  • Subject: Re: Block Behavior
  • From: koko <email@hidden>
  • Date: Wed, 15 Feb 2012 17:41:28 -0700

Apple llvm 3.0

No matching member function for call to 'Set'

Candidate function not viable: 'this' argument has type 'const BPreferences', but method is not marked const


As you can see from what I included this error is not generated if the function being called is outside the block


On Feb 15, 2012, at 4:55 PM, Greg Parker wrote:

> On Feb 15, 2012, at 12: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
>> =================
>
> What compiler and version are you using? What is the exact text of the error message?
>
>
> --
> Greg Parker     email@hidden     Runtime Wrangler
>
>
>


_______________________________________________

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


References: 
 >Block Behavior (From: koko <email@hidden>)
 >Re: Block Behavior (From: Greg Parker <email@hidden>)

  • Prev by Date: Re: [ Was NSReadPIxel ]
  • Next by Date: Re: Block Behavior
  • Previous by thread: Re: Block Behavior
  • Next by thread: Re: Block Behavior
  • Index(es):
    • Date
    • Thread