Titanium JIRA Archive
Alloy (ALOY)

[ALOY-1737] Alloy: ListView dataBinding creates deprecated setItems call

GitHub Issuen/a
TypeImprovement
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2020-08-12T13:54:25.000+0000
Affected Version/sn/a
Fix Version/sCLI Release 8.1.1
ComponentsRuntime
Labelsalloy, listview
ReporterMichael Gangolf
AssigneeEwan Harris
Created2020-08-11T19:11:46.000+0000
Updated2020-09-14T18:42:52.000+0000

Description

When using Alloy ListView databinding it will produce code with
setItems()
and therefore produce a "using deprecated setter" warning: https://github.com/appcelerator/alloy/blob/6c311743af90da438f9c30bfdbe29275247daa51/Alloy/commands/compile/parsers/Ti.UI.ListSection.js#L163
<ListView id="lst_parks" defaultItemTemplate="default" >
		<Templates>
			<ItemTemplate name="default">
			</ItemTemplate>
		</Templates>
		<ListSection dataCollection="parks"/>
	</ListView>

Comments

  1. Michael Gangolf 2020-08-11

    PR: https://github.com/appcelerator/alloy/pull/966 Produces this classic code
       $.__views.__alloyId25.setItems(__alloyId26,opts.animation):$.__views.__alloyId25.items=__alloyId26
       
    and won't print deprecation warnings
  2. Ewan Harris 2020-08-12

    This wont make it into 8.1.0 so setting the fixVersion to a tentative CLI Release 8.2.0, but will release the alloy package separately
  3. Lokesh Choudhary 2020-09-14

    Verified the fix with CLI 8.1.1-master.8. Closing.

JSON Source