You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If there's a better place to post inquiries like this, please let me know. Would it make sense for FlatMapProperty to have orElse(...) implementations that return Property<?> types? Consider the following usage of EasyBind:
Basically I'm trying to do bidirectional select bindings.
I'm also curious with regards to how a swap of SomeModel would be handled in my first example. I assume it would be treated as a change in the selected property, so the disabled property would be updated from modelDisabled. Is that correct?
The text was updated successfully, but these errors were encountered:
I think we could define orElse(T) returning a Property<T> in a meaningful way. The task is to define the behavior of set(T) on the returned property. We could define p.orElse(t0).set(t) to be the same as p.set(t).
Anyway, doesn't the following serve your purpose equally well?
Sorry for the slow response. Yes, the snippet you posted accomplishes what I was trying to do. Overwriting the default value isn't a big deal. I would normally have the state bound to some type of input control (ie: checkbox) and would ensure that control is disabled when model is null.
It doesn't make any difference to me if orElse(...) is able to return a Property<T> given the example you suggested.
Hi,
If there's a better place to post inquiries like this, please let me know. Would it make sense for
FlatMapProperty
to haveorElse(...)
implementations that returnProperty<?>
types? Consider the following usage of EasyBind:Assuming the above is a reasonable thing to do, I'd like to handle the
null
cases more explicitly. For example:Basically I'm trying to do bidirectional select bindings.
I'm also curious with regards to how a swap of
SomeModel
would be handled in my first example. I assume it would be treated as a change in the selected property, so thedisabled
property would be updated frommodelDisabled
. Is that correct?The text was updated successfully, but these errors were encountered: