Skip to content
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

Merged
merged 3 commits into from Aug 10, 2012
Merged

[TIMOB-10347] Implemented support for applyProperties method. #2699

merged 3 commits into from Aug 10, 2012

Conversation

nebrius
Copy link
Contributor

@nebrius nebrius commented Aug 8, 2012

No description provided.

@@ -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
Copy link
Contributor

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).

Copy link
Contributor Author

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];
}
},

Copy link
Contributor

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().

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@cb1kenobi
Copy link
Contributor

Code reviewed and tested. Request APPROVED.

cb1kenobi added a commit that referenced this pull request Aug 10, 2012
[TIMOB-10347] Implemented support for applyProperties method.
@cb1kenobi cb1kenobi merged commit 1e86228 into tidev:master Aug 10, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants