Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EXC_BAD_ACCESS while trying to observe NSOperation properties #4

Open
wiistriker opened this issue Apr 30, 2014 · 0 comments
Open

EXC_BAD_ACCESS while trying to observe NSOperation properties #4

wiistriker opened this issue Apr 30, 2014 · 0 comments

Comments

@wiistriker
Copy link

    NSBlockOperation *operation = [NSBlockOperation blockOperationWithBlock:^{
        NSLog(@"some task");
    }];

    [operation addObserver:self
                forKeyPath:@"isExecuting"
                   options:NSKeyValueObservingOptionNew
                   context:nil
                 withBlock:^(NSDictionary *change, void *context) {
                     BOOL isExecuting = [change[NSKeyValueChangeNewKey] boolValue];
                     if (isExecuting) {
                         NSLog(@"operation is executing");
                     }
                 }];

    [operation start];

throw EXC_BAD_ACCESS at https://github.com/sleroux/KVO-Blocks/blob/0.1.0/KVO%20Blocks/NSObject%2BKVOBlocks.m#L30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant