hi,
let me add this one to all those boring self-followups...
I wrote: ...
[...] but then you cannot save instantiated abstractions [...] [...] it is very easy to make such a mistake accidentally
...
One could expect at first that accidental saving would not occur,
because if there were no editing changes made to a document, plain
saving (as opposed to Save as') should be disabled -- as is the usual practise. But blocking the
Save' command requires proper
handling of dirty flag. I assume the expected behaviour is raising
dirty flag after making any change and only such a change that
would be saved in a document file.
First -- currently several editing actions, most often performed with gui objects, do not make my documents dirty:
Object creation while two conditions are met: a) canvas is in edit mode; b) object is created by sending a message to a canvas (through menu item/shortcut or directly) instead of typing its name in a box. These are the normal conditions for gui objects. Creating text objects will normally raise the flag because this usually involves typing text (unless someone is sending direct messages like 'pd-<canvasname> obj <x> <y> <objectname>...').
Properties change (atom, array or gui object).
Moving gui object with arrow keys (which means through a list message such as '1 Shift_L, 1 Down'). This one is a gui-only thing.
Btw. these are current dirty actions:
Second -- there are also some dirty actions that I suspect should not be treated as dirty. Perhaps the following two need to be corrected by passing zero to canvas_editmode() instead of one:
Krzysztof
(maybe canvas_editmode() itself should be corrected, and also -- since calling it seems to be confusing -- better documented?)