[PEAK] Trellis on_commit and Performers

Sergey Schetinin maluke at gmail.com
Sun Oct 5 04:21:08 EDT 2008


One more thing. Layout managers set .size but depend on .client_size
of parent. For panels I added a shortcut that makes them the same
property / cell, but for some controls that would not work. For
example there are labeled panels with border and label drawn by OS. So
we have a few ways of handling it, first is to schedule the wx writes,
which would layout the inner windows based on their initial sizes
(apparently 20x10 pixels for panels), then the write triggers the
event handlers and the client_size is updated and the nested windows
are re-laid out again. The writes are again scheduled, so it repeats
as many time as many nesting levels there are. Also, the Freeze / Thaw
is much harder to manage, so it results in flicker for each round of
updates. This just doesn't seem right.

Another way is to write to wx in Performers and schedule
sensor.receive for resulting events into post-transaction. This works
in almost the same way with flicker, multiple layout runs and all
that.

There needs to be a way to delay layout recalculation for nested
windows. If the .size if written, we don't know the .client_size yet,
but we know it will change. Then, when writing to wx we handle the
immediate event and set the .client_size which allows the nested rules
to run. But this doesn't match the model of transactions where
side-effects rules are write-only. I think I'll try to write to wx in
@maintain rules with on_undo.



More information about the PEAK mailing list