<commit_before>import {ui, Button, TextView} from 'tabris';

let button = new Button({
  centerX: 0, top: 100,
  text: 'Show Message'
}).appendTo(ui.contentView);

let textView = new TextView({
  centerX: 0, top: [button, 50],
  font: '24px'
}).appendTo(ui.contentView);

button.on('select', () => textView.text = 'Tabris.js rocks!');<commit_msg>Use object to attach event listener in TypeScript template<commit_after>import {ui, Button, TextView} from 'tabris';

let button = new Button({
  centerX: 0, top: 100,
  text: 'Show Message'
}).appendTo(ui.contentView);

let textView = new TextView({
  centerX: 0, top: [button, 50],
  font: '24px'
}).appendTo(ui.contentView);

button.on({select: () => textView.text = 'Tabris.js rocks!'});
{'fraction_non_alphanumeric': 0.17367706919945725, 'fraction_numerical': 0.024423337856173677, 'mean_word_length': 5.099173553719008, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7028901', 'n_tokens_mistral': 274, 'n_tokens_neox': 257, 'n_words': 75}