Titanium JIRA Archive
Alloy (ALOY)

[ALOY-1253] Alloy: Support WPATH in widget XML view attribute values

GitHub Issuen/a
TypeImprovement
PriorityNone
StatusClosed
ResolutionFixed
Resolution Date2020-08-12T14:52:52.000+0000
Affected Version/sn/a
Fix Version/sCLI Release 8.1.0
ComponentsXML
Labelsgriffin-app, merge-to-next, view, widgets, wpath
ReporterFokke Zandbergen
AssigneeBrenton House
Created2015-02-20T14:57:14.000+0000
Updated2020-08-12T14:52:52.000+0000

Description

At the moment you cannot use WPATH in a widget's XML view. You need to set them via TSS. Which is OK, but some like to do so in XML, like they're used to do in HTML. *widget.js*
<Alloy>
	<ImageView id="image" image="WPATH('images/a.png')" />
</Alloy>
*compiled widget.js*
    $.__views.image = Ti.UI.createImageView({
        image: "WPATH('images/a.png')",
        id: "image"
    });
*working widget.tss*
"ImageView": {
  image: WPATH('images/a.png')
}

Comments

  1. Brenton House 2019-12-16

    Seems like maybe this one fell through the cracks. I will create a quick PR for it.
  2. Brenton House 2019-12-16

    [~eharris] - Created PR: https://github.com/appcelerator/alloy/pull/948
  3. Ewan Harris 2020-07-20

    Test steps: Grab the [basic widget sample](https://github.com/appcelerator/alloy/tree/master/samples/apps/widgets/basic) and convert to use WPATH [here](https://github.com/appcelerator/alloy/blob/master/samples/apps/widgets/basic/widgets/com.foo.widget/views/image.xml#L2) instead of the widget ID After changing that it should function the same as before
  4. Samir Mohammed 2020-08-12

    Closing ticket, fix verified in CLI version 8.1.0-master.10, tested using the example widgets app. (https://github.com/brentonhouse/alloy-widget-test)

JSON Source