2022/06/23/event-object as output container

From Woozle Writes Code
Revision as of 17:01, 1 July 2022 by Woozle (talk | contribs) (Created page with "{{nav/codeblog}} __NOTOC__ ''originally rubberducked [https://discord.com/channels/469887577311150080/508798205505306628/989645884935508028 on Discord]'' ---- ug, more design...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Codeblog

originally rubberducked on Discord


ug, more design decisions...

  • old tree-rendering system: Render() returns a string; each Node sums up the strings from the Nodes underneath
  • new tree-rendering system: OnRender() is dispatched from OnEvent(), which receives an object of any of (currently) 3 different event-classes. Each class specifies the method to call when it is received. (This way we only have to implement *one* dispatch hierarchy.) The Render Event has a string property which is the result of the rendering, and each Node adds its output to that property. ...but there are tendrils of the old system still remaining; my instinct is to convert them and tidy up, but how much will I end up regretting this? Stay tuned...