appersonlabs/Carbon — pull request #7 by pegli (2012-12-26 17:52:17+00:00)
Title: CARBON-5 TableViewRow Templates

I've updated the iOS and Android versions to support basic templates as described in [CARBON-5](http://jira.appersonlabs.com/browse/CARBON-5). In brief, the JSON UI files can now contain placeholders for strings in the form of `%keyname%`; for example:

```javascript
{
"Label": {
"top": 170,
"text": "%label_text%"
}
}
```

In the Titanium app, the placeholders are populated by providing a dictionary of key-value pairs to the `load()` or `create()` methods:

```javascript
var label1 = Carbon.UI.load('ui/labeldef.json', {
label_text: 'I am a label, hurrah!',
});
var label2 = Carbon.UI.load('ui/labeldef.json', {
label_text: 'label2 FTW',
});

```

The two labels are identical (all properties and TSS styles) except for the value of the label text. Because UI definition files are cached, the second label is even faster to create than the first.