Comments (7)
Why not just accept KVO options (which include the option to receive an initial notification)?
from reactivecocoa.
Maybe, but that'd require a bit more support for propagating the change dictionary. Which might be good to have anyways, but seems separate from this particular issue.
from reactivecocoa.
I mostly call it from a macro, so it's easy to switch between RACAble
and RACAbleWithStart
depending on whether I want the initial value or not.
I don't think much of my code would break if this behaviour was changed, and even the parts that did break would be trivial to fix, but I'd still rather have the option to choose whether I want the initial value or not, after all you do get the option with vanilla KVO.
from reactivecocoa.
@joshaber The change dictionary is mostly orthogonal โ just make it clear you can't get new/old no matter what. Initial and prior options are still really useful.
from reactivecocoa.
Closing this for now. I think the real problem is that it can be hard to know if you need to use RACAbleWithStart
instead of RACAble
to get the behavior you want. This might just be papering over the issue.
from reactivecocoa.
just make it clear you can't get new/old no matter what.
Why is this? -rac_addObserver:forKeyPath:options:queue:block:
doesn't look like it would have issues with it.
from reactivecocoa.
I mean that you wouldn't be able to get KVO "diffs", like added/removed objects in an arrayย (obtained from the KVO change dictionary, as generated by NSKeyValueObservingOptionNew
or NSKeyValueObservingOptionOld
), because that would mean that the signal is sending different kinds of values at different times.
from reactivecocoa.
Related Issues (20)
- [SwiftPM on Xcode] Package resolution failed HOT 2
- Unable to compile targeting macOS Catalyst using SwiftPM (fix exists)
- why RACObserve(self.scoreStepper,value) not available? HOT 1
- App rejected for HealthKit metadata HOT 4
- UISearchBar delegate proxy crash on Mac Catalyst HOT 1
- Build error when using ReactiveCocoa via Swift Package Manager HOT 3
- can not deinit HOT 2
- Xcode12 ReactiveObj archive error HOT 3
- How to implement PIN input with attempts HOT 1
- Dispose SignalProducer created via Action HOT 1
- UnsafeKVOProperty initializer crashes after updating to ReactiveSwift 6.5.0 HOT 1
- EXC_BAD_ACCESS Cash with NSURL HOT 1
- ReactiveCocoa 11.1.0 incompatible with ReactiveSwift 6.6.0 HOT 5
- Xcode 12.5 beta 3 can't build ReactiveCocoa with SwiftPM. HOT 2
- Using "<~" binding function with Signal.Observers causes memory leaks. HOT 1
- Upgrading from very old version (2.5) fails - can't find ReactiveCocoa.h HOT 1
- Cannot remove an observer <RACKVOProxy 0x280264940> for the key path "unit" from <HGConfigureModel 0x280d25050> because it is not registered as an observer.
- Current version can't be compiled with the latest ReactiveSwift version HOT 2
- Current version can't be compiled with the latest ReactiveSwift version HOT 6
- Add output values support for interception
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reactivecocoa.