-
Notifications
You must be signed in to change notification settings - Fork 32
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
Suggestion: shorter name for setexcludinghandlers!
#77
Comments
Hi @BioTurboNick , @SimonDanisch , @timholy I want to come back on my o = Observable(1)
# standard assignment
o[] = 10
# silent assignment by an exclamation mark between the brackets
o[!] = 100 Furthermore we pass arguments that are not o = [10, 20, 30]
o[2]
# 20
on(o) do x
println("Hello $x")
end
o[2] = 200
# Hello [10, 200, 30] The same with mutable struct HH
a::Integer
b::Integer
end
o = Reactive(HH(1,2))
on(o) do x
println("Hello $x")
end
o.a = 10
# Hello HH(10, 2) Happy to hear what you think. Note: Reactive has nothing to do with the package Reactive. It is an observable type |
This should really be a separate issue... |
We can make it a different issue with a better name. |
Shall I open a draft PR and paste an adaptation of my code? |
I'dinclude push!, pushfirst!, empty! accordingly |
Yeah, that'd be an idea. on(array, :setindex) do (idx, new_value)
...
end |
Yeah, that's what we did. We declared Reactive <: AbstractObservable. |
Just to throw this out there - |
That's not possible, you have to use an operator character. |
(Never mind... I was running a garbled set of package versions because of a rogue Project.toml that wound up in my Windows home directory somehow. ) Feel free to delete this comment, or ask me to. Not sure what the process is here.
|
setexcludinghandlers!
is a bit long. Something like the following might be better:setsilent!
setquiet!
setmuted!
And just a note here that if/when this is chosen, the examples in the GtkObservables.jl docs need to be updated. Currently uses
.value
, which doesn't work because that's not the current field name.The text was updated successfully, but these errors were encountered: