EtnaTraining / MoviesDemo

This demo show how we can build with Appcelerator Titanium the same app demonstrated during the Facebook React Native demo
55 stars 17 forks source link

Cannot mix text and model attributes when binding with the movieList collection #2

Open EtnaTraining opened 9 years ago

EtnaTraining commented 9 years ago

it seems that mixing text and model attributes is supported only for Model attributes and not Collection attributes. I cannot add a percentage sign in movie_cell.xml (I got alloy compilation errors):

<Label id="score" text="{score} %" />

(so I need to update the $.score.text in the controller). while I can do it in detail.xml:

<Label id="cscore" class="score" text="{currentMovie.score}%"/>

not sure if this is a bug or is currently not supported

skypanther commented 9 years ago

What is permitted and what doesn't work is not particularly obvious. See https://jira.appcelerator.org/browse/ALOY-443 for the change that enables your second example. The first example seems like it should work but it is in fact not supported. I thought there was an existing ticket for this but I can't find it. I've opened https://jira.appcelerator.org/browse/ALOY-1236. Please comment on and watch that ticket.