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
This isn't a huge deal to me as this isn't normal usage, but this surfaced as I was writing tests around some logic that I use to wrap jsviews.
If you take a look at http://jsfiddle.net/sAzVU/1/, you'll see that updating the element of a list via setProperty and a path like 'list.0', observeAll() doesn't trigger an event. Oddly, setting something in an object within an array, i.e. 'list.0.subattr', does trigger an event.
Anyways, not sure how much you were expecting to support something like this, but thought I'd point it out.
The text was updated successfully, but these errors were encountered:
Thanks Viraj. In general observable changes to arrays have to go through the array APIs, not setProperty. Using setProperty with paths like "myArray.2" is adding a key value pair to myArray treated as an object (hash/dictionary) with key "2". But I appreciate your bringing up the question. I'll try to check on the actual behavior and see if it is acceptable - or whether the support can/should be improved. And also it would be good if I can add some unit tests with scenarios of this kind.
This isn't a huge deal to me as this isn't normal usage, but this surfaced as I was writing tests around some logic that I use to wrap jsviews.
If you take a look at http://jsfiddle.net/sAzVU/1/, you'll see that updating the element of a list via setProperty and a path like 'list.0', observeAll() doesn't trigger an event. Oddly, setting something in an object within an array, i.e. 'list.0.subattr', does trigger an event.
Anyways, not sure how much you were expecting to support something like this, but thought I'd point it out.
The text was updated successfully, but these errors were encountered: