Titanium JIRA Archive
Alloy (ALOY)

[ALOY-774] Alloy dynamic styling can't handle WPATH

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2013-08-05T16:18:56.000+0000
Affected Version/sAlloy 1.2.0
Fix Version/sAlloy 1.2.0, 2013 Sprint 16
ComponentsRuntime, Styling
Labelsqe-testadded
ReporterTiman Rebel
AssigneeTony Lukasavage
Created2013-08-03T13:31:43.000+0000
Updated2013-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'
});

Comments

  1. Tony Lukasavage 2013-08-03

    Do you have to do anything to cause the error?
  2. Timan Rebel 2013-08-03

    Should've included that! Just execute $.UI.create, which happens directly in the test app on requiring the widget
  3. Tony Lukasavage 2013-08-05

    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:
    require('alloy/widgets/com.test.hellobutton/styles/widget');
    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.
  4. Federico Casali 2013-08-06

    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.

JSON Source