Ok. I need to read up on blocks … I was pushed to this because of using
beginSheetModalForWindow:completionHandler:
the __block prefix solved the problem.
Thanks.
-koko
On Feb 15, 2012, at 11:00 PM, Jens Alfke wrote:
>
> On Feb 15, 2012, at 4:41 PM, koko wrote:
>
>> Candidate function not
On Feb 15, 2012, at 4:41 PM, koko wrote:
> Candidate function not viable: 'this' argument has type 'const BPreferences',
> but method is not marked const
Blocks can’t modify variables in the enclosing scope unless the variables are
marked ‘__block’. In C++ code, I suppose that extends to inter
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 wrote:
> I need to know
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
On Feb 15, 2012, at 12:14 PM, koko 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
Which compiler are you using?
On Feb 15, 2012, at 12:14 PM, koko 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 (
Give us the full details. What specific error are you seeing?
On 15 Feb 2012, at 20:14, koko 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
> r