Titanium JIRA Archive
Appcelerator Community (AC)

[AC-2616] Special Characters in Attribute Value of Widgets

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionNeeds more info
Resolution Date2013-04-04T23:33:59.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAlloy
Labelsalloy, data-binding, widget
ReporterJon Hargett
AssigneeShak Hossain
Created2013-02-13T21:57:03.000+0000
Updated2016-03-08T07:41:42.000+0000

Description

1. Create a widget. 2. In View that includes widget, create a custom attribute. 3. In the value of that customer attribute, use curly braces as used when doing data-binding. [ERROR] :  /usr/local/lib/node_modules/alloy/Alloy/commands/compile/compilerUtils.js:748 [ERROR] :   if (theState.condition) { [ERROR] :   [ERROR] :   ^ [ERROR] :  TypeError: Cannot read property 'condition' of undefined [ERROR] :   at exports.generateStyleParams.fromArray (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/compilerUtils.js:748:19) [ERROR] :   at Function.T.each.T.forEach (/usr/local/lib/node_modules/alloy/Alloy/lib/alloy/underscore.js:5:769) [ERROR] :   at exports.generateStyleParams.fromArray (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/compilerUtils.js:722:5) [ERROR] :   at Array.forEach (native) [ERROR] :   at Function.T.each.T.forEach (/usr/local/lib/node_modules/alloy/Alloy/lib/alloy/underscore.js:5:625) [ERROR] :   at Object.exports.generateStyleParams (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/compilerUtils.js:721:4) [ERROR] :   at parse (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/parsers/Alloy.Require.js:75:112) [ERROR] :   at Object.exports.parse (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/parsers/base.js:11:17) [ERROR] :   at Object.exports.parse (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/parsers/Alloy.Require.js:10:27) [ERROR] :   at Object.exports.parse (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/parsers/Alloy.Widget.js:4:36) [ERROR] :   at Object.exports.generateNode (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/compilerUtils.js:231:48) [ERROR] :   at exports.generateNode.content (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/compilerUtils.js:271:29) [ERROR] :   at Array.forEach (native) [ERROR] :   at Function.T.each.T.forEach (/usr/local/lib/node_modules/alloy/Alloy/lib/alloy/underscore.js:5:625) [ERROR] :   at Object.exports.generateNode (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/compilerUtils.js:266:5) [ERROR] :   at exports.generateNode.content (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/compilerUtils.js:271:29) [ERROR] :   at Array.forEach (native) [ERROR] :   at Function.T.each.T.forEach (/usr/local/lib/node_modules/alloy/Alloy/lib/alloy/underscore.js:5:625) [ERROR] :   at Object.exports.generateNode (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/compilerUtils.js:266:5) [ERROR] :   at exports.generateNode.content (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/compilerUtils.js:271:29) [ERROR] :   at Array.forEach (native) [ERROR] :   at Function.T.each.T.forEach (/usr/local/lib/node_modules/alloy/Alloy/lib/alloy/underscore.js:5:625) [ERROR] :   at Object.exports.generateNode (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/compilerUtils.js:266:5) [ERROR] :   at /usr/local/lib/node_modules/alloy/Alloy/commands/compile/index.js:400:28 [ERROR] :   at Array.forEach (native) [ERROR] :   at Function.T.each.T.forEach (/usr/local/lib/node_modules/alloy/Alloy/lib/alloy/underscore.js:5:625) [ERROR] :   at parseAlloyComponent (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/index.js:392:5) [ERROR] :   at module.exports.alloyJs (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/index.js:192:5) [ERROR] :   at Array.forEach (native) [ERROR] :   at Function.T.each.T.forEach (/usr/local/lib/node_modules/alloy/Alloy/lib/alloy/underscore.js:5:625) [ERROR] :   at /usr/local/lib/node_modules/alloy/Alloy/commands/compile/index.js:182:5 [ERROR] :   at Array.forEach (native) [ERROR] :   at Function.T.each.T.forEach (/usr/local/lib/node_modules/alloy/Alloy/lib/alloy/underscore.js:5:625) [ERROR] :   at module.exports (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/index.js:180:4) [ERROR] :   at Object. (/usr/local/lib/node_modules/alloy/Alloy/alloy.js:87:46) [ERROR] :   at Module._compile (module.js:449:26) [ERROR] :   at Object.Module._extensions..js (module.js:467:10) [ERROR] :   at Module.load (module.js:356:32) [ERROR] :   at Function.Module._load (module.js:312:12) [ERROR] :   at Module.require (module.js:362:17) [ERROR] :   at require (module.js:378:17) [ERROR] :   at Object. (/usr/local/lib/node_modules/alloy/bin/alloy:3:1) [ERROR] :   at Module._compile (module.js:449:26) [ERROR] :   at Object.Module._extensions..js (module.js:467:10) [ERROR] :   at Module.load (module.js:356:32) [ERROR] :   at Function.Module._load (module.js:312:12) [ERROR] :   at Module.runMain (module.js:492:10) [ERROR] :   at process.startup.processNextTick.process._tickCallback (node.js:244:9) [ERROR] :  Alloy compiler failed

Comments

  1. Tony Lukasavage 2013-03-08

    I'm not following the description here for what causes this. Can you please supply a test case that will cause this scenario to occur?
  2. Shak Hossain 2014-01-19

    Closing this issue since we can't reproduce it using the TISDK 3.2 and latest Alloy. A sample code (https://github.com/csemrm/Push-Notifications) has been posted to illustrate this. If you continue to get error, please post us your test code.

JSON Source