-
Notifications
You must be signed in to change notification settings - Fork 70
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
More info in model change event #104
Comments
deflexor, I've updated your code here: http://jsfiddle.net/pbkFL/1/ showing how to access those values: Here's the key change that pulls the data from the model. 'change': function(e,someone1,someone2) {
var someone1 = this.model.get( 'a' ),
someone2 = this.model.get( 'b' );
console.log( "a or b changed e: %o, someone1: %o, someone2: %o", e, someone1, someone2 ); |
Thank you for reply, but here is the updated snippet: And here how can we determine which children fired an event ? |
Yes, a solution to this would be very nice. Sometimes you need some sort of a "catch all" change-handler that depends on the actual changed element.
This seems the most obvious way to me. I guess it also could be appended to the event-parameter (to keep the agility syntax consistent). |
The event object / event handler parameters should contain at least:
BTW, this should exist for every Event, not just the Agility events. |
Here is code illustrating the issue:
http://jsfiddle.net/fLjeC/4/
If you change any of fields, you will see that
change
event callback function is called withonly single parameter, which is event. Why not add at least one extra parameter containing new value ?
The text was updated successfully, but these errors were encountered: