Question on an Animation

@Aerilius,

Thanks for your response - it was exactly what I was hoping for, especially the second paragraph.

I had a hunch that this was what I needed to do, but your explanation helps to confirm my conceptual understanding. I’m familiar with Java and C, somewhat, but the differences between those two languages (especially C, which is what I’m currently actively using) and Ruby was tripping me up. A local friend helped me understand your code at a syntax level; I think I get it now.

I’m in the middle of an apartment design project, and am attempting to write something simple that could display a real-time count of the number of each apartment unit type (each unit type as a component) on the screen, unwindowed (e.g. 1 bedroom = 5, 2 bedroom = 10, total units = 15). I was also thinking of keeping track of the square footages (per unit type, total). This way, I can glance at the numbers while I design, instead of stopping my thought process to manually count the units / calculate square footage, etc.

I was thinking of using a DefinitionsObserver, updating the entire note whenever a component was added or removed, and iterating over the entire definitions array (array?) to get each component’s count (or each relevant component’s count).

One thing that might be troublesome is when I have variations of a base component which I want to display as one type of component (e.g. components A1 = 2, A2 = 5, A3 = 3, B1 = 3, C1 = 1 to display as A = 10, B = 3, C = 1). I think I might be able to figure something out by looking at this, though!