Skip to content
This repository has been archived by the owner on Jun 2, 2018. It is now read-only.

removeObserverWithBlockToken should be removed #27

Closed
ghost opened this issue Sep 15, 2011 · 2 comments
Closed

removeObserverWithBlockToken should be removed #27

ghost opened this issue Sep 15, 2011 · 2 comments

Comments

@ghost
Copy link

ghost commented Sep 15, 2011

[NSObject+BlockObservation removeObserverWithBlockToken:] should be removed not deprecated, because it is not compatible anymore with the [NSObject+BlockObservation addObserverForKeyPath:task:] call. Code that uses this old method will crash on

NSString *identifier = [split objectAtIndex:1];
@zwaldowski
Copy link
Collaborator

Yep, fixed! I wasn't paying too much attention to that one. Thanks!

@ghost
Copy link
Author

ghost commented Sep 16, 2011

Yep, but now you've also removed - (NSString *)addObserverForKeyPath:(NSString *)keyPath task:(BKObservationBlock)task. That wasn't necessary, I guess. This method simply created an identifier for you instead of making the user create one every time he added an observer. It was quite convenient. I was only stating that it did not work with removeObserverWithBlockToken: since this method expected an internal block token composed of the keyPath and the identifier, but the addObservermethod only returned the identifier.

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

No branches or pull requests

1 participant