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
[TIMOB-10347] Implemented support for applyProperties method. #2699
Conversation
@@ -61,3 +61,13 @@ methods: | |||
summary: A dictionary of keys and values to add to the <Titanium.Event> object | |||
sent to the listeners. | |||
type: Dictionary | |||
- name: applyProperties | |||
summary: Applies the properties to the proxy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation is tweaked--looks like you have tabs instead of spaces.
Also, please add a period at the end fo both summaries (above and the parameter summary, below).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
this[i] = props[i]; | ||
} | ||
}, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or you could have just done:
applyProperties: function(props) {
require.mix(this, props);
}
There's a bit of a debate if var i should go in the for loop or not. JSLint says var i should NOT go in the for loop. However, JSLint says you should do a hasOwnProperty() check on i. mix() does the hasOwnProperty() check. I would say move the var into the for loop or use require.mix().
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
Code reviewed and tested. Request APPROVED. |
[TIMOB-10347] Implemented support for applyProperties method.
No description provided.