On 15 Dec 2009, at 07:44, Tudor Girba wrote:
Hi Johan,
I'm sorry to say that GLMExamples class>>browseExamples is broken: it only shows an empty list. The reason for this is that it looks for pragmas but these are all in the subclasses. I guess that all this was first a big class that has been split up in different subclasses but the code of this method did not get adapted.
browseExamples is in the right place, but you should execute it for subclasses :). I just pointed the place for the code.
OK, so how about changing the method comment to "self subclasses do: [:sc | sc browseExamples]" (instead of "self browseExamples")
Still, hacking around in the code a bit did not give me insight in my root question. So let me try again: I want to understand what happens when you specify 'browser showOn: #foo; from: #bar' Where is the code that passes the selection event from #foo to #bar so that #bar refreshes itself? If I can hook into that, I can send a fake selection event from a non-existent #foo to my #bar so that #bar refreshes ... being an update of #bar :-)
Give me that and I'll code a primitive update mechanism for you that you can include in a future release of Glamour. As I conversed with Alex today (regarding a Mondrian update mechanism), it does not matter if it is slow or it flickers, at least it is basic functionality. First get it to work and we'll invest in an optimal solution later. We're supposed to be agile, right?
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.
-- Johan Fabry jfabry@dcc.uchile.cl - http://dcc.uchile.cl/~jfabry PLEIAD Lab - Computer Science Department (DCC) - University of Chile