Hi Doru and all,
Your recently announced dynamic features of Glamour might be handy for a
browser I am trying to build. My example code below contains a couple of
buttons. When clicked, a list or tree should appear, and be populated
(with the contents of the selection from user), below the button.
Please evaluate the following code:
| browser |
browser := GLMTabulator new.
browser
column: [: a | a row: #inputdata;
row: #dictionary;
row: #territories ];
column: [: a | a row: [ :r | r column: #start; column: #end ] span: 10;
row: #info span: 3;
row: #actions ]
span: 6.
browser transmit to: #inputdata; andShow: [ : a |
a title: 'Input Data'.
a actionList
act: [: entity | (UIManager default chooseDirectory: 'Select
directory' from: FileSystem root) ifNotNilDo: [: dir | self halt ] ]
entitled: 'Load...' ].
browser transmit to: #dictionary; andShow: [ : a |
a list title: 'Data Dictionary' ].
browser transmit to: #territories; andShow: [ : a |
a title: 'Territory Data'.
a actionList
act: [: entity | (UIManager default chooseFileMatching: #('*.txt')
label: 'Choose a TXT') ifNotNilDo: [: file | self halt ] ]
entitled: 'Load...'].
browser transmit to: #info; andShow: [:a |
a text display: [ : x | 'Select input data' ]; title: 'Log' ].
browser
title: 'My Browser';
openOn: (1 to: 10).
It seems I have two issues here:
- How to tell Glamour: "Create a list below this button".
- How to populate the list with new contents
Do you have any suggestions?
Cheers,
Hernán