Cabbage Logo
Back to Cabbage Site

Writing to the .csd file when Play is pressed

Here is another behaviour which surprised me and may surprise, annoy or confuse other users. (v2.0.02 compiled for Debian x86-64.)

Any change to the text of the .csd file in the editor causes the file on disk to be written when the Play button is pressed.

Normally (to my way of thinking, at least - not accounting for Web 2.0, Android touchscreen app etc. ways of everything changing and jumping around at the slightest touch), an application will not write a file without an explicit command or acknowledgement from the user.

This behaviour permanently changes the example files, unless the user already knows to save to another file before altering the text and pressing Play.

This has the been the default behavior for quite some time. The reason being that Csound, when it crashes, can take down the entire application causing all data to be lost. I use Cabbage in teaching and having the file saved each time one presses play has been a godsend on many occasions. That being said, I can always offer the option of working with unsaved files.

The issue of the examples came up too not long ago. I think the best thing would be to simply prevent the user from overwriting an example and instead prompt them to save their changes in a new file?

1 Like

I like both of these ideas, either lock the examples and have cabbage do a “save as” and also possibly add a toggle in the options menu to “save when play is pressed” that defaults to on.