[TIMOB-10493] iOS: DashboardView rowCount and columnCount properties
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Low |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-04-22T16:31:49.000+0000 |
Affected Version/s | Release 3.0.0 |
Fix Version/s | 2013 Sprint 08 API, 2013 Sprint 08, Release 3.1.1, Release 3.2.0 |
Components | iOS |
Labels | api, community, module_dashboardview, qe-closed-3.1.1, qe-testadded, triage |
Reporter | Russell Frank |
Assignee | Vishal Duggal |
Created | 2012-08-20T09:27:29.000+0000 |
Updated | 2013-11-19T23:32:29.000+0000 |
Description
We should be able to specify a rowCount and columnCount when creating a DashboardView.
Pull request opened on Github: [#2782 iOS: DashboardView rowCount and columnCount properties](https://github.com/appcelerator/titanium_mobile/pull/2782)
Environment used for verification - Tested with Titanium SDK: 2.2.0.v20120830182512 Tested with Titanium Studio: 2.1.2.201208301612 Device - Simulator iOS 5.1 Machine OS - MAC 10.8
Property "rowCount" does not work, tested with SDK 3.0.2.GA Seems like value is not set in TiUIDashboardView.m:
Always returned the predefined number. Curiously columnCount works properly. Also see https://developer.appcelerator.com/question/149207/columncount-and-rowcount-do-not-work-well-in-dashboardview
Reopening based on latest comments.
@Danny: The property is marked as 'creation' in the docs because it's only available when you create the object. You can't set it on the proxy and have it change the rowCount and columnCount. This is because the items are laid out in an array of pages and there currently isn't code to relayout across pages if the counts change. I'm not sure how Alloy handles properties in the XML, but it appears that it probably tries to set them on the proxy *after* running the factory function, which will of course not work.
I don't use Alloy and of course I set the property in the creation statement:
Pull pending https://github.com/appcelerator/titanium_mobile/pull/4181 For workaround in current implementation call setData explicitly after creating the proxy (Remove data from creation dict).
Backport to 3_1_X https://github.com/appcelerator/titanium_mobile/pull/4201
code for testing
Tested with the code above, using: Appcelerator Studio, build: 3.1.1.201305062045 SDK, build: 3.1.1.v20130503173050 Devices: iPhone5 iOS 6.1.4 iPad4 iOS 6.1.3 Property columnCount works properly