-
Notifications
You must be signed in to change notification settings - Fork 75
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
global 'change' doesn't work #28
Comments
Can you please give an example or a jsfiddle - which demonstrates the problem you are facing? See this particular test case (highlighted in yellow) which does both |
here is the jsfiddle : http://jsfiddle.net/GV4Tq |
Thanks for clarifying. This is deliberate. The rationale for introducing fully qualified paths was that the path would give you info about which node in the hierarchy has changed and you could get the info about the changed node through the event arguments. We had deliberated about introducing the global change event - at higher levels of the object graph - a couple of times, but settled for fully qualified paths at the end. While it is not difficult to add the change you want, there are some concerns
Nonetheless, I will update the pitfalls section of the documentation to make this explicit. |
Thank you for this detailed answer, and for maintaining such a useful |
I have updated (4324af7) the pitfalls section of the documentation and cross referenced this issue. I am glad to hear that the extension is useful to your work. If it's possible, do share a URL. I can put up a usage list if I hear from other folks as well. And yes, don't forget to star us if you like the extension! |
With BB-Associations v0.5.0+, you can now use the nested-change event for global events. See your revised fiddle here. For rationale, you can see the nested-change section in the event catalogue documentation. |
I just test your last fiddle example using "nested-change" event and it does not work (i use v0.6.2) |
it is important to note that you can't listen to associated model changes just by having
this.on('change', callback);
You need to listen to this.on('change:associatedModel', callback)
The text was updated successfully, but these errors were encountered: