Git Product home page Git Product logo

Comments (5)

 avatar commented on August 22, 2024

Thank you for reporting this issue and appreciate your patience. We've notified the core team for an update on this issue. We're looking for a response within the next 30 days or the issue may be closed.

from kvocontroller.

kimon avatar kimon commented on August 22, 2024

Thank you for your patience. We're going to close out this issue. If you're still experiencing the problem described, please reopen the issue - thanks!

from kvocontroller.

siyusong avatar siyusong commented on August 22, 2024

I can confirm that I am still experiencing this problem when using 1.0.3. Can we reopen this issue?

from kvocontroller.

wizzardchao avatar wizzardchao commented on August 22, 2024

Hi @siyusong, even the native KVO system will call the block simultaneously before the registration of KVO if you specify option NSKeyValueObservingOptionInitial. At that time, the registration is not completed.
So I think it's not a bug of FBKVOController, you can just remove the Initial option as it's a limitation of KVO.

from kvocontroller.

siyusong avatar siyusong commented on August 22, 2024

Hi @wizzardchao,

Thanks for the explanation. I checked Apple's documentation of NSKeyValueObservingOptionInitial, and it indeed mentioned the fact that observer registration may not be completed in that case:

  • NSKeyValueObservingOptionInitial

If specified, a notification should be sent to the observer immediately, before the observer registration method even returns.

However, I disagree with you that this is not a bug of KVOController. The OP of this issue and I are using - unobserve: in KVOController, not - removeObserver:forKeyPath: method in Foundation. The discussion section of - unobserve: clearly mentions that, if the object is not observed, "this method results in no operation".

Therefore, I think it's reasonable for me to expect that - unobserve: method (and its siblings) would never result in an error.

from kvocontroller.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.