Observable.Add(handler) to a ISignal doesn't execute the handle function when the property value has changed
See original GitHub issueAs the title suggest, when trying to Observable.Add( handler )
there is an issue where, when changing the property binded to this Observable, the handler is not called.
This issue has been reproduced in the FSI by referencing only Gjallarhorn.dll. The steps are the following :
run the following code line by line by sending it to F# interactive. The last 3 lines, do not trigger any of the two observables handlers.
module test =
type V = { A : int ; B : int }
let v = Mutable.create { A = 0 ; B = 0 }
let a = v |> Signal.map (fun v -> v.A)
let b = v |> Signal.map (fun v -> v.B)
a |> Observable.add (fun a -> printfn "A changed to %d" a)
b |> Observable.add (fun b -> printfn "B changed to %d" b)
v.Value <- { v.Value with A = 12 }
v.Value <- { v.Value with B = 2 }
v.Value <- {A = 5 ; B = 6} ```
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
c# - ObservableCollection PropertyChanged event
I want to subclass ObservableCollection to add a property to it. Unfortunately, the PropertyChanged event is protected. Basically, I want to ...
Read more >ObservableCollection not noticing when Item in it changes ...
Here is a drop-in class that sub-classes ObservableCollection and actually raises a Reset action when a property on a list item changes.
Read more >Using observables to pass values
Observables are declarative —that is, you define a function for publishing values, but it is not executed until a consumer subscribes to it....
Read more >Observables compared to other techniques
Observables are very similar to event handlers that use the events API. Both techniques define notification handlers, and use them to process multiple...
Read more >Signals in Angular – How to Write More Reactive Code
When the onQuantitySelected() method has completed its execution, Angular's change detection can finally run. The template reads the signal, and ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Fixed in 0.0.9 - now on NuGet https://www.nuget.org/packages/Gjallarhorn.Bindable.Wpf/
Let me know if you have any other issues.
thanks, got it - I did not pay attention to the “line by line” =(