Comments (5)
I've ported across a lot of what's in Bond, here: https://github.com/tonyarnold/ReactiveAppKit
Feel free to grab what you want 👍
from reactivekit.
Thanks @tonyarnold. I've been away for past couple of months, but I'm coming back soon and will port that as well as make some tweaks and improvements to the frameworks.
from reactivekit.
Nice work, @srdanrasic and @tonyarnold!
I've given this code a go over the weekend and the NSTableView is working well, so far.
I've run into unexpected results with binding a String and an NSTextField, however.
Observations:
- I'm able to bind an NSTextField to a String, but not the inverse.
- On invoking observe to the String and the NSTextField, the NSTextField only calls the closure on observe, not on subsequent value changes.
- The bind of NSTextField to a string does not update the String on change of the NSTextField
- The property on the NSControl extension is called "rStringleValue". Is this intentional or a typo for "rStringValue"?
Any thoughts?
Below is the code I'm using in the VoewController after creating a default swift project in xcode.
import Cocoa
import ReactiveKit
import ReactiveAppKit
class ViewController: NSViewController {
@IBOutlet var testField: NSTextField?
var testString = Observable<String?>("")
let disposeBag = DisposeBag()
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
testField?.stringValue = "foo"
testField?.rStringleValue.bindTo(testString)
// Fails. Cannot invoke 'bindTo' with an argument list of type '(NSTextField?)'
// testString.bindTo(testField)
testField?.rStringleValue.observe { value in
print(value)
}.disposeIn(self.disposeBag)
testString.observe { value in
print(value)
}.disposeIn(self.disposeBag)
testField?.stringValue = "bar"
testString.value = "baz"
}
deinit {
self.disposeBag.dispose()
}
override var representedObject: AnyObject? {
didSet {
// Update the view, if already loaded.
}
}
}
from reactivekit.
@srdanrasic Instead of duplicating all the amazing job you have already done in Bond, why don't you just add it as a subproject? Easier to maintain, no?
from reactivekit.
This is now part of Bond framework.
from reactivekit.
Related Issues (20)
- 3.15.3+ .... UI API called on background thread HOT 4
- Replace errors with nil? HOT 1
- ReactiveKit + Combine, combined? HOT 3
- First Where Violation when using filter first
- Crash: Simultaneous accesses, but modification requires exclusive access HOT 8
- Update cocoapods HOT 3
- Silently updating underlying value of `Published` property wrapper? HOT 2
- Help resolving : Thread 2: EXC_BAD_ACCESS (code=2, address=0x7000077f4fb8) HOT 6
- filterElement to filter inner sequence ? HOT 3
- Transforming a sequence into a signal of sequence HOT 3
- Compilation issues with Xcode 12 Beta 4 ? HOT 3
- SPM problems with loading duplicate libs when using modules / frameworks HOT 3
- AnyCancellable store(in set inout Set<AnyCancellable>) isn't thread-safe
- Can't compile under Xcode 12.4 HOT 7
- append does not dispose the second signal
- Deadlocks.
- Xcode 13 and 14 compiling issues HOT 1
- Swift compiler type-check
- Can't compile with XCode 14.3.0 HOT 1
- Can't compile using carthage on Xcode 14.3.1
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 reactivekit.