Hi,
I tried using a Roassal painting as a card-based layout for a glamour UI, but
don't have too much luck updating it.
The self refresh sends the CPRefresh, and the painting is updated, but all
nodes are on top of each other. Related to issue 808?
(Roassal 383, Glamour-Roassal-Presentations 7)
browser := GLMTabulator new.
browser row: #content;
title: 'Change Patterns'.
browser transmit to: #content; andShow: [:a|
a roassal
title: 'Patterns';
updateOn: CPRefresh from: self announcer;
painting: [:view :patternHolder | |paintingBlock|
paintingBlock := [
view shape
width: [:el | 180];
height: [:el| 80];
fillColor: [:aPattern | aPattern applicable ifTrue: [Color r: 1.0 g: 1.0 b: 0.8]
ifFalse: [Color red]].
view nodes: patternHolder patterns forEach: [:aPattern |
view interaction
item: 'inspect' action: [:el | aPattern switchApplicable. view raw
elementsDo: #remove. self refresh].
view shape label.
view nodes: (Array with: aPattern title with: aPattern applicable asString).
view verticalLineLayout ].
view gridLayout].
view interaction
item: 'inspect' action: [:el | el model inspect];
item: 'switch applicable' action: [:el | el model switchApplicable. view raw
elementsDo: #remove.
paintingBlock value. self refresh].
paintingBlock value.
]].
^browser
Stephan