Closed codemanyak closed 3 years ago
The CSV export mentioned in the (edited) description might follow one of he following choosable conventions
As TurtleBox is located in an independent package outside the structorizer hierarchy (and shall remain importable from other Java projects), the proposed enhancements would mean to subclass TurtleBox in Structorizer to allow the subclass to join the Locale mechanism of Structorizer. Likewise, the proposed export of nsd files wouldn't make sense apart from Structorizer. So it would be kind of "Turtleizer Plus" that is fully compatible on the API side but has some GUI-controllable functional additions.
There is no urgence in these ideas. I just wanted to keep them recorded, lest they should be forgotten.
I wrote in https://github.com/fesch/Structorizer.Desktop/issues/704#issuecomment-473372405:
As TurtleBox is located in an independent package outside the structorizer hierarchy (and shall remain importable from other Java projects), the proposed enhancements would mean to subclass TurtleBox in Structorizer to allow the subclass to join the Locale mechanism of Structorizer. Likewise, the proposed export of nsd files wouldn't make sense apart from Structorizer. So it would be kind of "Turtleizer Plus" that is fully compatible on the API side but has some GUI-controllable functional additions.
This preoccupation was unsubstantial, at least with respect to the Locales mechanism since this works via Java Reflection "from outside" and does not require collaboration of the treated GUI component nor even a specific interface. The component can be registered for localisation by a third party (e.g. Structorizer). If it is not then there will simply not be a localisation support and the GUI stays in English. Hence, nothing to worry about. The CSV export would not be a problem, either. The proposed NSD export is highly questionable anyway as it would produce a mere linear instruction sequence with little chance to infer loops or sensible subroutines.
With exception of item 3 (selection of segments) the proposals have been implemented in a first version. Something might be disputed or improved later (e.g. whether background colour and turtle visibility must still be reset on every diagram start).
In analogy to Arranger, Turtleizer (actually the TurtleBox) could be enhanced as follows: