On Thu, Jun 4, 2015 at 10:52 PM, Alexandre Bergel
<alexandre.bergel(a)me.com> wrote:
Hi Serge,
You are perfectly right to avoid fork in my opinion. I am convinced that threads are evil
language constructions.
I have just improved RTActiveAnimation. You can get inspiration from:
-=-=-=-=-=-=-=-=-=-=-=-=
| v anim |
v := RTView new.
anim := RTActiveAnimation new.
anim intervalInMilliseconds: 1000.
anim blockToExecute: [
| e |
e := (RTEllipse new size: 40 atRandom; color: (Color red alpha: 0.2)) element.
e translateTo: (500 atRandom @ 500 atRandom) - (250 @ 250).
v add: e.
].
anim inView: v.
^ v
-=-=-=-=-=-=-=-=-=-=-=-=
Great ! Thank you Alex.
I made another example:
| v anim |
v := RTView new.
anim := RTActiveAnimation new.
anim intervalInMilliseconds: 100.
anim blockToExecute: [
|e|
v clean.
(1 to: 400) do:[:i|
e := (RTBox new color: Color random; size: 25) element.
v add: e].
RTGridLayout new
gapSize:0;
lineItemsCount: 20;
on:v elements.
].
anim inView: v.
^ v
It works without problem ;-)
There is some delay from time to time, I guess this is related to the GC ?
--
Serge Stinckwich
UCBN & UMI UMMISCO 209 (IRD/UPMC)
Every DSL ends up being Smalltalk
http://www.doesnotunderstand.org/