Hi everyone!
I'm building a ui with Spec and using Roassal view inside of my window.
To embed the view I use Roassal2Spec package (RoassalModel class).
When I click on element of view I want to change its color.
The problem is that color changes only after you move a winodw or open
another window etc.
Here is an example code. Just try to click on elements and than move the
window.
**********************************************
ui := DynamicComposableModel new.
ui instantiateModels: #(
�� �� �� �� button ButtonModel
�� �� �� �� view RoassalModel
).
ui button label: 'I am a button'.
ui extent: 600 @ 480.
ui view script: [ :view :canvas |
�� �� �� �� |es|
�� �� �� �� es := RTEllipse new size: 20; elementsOn: (1 to: 6).
�� �� �� �� view addAll: es.
�� �� �� �� RTCircleLayout on: es.
�� �� �� �� RTEdgeBuilder new
�� �� �� �� �� �� �� �� view: view;
�� �� �� �� �� �� �� �� elements: es;
�� �� �� �� �� �� �� �� connectToAll: [ :value | { value + 1. (value + 1) % 6 } ].
�� �� �� �� view elements when: TRMouseClick do: [ :e | e element trachelShape color:
Color red. World displayWorld. World doOneCycleNow ].
�� �� �� �� canvas camera focusOnCenter.
].
layout := SpecLayout composed
�� �� �� �� newColumn: [ :col |
�� �� �� �� �� �� �� �� col
�� �� �� �� �� �� �� �� �� �� �� �� add: #button height: ComposableModel toolbarHeight;
�� �� �� �� �� �� �� �� �� �� �� �� add: #view.
�� �� �� �� ];
�� �� �� �� yourself.
ui openWithSpecLayout: layout.
**********************************************
Thanks
Mark
--
View this message in context: http://forum.world.st/Spec-with-Roassal-tp4838854.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.