Hi All
Below is a simple example of my problem. Unless I am missing something, shouldn't the second row of items have 'second' as their tab (title) names? |browser aCollection aDictionary| aCollection := OrderedCollection new add: 'one'; add: 'two'; add: 'three'; add: 'four'; yourself. aDictionary := Dictionary new at: 'first' put: aCollection; at: 'second' put: aCollection copy; yourself. browser := GLMTabulator new title: 'List Example'. aDictionary keysAndValuesDo: [ :key :collection | browser row: [ :row | collection do: [ :string | row column: string asSymbol. browser transmit to: string asSymbol; andShow: [ :a | a text title: key; display: string ] ] ] ]. browser openOn: aDictionary --
|
This is a bit tricky if the entities have the same name (row column:'one'/'two' ... is called two times, for every row ('first'/'second')) This may work:|browser aCollection aDictionary| Transcript clear. aCollection := OrderedCollection new add: 'one'; add: 'two'; add: 'three'; add: 'four'; yourself. aDictionary := Dictionary new at: 'first' put: aCollection; at: 'second' put: aCollection; yourself. browser := GLMTabulator new title: 'List Example'. aDictionary keysAndValuesDo: [ :key :collection | browser row: [ :row | collection do: [ :string | row column: (string, key) asSymbol. "<<<<<-------changed" browser transmit to: (string, key) asSymbol; "<<<<<-------changed" andShow: [ :a | a text title: key; display: string ] ] ] ]. browser openOn: aDictionary 2015-07-28 13:17 GMT+02:00 Gareth Cox <[hidden email]>:
|
Free forum by Nabble | Edit this page |