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-16266] exposed sections #5306

Merged
merged 3 commits into from Mar 7, 2014
Merged

Conversation

salachi
Copy link
Contributor

@salachi salachi commented Feb 2, 2014

Exposed sections as a property and method.
https://jira.appcelerator.org/browse/TIMOB-16266

@@ -33,7 +33,6 @@
TiC.PROPERTY_FOOTER_TITLE,
TiC.PROPERTY_DEFAULT_ITEM_TEMPLATE,
TiC.PROPERTY_SHOW_VERTICAL_SCROLL_INDICATOR,
TiC.PROPERTY_SECTIONS,
Copy link
Contributor

Choose a reason for hiding this comment

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

If you remove this, when user calls listview.sections = ... , propertyChanged() wont get called, thus nothing will happen. What you should do instead is go to individual methods like 'appendSection' and update the 'sections' property in Javascript.

Copy link
Contributor

Choose a reason for hiding this comment

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

You can set the Javascript object via Java by calling proxy.setProperty. I.e: proxy.setProperty('sections', mySection).

@hieupham007
Copy link
Contributor

Code reviewed. Please address comments

@salachi
Copy link
Contributor Author

salachi commented Feb 6, 2014

Addressed comments

@yuchi
Copy link

yuchi commented Feb 28, 2014

Whohoo! \o/

setProperty(TiC.PROPERTY_SECTIONS, getSections());
}

private ListSectionProxy[] getSections()
Copy link
Contributor

Choose a reason for hiding this comment

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

Make this public with the following annotations
@Kroll.method @Kroll.getProperty

Then you do not need to call setProperty all over the place

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will change

@vishalduggal
Copy link
Contributor

Code Reviewed. Please address comments

@salachi
Copy link
Contributor Author

salachi commented Mar 7, 2014

Addressed review comments

@vishalduggal
Copy link
Contributor

Code Reviewed. ACCEPTED

@vishalduggal
Copy link
Contributor

Functional Passed. APPROVED

vishalduggal added a commit that referenced this pull request Mar 7, 2014
[TIMOB-16266] exposed sections
@vishalduggal vishalduggal merged commit 4946a4d into tidev:master Mar 7, 2014
@yuchi
Copy link

yuchi commented Mar 7, 2014

Awesome. When the next version is out I’ll be able to cut away a lot of code! (by now I’m keeping the section indexes in an object 😒 )

farfromrefug pushed a commit to Akylas/titanium_mobile that referenced this pull request Aug 15, 2014
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