Hi,
When looking how to implement an NSOperationQueue with a loop, I found several
examples that have the following structure:
NSInteger i;
for ( i = 0; i < 1000; i++ ) {
[queue addOperationWithBlock:^{
i += 1;
}];
On Oct 2, 2012, at 5:49 PM, Koen van der Drift
wrote:
> Hi,
>
> When looking how to implement an NSOperationQueue with a loop, I found
> several examples that have the following structure:
>
> NSInteger i;
>
>for ( i = 0; i < 1000; i++ ) {
>[queue addOpera
On Oct 2, 2012, at 6:07 PM, davel...@mac.com wrote:
> I can't speak to the other examples since I haven't seen them, but the
> __block specifier is necessary if your block modifies the variable (your
> block does modify i). Your example also seems a bit strange since your for
> loop modifies i
Hey all,
Is it safe to re-enter -[NSWindow makeFirstResponder:]? Specifically, I
am thinking of overriding -becomeFirstResponder to call [window
makeFirstResponder:someOtherView].
The answer to this question seems intuitively yes, since that's how one
would expect a view makes use of the field ed
On Oct 2, 2012, at 6:19 PM, Koen van der Drift
wrote:
>
> On Oct 2, 2012, at 6:07 PM, davel...@mac.com wrote:
>
>> I can't speak to the other examples since I haven't seen them, but the
>> __block specifier is necessary if your block modifies the variable (your
>> block does modify i). Your
On Oct 2, 2012, at 8:43 PM, Koen van der Drift
wrote:
>
> On Oct 2, 2012, at 6:19 PM, Koen van der Drift
> wrote:
>
>>
>> On Oct 2, 2012, at 6:07 PM, davel...@mac.com wrote:
>>
>>> I can't speak to the other examples since I haven't seen them, but the
>>> __block specifier is necessary i
On Oct 2, 2012, at 9:21 PM, davel...@mac.com wrote:
> Only variables that are being modified by the block need to be declared with
> the __block specifier. You shouldn't be declaring the underlying instance
> variables as __block. You can mix and match ARC and non-ARC code. Google
> should hel