Comment #5 on issue 576 by alexandr...@gmail.com: Border of children depends on another shape in a complex shape http://code.google.com/p/moose-technology/issues/detail?id=576
I found the problem. It is due to the cache. Currently, each node contains a dictionary referenced by a variable called "attributes". This dictionary maps metrics to values. For example, if I have a script like "view node: 'hello'", then the MONode that represents 'hello' will have the attributes dictionary full of associations like: {cacheWidthFor: -> 5, cacheHeightFor: -> 5, cacheborderWidthFor:-> 1}. Everything is okay so far. The basic assumption behind the cache, is that a MONode can have only one graphical representation. This assumption is wrong because of the formbuilder. When I first designed the cache, the forms builder was quite mysterious to me. I better understand the implications now.
For the upper shape (MORectangleShape new fillColor: Color green; withText), the border width is 1. For "view shape rectangle fillColor: Color red; borderColor: Color blue; borderWidth: 10; size: 90", the border width is 10. So, two different values for the same MONode.
I will update the cache to have something like: {(shape1, cacheWidthFor:) -> 5, (shape1, cacheHeightFor:) -> 5, (shape1, cacheborderWidthFor:)-> 1, (shape2, cacheborderWidthFor:)-> 10}
This will have an impact on performance. How does that sound?