Uploaded image for project: 'Alloy'
  1. Alloy
  2. ALOY-1316

Support use of $.args.* in any XML attribute or TSS property

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: None
    • Resolution: Fixed
    • Affects Version/s: None
    • Component/s: XML
    • Labels:
      None
    • Story Points:
      2
    • Sprint:
      2018 Sprint 05 Tooling

      Description

      We now support using $.args in XML if=$.args.foo attributes. However, it would be very useful if you could use it as value of any attribute, as well as value in TSS.

      The following should then result in a Window containing a label that says bar:

      index.xml

      <Alloy>
      	<Window class="container">
      		<Require src="foo" foo="bar" />
      	</Window>
      </Alloy>
      

      foo.xml

      <Alloy>
      	<Label text="$.args.foo" />
      </Alloy>
      

      Currently this compiles to:

          $.__views.foo = Ti.UI.createLabel({
              text: "$.args.foo",
              id: "foo"
          });
      

      If you try to use $.args.foo in TSS it will fail to compile with:

      [ERROR] Expected "Alloy", "L", "Ti", "Titanium", "WPATH", "[", "false", "null", "true", "undefined", "{", comment, end of line, number, string or whitespace but "$" found.
      

        Attachments

          Activity

            People

            • Assignee:
              fmiao Feon Sua Xin Miao
              Reporter:
              fokkezb Fokke Zandbergen
              Reviewer:
              Ewan Harris
            • Watchers:
              13 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                  Git Source Code