Block templates and updating a nested element
Draws signalling charts, block diagrams and graphs from text input.
Brought to you by:
teknos293
Hi Zoltan,
I was struggling with block templates and updating a nested element.
Please see below example.
At first, I thought I could address a block with the dot notation, but this fails.
I found out that I need to nest the update statement as well, and then I succeed. But then the automatic formatting does not work properly. Additionally, when I format ([Ctrl]+[A], [Tab], [Tab], [Tab], [Tab]) the example below multiple times, the bottom second line is growing spaces for each tab.
My requests:
*By the way, how are you? You've not been active lately? *
Kind regards,
Martijn
template col tmp { box one { box two; } } # Try to address a block with dot notation copy tmp as a { update one.two [fill.color=green]; } # This succeeds, but does not auto-format correctly copy tmp as a { update one { update two [fill.color=green]; } }
Hi Martin,
Thanks for spotting this.
The second form was the intended one, but I agree the first form is natural and much better. I add this to my todo list.
We have a newborn baby and I struggle to find time. It will get better, but I do not know when.
Zoltan
Hi Zoltan, congratulations with your newborn to you and your family! I know from experience that these are life-altering events :)
Both suggestions will hopefully work in 6.3.4, to be released today.