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

MapUpdater doesn't accept AbstractObservables{T} other than Observables{T} #72

Closed
hhaensel opened this issue Jun 14, 2021 · 1 comment
Closed

Comments

@hhaensel
Copy link

Currently, Observables throws an error when trying to map!(any, r, o) where o is a normal Observable and r is of a different observable type R{T} <: AbstractObservable{T}. The root cause is the definition of MapUpdate:

struct MapUpdater{F, T} <: Function
    f::F
    observable::Observable{T}
end

map!(), map() and connect!() all support AbstractObservables.
Probably, the only thing that would need to be adpated is to change Observable{T} to AbstractObservable{T}.

For my use case that worked, but I may be overlooking something.

hhaensel added a commit to hhaensel/Observables.jl that referenced this issue Jun 14, 2021
This is the PR to JuliaGizmos#72

Currently, Observables throws an error when trying to `map!(any, r, o)` where o is a normal Observable and r is of a different observable type `R{T} <: AbstractObservable{T}`.

As `map!()`, `map()` and `connect!()` all support `AbstractObservables`, this is probably the only place, that needs to be adapted.
@hhaensel
Copy link
Author

Please have a look for an MWE here.

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

No branches or pull requests

1 participant