[ALOY-1053] Build error using 'type' property
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-06-17T00:13:18.000+0000 |
Affected Version/s | Alloy 1.4.0 |
Fix Version/s | Alloy 1.5.0, Alloy 1.4.0 |
Components | Styling |
Labels | qe-testadded |
Reporter | Alan Leard |
Assignee | Tim Poulsen |
Created | 2014-06-16T16:59:50.000+0000 |
Updated | 2014-06-20T22:53:58.000+0000 |
Description
When building an app that works on 3.2.3 I receive the following error:
[INFO] : [sliderPopover.xml] view processing...
[INFO] : style: "sliderPopover.tss"
[INFO] : view: "sliderPopover.xml"
[DEBUG] : /usr/local/lib/node_modules/alloy/Alloy/commands/compile/styler.js:360
[DEBUG] : if(typeof style.type !== 'undefined' && (style.type).indexOf('Ti.UI.PICKE
[DEBUG] :
[DEBUG] : ^
[ERROR] : : Object 1 has no method 'indexOf'
[DEBUG] : at processStyle (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/styler.js:360:59)
[DEBUG] : at Object.exports.processStyle (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/styler.js:411:2)
[DEBUG] : at Object.exports.generateStyleParams (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/styler.js:573:20)
[DEBUG] : at parse (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/parsers/default.js:37:27)
[DEBUG] : at Object.exports.parse (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/parsers/base.js:11:17)
[DEBUG] : at Object.exports.parse (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/parsers/default.js:10:27)
[DEBUG] : at parse (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/parsers/Ti.UI.Label.js:17:30)
[DEBUG] : at Object.exports.parse (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/parsers/base.js:11:17)
[DEBUG] : at Object.exports.parse (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/parsers/Ti.UI.Label.js:6:27)
[DEBUG] : at Object.exports.generateNode (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/compilerUtils.js:306:48)
[DEBUG] : at /usr/local/lib/node_modules/alloy/Alloy/commands/compile/compilerUtils.js:380:29
[DEBUG] : at Array.forEach (native)
[DEBUG] : at Function._.each._.forEach (/usr/local/lib/node_modules/alloy/Alloy/lib/alloy/underscore.js:79:11)
[DEBUG] : at Object.exports.generateNode (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/compilerUtils.js:375:5)
[DEBUG] : at /usr/local/lib/node_modules/alloy/Alloy/commands/compile/compilerUtils.js:380:29
[DEBUG] : at Array.forEach (native)
[DEBUG] : at Function._.each._.forEach (/usr/local/lib/node_modules/alloy/Alloy/lib/alloy/underscore.js:79:11)
[DEBUG] : at Object.exports.generateNode (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/compilerUtils.js:375:5)
[DEBUG] : at /usr/local/lib/node_modules/alloy/Alloy/commands/compile/compilerUtils.js:380:29
[DEBUG] : at Array.forEach (native)
[DEBUG] : at Function._.each._.forEach (/usr/local/lib/node_modules/alloy/Alloy/lib/alloy/underscore.js:79:11)
[DEBUG] : at Object.exports.generateNode (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/compilerUtils.js:375:5)
[DEBUG] : at /usr/local/lib/node_modules/alloy/Alloy/commands/compile/index.js:570:28
[DEBUG] : at Array.forEach (native)
[DEBUG] : at Function._.each._.forEach (/usr/local/lib/node_modules/alloy/Alloy/lib/alloy/underscore.js:79:11)
[DEBUG] : at parseAlloyComponent (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/index.js:559:5)
[DEBUG] : at /usr/local/lib/node_modules/alloy/Alloy/commands/compile/index.js:252:6
[DEBUG] : at Array.forEach (native)
[DEBUG] : at Function._.each._.forEach (/usr/local/lib/node_modules/alloy/Alloy/lib/alloy/underscore.js:79:11)
[DEBUG] : at /usr/local/lib/node_modules/alloy/Alloy/commands/compile/index.js:241:6
[DEBUG] : at Array.forEach (native)
[DEBUG] : at Function._.each._.forEach (/usr/local/lib/node_modules/alloy/Alloy/lib/alloy/underscore.js:79:11)
[DEBUG] : at module.exports (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/index.js:237:4)
[DEBUG] : at Object.<anonymous> (/usr/local/lib/node_modules/alloy/Alloy/alloy.js:100:46)
[DEBUG] : at Module._compile (module.js:456:26)
[DEBUG] : at Object.Module._extensions..js (module.js:474:10)
[DEBUG] : at Module.load (module.js:356:32)
[DEBUG] : at Function.Module._load (module.js:312:12)
[DEBUG] : at Module.require (module.js:364:17)
[DEBUG] : at require (module.js:380:17)
[DEBUG] : at Object.<anonymous> (/usr/local/lib/node_modules/alloy/bin/alloy:3:1)
[DEBUG] : at Module._compile (module.js:456:26)
[DEBUG] : at Object.Module._extensions..js (module.js:474:10)
[DEBUG] : at Module.load (module.js:356:32)
[DEBUG] : at Function.Module._load (module.js:312:12)
[DEBUG] : at Function.Module.runMain (module.js:497:10)
[DEBUG] : at startup (node.js:119:16)
[DEBUG] : at node.js:902:3
[ERROR] : Alloy compiler failed
Attachments
File | Date | Size |
---|---|---|
Test.zip | 2014-06-16T17:58:23.000+0000 | 5925866 |
Alan, can you share the project or post a test case that exhibits the error?
I have attached a very simple test case. The issue stems from a custom property that was being set named "type". You will see it in the index.tss as type:2. If that is commented out the project builds fine but with the property set the app builds pre Alloy 1.4.
PR https://github.com/appcelerator/alloy/pull/452 Test app: use the attached or use test/apps/testing/ALOY-263 or test/apps/testing/ALOY-1003 Functional test: apps should compile without error. ALOY-263 should display a date picker when run. ALOY-1003 should show both a listview (whose items have a custom 'type' property) and a date picker
Verified as fixed. TiSDk 3.3.0.v20140620104112 Appcelerator Studio 3.3.0.201406171619 CLI 3.3.0-rc2 Alloy 1.4.0-rc2 Closing