JuliaGizmos / Observables.jl

observable refs
Other
105 stars 32 forks source link

Reintroduce setexcludinghandlers! #97

Closed rasmushenningsson closed 2 years ago

rasmushenningsson commented 2 years ago

setexcludinghandlers! was removed in https://github.com/JuliaGizmos/Observables.jl/pull/84/files#diff-717dd66a485f4523942145feb17dfcebc7bf9e137ee03fa29c1ef8c8c3b1cad6L272 but it's unclear how to update code that uses setexcludinghandlers!.

This pull request just puts the old code back, since e.g. WebIO still relies on setexcludinghandlers!.

rasmushenningsson commented 2 years ago

If there's a recommended way to do this in downstream packages, I can open a PR in WebIO instead. :slightly_smiling_face:

rasmushenningsson commented 2 years ago

Bump. 🙂 This is causing downstream issues for users of PlotlyJS.jl: https://github.com/JuliaPlots/PlotlyJS.jl/issues/440

rasmushenningsson commented 2 years ago

Bump :slightly_smiling_face:

SimonDanisch commented 2 years ago

Sorry, always looked at this, weren't exactly sure if that's the right fix and then forgot about it. I searched through the last versions and couldn't find setexcludinghandlers!. Did you mean to bring this function back:

function setexcludinghandlers(observable::AbstractObservable, val, pred=x->true)
    setindex!(observable, val; notify=pred)
end

Or did I not search far enough?

SimonDanisch commented 2 years ago

Oh nevermind, I got confused by the missing version tags and skipped 0.4 in the search, since I thought that was the most recent release :( I guess that's the right fix then ;)

rasmushenningsson commented 2 years ago

Thanks!