Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19198] $.args Alloy XML shortcut broken in 4.1.0.GA

GitHub Issuen/a
TypeBug
PriorityHigh
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 4.1.0
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterShannon Hicks
AssigneeUnknown
Created2015-07-09T17:22:49.000+0000
Updated2018-02-28T19:55:50.000+0000

Description

Alloy.createController('MyWin',{helloWorld:'Hi there!');
<Window id="win" helloWorld="$.args.helloWorld" />
Ti.API.info($.win.helloWorld);
4.0.0.GA output: bq. Hi There! 4.1.0.GA output: bq. $.args.helloWorld

Comments

  1. Fokke Zandbergen 2015-07-09

    I don't think this is a Titanium problem. The compiled Alloy code looks like:
           $.__views.win = Ti.UI.createWindow({
               id: "win",
               helloWorld: "$.args.helloWorld"
           });
       
    As you can see helloWorld is a string and that's the case regardless what Titanium SDK you use. It's also the same for both Alloy versions that shipped with the AppC: * AppC 4.0.0 & 4.0.1 / Alloy 1.6.0 * AppC 4.0.2 & 4.1.0 / Alloy 1.6.2 It's even the same if I don't go through appc run, install alloy from master and do alloy compile --config platform=ios. So I wonder how this ever worked for you? The only place where I see $.args working is in if attributes: http://docs.appcelerator.com/platform/latest/#!/guide/Alloy_XML_Markup-section-35621528_AlloyXMLMarkup-ConditionalCode

JSON Source