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

Finish NSArray KVO methods #2068

Closed
rajsesh opened this issue Feb 23, 2017 · 2 comments
Closed

Finish NSArray KVO methods #2068

rajsesh opened this issue Feb 23, 2017 · 2 comments
Assignees
Milestone

Comments

@rajsesh
Copy link
Contributor

rajsesh commented Feb 23, 2017

These should throw exceptions per documentation.

addObserver:forKeyPath:options:context:
removeObserver:forKeyPath:
removeObserver:forKeyPath:context:

These should be implemented:

addObserver:toObjectsAtIndexes:forKeyPath:options:context:
removeObserver:fromObjectsAtIndexes:forKeyPath:context:
removeObserver:fromObjectsAtIndexes:forKeyPath:

@DHowett-MSFT
Copy link

@rajsesh is this for NSArray?

@rajsesh rajsesh changed the title f Finish NSArray KVO methods Feb 23, 2017
@rajsesh
Copy link
Contributor Author

rajsesh commented Feb 23, 2017

@DHowett-MSFT yes. I thought the title of "f" was descriptive enough.

aballway added a commit that referenced this issue Mar 23, 2017
Causes an NSException to be thrown if addObserver:forKeyPath* or removeObserver:forKeyPath* are called on NSArray as per documentation.

Implements addObserver:toObjectsAndIndexes* and removeObserver:fromObjectsAtIndexes* for NSArray by calling addObserver and remvoeObserver on each specified element. Though documentation states that this method is not a simple convenience wrapper, we cannot do so because our current implementation of KVO cannot support a single observer intermediary for multiple observees without a larger refactor than this issue calls for.

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

No branches or pull requests

3 participants