This constantly catches me out. I accidentally delete some part of my [codebox] code and hit CTRL-Z to undo, only for it to start undoing events in the actual patcher. Is there actually no undo function inside of [codebox] at all?
Additionally - I find the [codebox] interface object behaviour counter-intuitive to the Max paradigm. Currently it lets you select text while the patcher is locked. You can't edit it, which makes sense, but this behaviour also catches me out, where I position the text cursor and start typing, then realise the patcher is locked. Also, you have to click on the very top or bottom dark grey line to move it.
For me, a more intuitive behaviour would be:
- Prevent text from being highlighted or the cursor from being placed while the patcher is locked
- Once the patcher is unlocked, the [codebox] object can be moved by click-dragging anywhere on the interface object
- Enable [codebox] editing by double-clicking on the white space, which additionally enables text selection and cursor placement
- While editing, undo works only for the [codebox] object
- Click once anywhere out of the [codebox] to disable editing; disabling undo for the [codebox], and re-enabling undo for the patcher
I feel that these changes would mirror how the rest of Max works and make using [codebox] a much better experience.