2026/03/08

From Woozle Writes Code
Jump to navigation Jump to search
Sunday, March 8, 2026 (#67)
Saturday Sunday Monday posts:prev <this> next

I think I need to further rethink how Panel objects get connected to the code which is doing stuff that needs to be shown to the user. The current system makes assumptions that are sometimes not true.

Thinking:

  • It still makes sense to me to have Panel as the thing which does the rendering and Updater as the thing which does the calculations (and updates the Panel).
  • The problem now is that we're assigning the Updater object to a particular Cable object to do the updating -- but this is happening inside DoCommand(), and the object which is doing the most work changes depending on things which happen outside of DoCommand().
  • It therefore seems like a bad idea to make the {Updater ⇒ action-object} connection happen inside DoCommand().
  • If it's going to happen before the action-code is invoked, though, it would need to happen before DoCommand() is called -- but the Cable objects are only created there, so that won't work.
  • I think what will work better is assigning the Updater to whichever Stream object is most heavily involved in the work. All Stream classes can have a QUpdater object (accessed via QOUpdater()) which passes along events if it is set (and otherwise ignores them).

20:42

Did some rearranging; exports working again, with somewhat cleaner output.

TIL: $a ??= $b is equivalent to $a = $a ?? $b. In either case, $b apparently does not get evaluated unless it is needed. (Update: Apparently I had learned this once before, but forgot that I had done so.)

Currently doing a fresh backup of cloud5, and then I need to try imports again...

22:21

Imports currently get stuck because no Canal objects have been added to the Canals array. I need to find examples and document how that is supposed to be done.