Replies: 1 comment 1 reply
-
Thanks for the detailed analysis and I apologize for the long delay. The behaviour is not by design and more as a result of flawed implementation, which I never got around to fixing |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
ObservablePropertyFactory.GetPropertyValue()
is interpreting the legitimate null value of the final property in the member chain as "unobtainable", and consequentlyAutoRefresh()
doesn't fire. I would suggest setting this property to null is a legitimate value change andAutoRefresh()
should fire.Further, setting the parent property to null correctly leads to an "unobtainable" value, but I still think
AutoRefresh()
should fire. An "unobtainable" value could (and in my opinion should) be considered distinct from an "obtainable null".Having looked around the code I think there are potentially a number of of reasons why I might be observing this behaviour and it is difficult for me to know which is misbehaving, if indeed this isn't by design...
Annotated example code:
If the misbehaviour is that a null final member value shouldn't be considered "unobtainable", then the following change gives me the behaviour I expect, however this class is too fundamental for me to understand the potential wide-spread implications:
Alternatively, if you allow the passing of a non-null
fallbackValue
fromAutoRefresh()
toWhenPropertyChanged()
then this also works, is much lower risk, and is backward compatible:Which could be implemented a little more cleanly via a flag:
If all of the above is by design, then I have no problem creating my own flavour of
AutoRefresh()
. If it is not by design, then it is beyond me to know where precisely to make, and propose, the change. Thoughts?Beta Was this translation helpful? Give feedback.
All reactions