Advertisement
Guest User

Minimal browser example

a guest
Oct 19th, 2014
279
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. | browser  dict |
  2. dict := Dictionary new.
  3. dict at: 1 put: 'uno'.
  4. dict at: 2 put: 'dos'.
  5. browser := GLMTabulator  new
  6.          title: 'Minimal test'.
  7. browser column: #keys; column: #values.
  8. browser transmit
  9.          to: #keys;
  10.          andShow: [:k | k list display: #keys ].
  11. browser transmit
  12.          from: #keys;
  13.          to: #values;
  14.          andShow: [:v | v text display: [ :key | dict at: key ]  ].
  15. browser transmit
  16.     from: #values port: #entity;
  17.     from: #values port: #text;
  18.     when: [ :key :text | text notNil ];
  19.     to: #values port: #nirvana;
  20.     transformed: [ :key :text | dict at: key put: text ].
  21. browser openOn: dict
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement