[ALOY-1708] Alloy: Compile fails if object property contains variable
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | None |
| Status | Open |
| Resolution | Unresolved |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | n/a |
| Labels | engTriage |
| Reporter | Hans Knöchel |
| Assignee | Unknown |
| Created | 2019-10-31T21:48:10.000+0000 |
| Updated | 2020-01-07T22:45:25.000+0000 |
Description
The following fails on Alloy 1.14.1:
alloy.js
Alloy.Globals.test = 'Helvetica';
index.xml
<Alloy>
<Label text="Bayern Ticket" font.fontFamily="Alloy.Globals.test" />
</Alloy>
Error:
[ERROR] Error parsing code in app/widgets/mywidget/controllers/widget.js. Unexpected token, expected "," (69:68)
[ERROR] 67 | $.__views.__alloyId173.add($.__views.__alloyId174);
[ERROR] 68 | $.__views.__alloyId175 = Ti.UI.createLabel(
[ERROR] > 69 | {color:Alloy.CFG.styles.textColor,font:{fontSize:16,fontFamily:Alloy:CFG.fonts.sourceSansPro.bold,},text:"Hello World",id:"__alloyId175",}
[ERROR] | ^
[ERROR] 70 | );
[ERROR] 71 | $.__views.__alloyId174.add($.__views.__alloyId175);
[ERROR] 72 | $.__views.__alloyId176 = Ti.UI.createView(
[ERROR] Alloy compiler failed
[~hknoechel] - are you still seeing this?
Haven't tried out since then. Was there an Alloy fix for this? You should probably try it out
I tried it with Alloy 1.14.5 and couldn't recreate. I just wanted to make sure you were good.