[ALOY-774] Alloy dynamic styling can't handle WPATH
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-08-05T16:18:56.000+0000 |
Affected Version/s | Alloy 1.2.0 |
Fix Version/s | Alloy 1.2.0, 2013 Sprint 16 |
Components | Runtime, Styling |
Labels | qe-testadded |
Reporter | Timan Rebel |
Assignee | Tony Lukasavage |
Created | 2013-08-03T13:31:43.000+0000 |
Updated | 2013-08-06T00:30:46.000+0000 |
Description
Using Alloy 1.2.0-Alpha5 and TiSDK 3.1.1GA
Test app source: https://dl.dropboxusercontent.com/u/1849335/Titanium-Jira/WPATH-test.zip
Error message
[ERROR] : Script Error {
[ERROR] : backtrace = "#0 () at file:///Users/timanrebel/Library/Application%20Support/iPhone%20Simulator/7.0/Applications/7ABD14AC-FA2C-4D47-AE4D-561F698D3C12/WPATH-test.app/alloy/widgets/wpathWidget/styles/widget.js:9";
[ERROR] : line = 6;
[ERROR] : message = "Can't find variable: WPATH";
[ERROR] : name = ReferenceError;
[ERROR] : sourceId = 296484448;
[ERROR] : sourceURL = "file:///Users/timanrebel/Library/Application%20Support/iPhone%20Simulator/7.0/Applications/7ABD14AC-FA2C-4D47-AE4D-561F698D3C12/WPATH-test.app/alloy/widgets/wpathWidget/styles/widget.js";
[ERROR] : }
[ERROR] : Script Error Module "alloy/widgets/wpathWidget/styles/widget" failed to leave a valid exports object
widget.tss
".myImage": {
image: WPATH('testImage.jpg')
}
widget.js
var myImage = $.UI.create('ImageView', {
classes: 'myImage'
});
Do you have to do anything to cause the error?
Should've included that! Just execute $.UI.create, which happens directly in the test app on requiring the widget
PR: https://github.com/appcelerator/alloy/pull/212 test app: https://github.com/appcelerator/alloy/tree/master/test/apps/widgets/wpath *NOTE:* Make sure to use Alloy 1.2.0-alpha6 or higher to test. To functionally test, add the following line of code to the end of the widget.js Javascript controller in the com.test.hellobutton widget in the given test:
Executing the app with this line of code would cause a runtime exception about WPATH missing before this issue was resolved. It should now run without error.
Verified as fixed on iOS, Android and MobileWeb Titanium SDK 3.1.2.v20130802180729 Alloy 1.2.0-alpha6 Appcelerator Studio 3.1.2.201308021524 CLI 3.1.1 Node 0.10.13 Closing.