Hi Johan,
Indeed, your approach is technically the less optimal :-)
Destroying and rebuilding the whole World at each bit change :-)
Try the RTDynamicGrapher class we have just made. It should work.
Alexandre
On Jan 22, 2015, at 11:00 AM, Johan Fabry
<jfabry(a)dcc.uchile.cl> wrote:
Hi all,
so I am impatient and I could not wait for Alex’s solution to my question of yesterday. I
hacked something together that works most of the time, and now I have my scatterplot that
updates itself quite quickly ! :- ) I give the core of the code below, and then report on
a problem :-(
I have a builder instance variable, and an open and a refresh method. Open opens the
first time, and refresh refreshes the view. (I call buildDataset, which builds the right
dataset for the graph, that’s not relevant here).
open
builder := RTGrapher new.
builder add: self buildDataset.
builder build open
refresh
| view |
view := builder view.
view cleanAll.
builder := RTGrapher new.
builder view: view.
builder add: self buildDataset.
builder build
view signalUpdate.
And if you want this animated, just make an infinite loop that calls refresh (with a
delay in-between to not hog the CPU).
autorefresh
self open.
[[true] whileTrue: [self refresh. (Delay forMilliseconds: 100) wait]] fork
Et voila! C’est cool quoi! (Yes, I’m in France right now :-) )
There is sadly one problem: sometimes I get the red morph of death in the window :-(
AthensCairoCanvas>>setShape: sends asAthensShapeOn: to nil. It’s not immediate, but
after some time (variable) I always get it :-(. Any pointers on what it may be and how to
fix it??
---> Save our in-boxes!
http://emailcharter.org <---
Johan Fabry -
http://pleiad.cl/~jfabry
PLEIAD lab - Computer Science Department (DCC) - University of Chile
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.