Hi Johan,
I am glad it worked for you. Just please do not encourage people to do
that :) :)
Cheers,
Doru
On 15 Dec 2009, at 18:01, Johan Fabry wrote:
On 15 Dec 2009, at 12:48, Johan Fabry wrote:
It's
not quite that straightforward. The propagation of values is
given by Transmissions which are first class connectors between
Panes. Whenever you have a showOn:;from: you get a Transmission
with one target given by showOn: and as many origins as #from:.
Every transmission is activated once an origin changes the value.
The problem of update is not the flickering, but is in getting
proper semantics for Transmissions. The matter is a bit
complicated because the browser should still make sense after an
update. Refreshing the whole browser is also not straightforward,
because you have to know how to traverse it which depends on the
posibly complex graph of Transmissions.
Allow me to play devils' advocate: If I am a Pane, an update is a
Transmission from me to me, and I activate that when I change, e.g.
from within an act: block. No need to do any traversal, I simply
update myself.
Now in the mean time, the less-critiquing-and-more-producing side of
me has delivered the following hack. Works just fine for my purpose,
nice updating the listed items to reveal their 'show' status.
(the asp argument of the format: block is a simple container with
name being a String and show being a Boolean)
browser showOn: #aspects;
using: [ |usingBrowser|
usingBrowser := browser tree.
usingBrowser title: 'Aspects';
format: [:asp | Text string: (asp name, asp show asString)
attribute: (TextColor color: asp color).];
act: [:tree | |asp ann|
asp := tree selection. asp show: (asp show not).
ann := GLMMatchingPresentationsChanged new.
ann pane: usingBrowser.
ann oldMatchingPresentations: OrderedCollection new.
usingBrowser pane announce: ann.] on: $t entitled: 'Toggle On/
Off (t)';
].
Voila :-) Good enough for me. I hope it is of use of some other
people as well!
--
Johan Fabry
jfabry(a)dcc.uchile.cl -
http://dcc.uchile.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