Titanium JIRA Archive
Alloy (ALOY)

[ALOY-1021] Alloy: Add support for Alloy.CFG and Alloy.Globals in views

GitHub Issuen/a
TypeImprovement
PriorityLow
StatusResolved
ResolutionFixed
Resolution Date2015-05-26T07:21:47.000+0000
Affected Version/sAlloy 1.3.1
Fix Version/sAlloy 1.7.0
ComponentsStyling
LabelsAlloy.CFG, Alloy.Globals, alloy, views
ReporterFokke Zandbergen
AssigneeUnknown
Created2014-05-10T18:29:24.000+0000
Updated2018-03-07T22:25:39.000+0000

Description

As the attached sample app shows, you can not use Alloy.CFG. and Alloy.Globals. in Alloy views. In the compiled code, they will end up as strings:
    $.__views.__alloyId0 = Ti.UI.createLabel({
        top: 50,
        text: "Alloy.CFG.foo",
        id: "__alloyId0"
    });
I would like to see that just like Ti. the Alloy. namespace would be detected and used as variable instead of string.

Attachments

FileDateSize
al.zip2014-05-10T18:29:24.000+00008754
iOS-simulatorschermafbeelding 10 mei 2014 14.22.27.png2014-05-10T18:39:10.000+000026954

Comments

  1. Fokke Zandbergen 2014-05-10

    Showing Alloy.CFG and Alloy.Globals not working in the view, only in TSS.
  2. Ritu Agrawal 2014-05-19

    Moving this improvement request to engineering for further evaluation and prioritization.
  3. Alexey Chulochnikov 2014-05-27

    +1 It would be great if this feature will be implemented!
  4. Dan Tamas 2014-12-10

    +1
  5. Fokke Zandbergen 2014-12-11

    The related regexp to be changed: https://github.com/appcelerator/alloy/blob/master/Alloy/commands/compile/compilerUtils.js#L214
  6. Dan Tamas 2015-04-03

    PR: https://github.com/appcelerator/alloy/pull/677
  7. Emmanuel Francis 2015-05-07

    Please check this https://developer.appcelerator.com/question/182308/alloycfg-not-working-on-android-tss It seems Alloy.CFG only works with iOS in TSS but not on android.
  8. Feon Sua Xin Miao 2015-05-26

    PR merged.
  9. Andrey Tkachenko 2015-09-04

    Can somebody update docs at http://docs.appcelerator.com/platform/latest/#!/guide/Alloy_XML_Markup with changes related to this PR?
  10. Fokke Zandbergen 2015-09-04

    [~falko] created TIDOC-2299

JSON Source