[ALOY-696] Support for Alloy.UI.create() and $.UI.create() in widgets
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-06-11T00:23:46.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Alloy 1.2.0, 2013 Sprint 12 |
Components | Runtime, Styling |
Labels | qe-testadded |
Reporter | Tony Lukasavage |
Assignee | Tony Lukasavage |
Created | 2013-06-08T15:02:37.000+0000 |
Updated | 2013-07-30T21:15:22.000+0000 |
Description
The Alloy.UI.create() and $.UI.create() functions allow you to create styled Titanium proxy objects within controllers. The current pathing though, does not account for widget paths. The controller's __path variable needs to reflect the full module path to the widget's controllers for it to work correctly.
Alloy should support the following functions for both standard controllers and widgets:
* Alloy.createStyle(controller, opts)
* $.createStyle(opts)
* Alloy.UI.create(controller, apiName, opts)
* $.UI.create(apiName, opts)
PR: https://github.com/appcelerator/alloy/pull/152 test app: https://github.com/appcelerator/alloy/tree/master/test/apps/testing/ALOY-696 Functional test can be considered passed if you can run the app on all supported platforms and execute the following steps successfully: * click on the main window * You should see 8 new labels appear in the scrollview. The first 4 show the 4 functions mentioned in the description being used by the controller (white text on red background). The next 4 labels show those 4 functions being used within a widget (yellow text on black background). * You should be able to click again and see more of the same labels in the scrollview.
Verified as working as expected on iOS, Android and Mobileweb. Titanium SDK 3.1.2.v20130726192706 Alloy 1.2.0-alpha Appcelerator Studio 3.1.2.201307261628 CLI 3.1.2 Node 0.8.22 Closing.