Feat - automatically remove objects spawned with zero-width names
After starting the process of adding an object by typing in its name, if you delete the text you have typed, you are left with a blank red object box that has no text in it. Instead of leaving the object as a blank red box, I think it would probably be best to delete it. This would allow cancelling the action of adding an object by simply deleting the text you typed and clicking out of it, which (at least to me) makes the most sense from a UX standpoint.
Empty objects are valid objects in Pd-vanilla. In fact the "add object menu" has an empty object as an option.
Maybe if a user presses delete while in text editor of the object, and it has no more text to delete an option dialog asks if the user wants to delete it?
Oh, interesting. Allowing backspace or delete as a gesture to remove the object would be a good option. It probably doesn't even need a dialog, just pressing backspace while editing the object is probably sufficient. It's not much trouble to make another one if you deleted a blank one by accident. I think a dialog would be likely to get in the way.
Autorepeat delete is the problem. A user can hold a key down and delete repeats, it's a setting in the OS.
Giving this more thought, it feels like it's trivial to select the object and delete anyway. I don't think we need this.
Hmm, true. That is a problem. Could there possibly be a keyboard shortcut instead, like shift backspace? I think there to be a way to cancel adding an object. I probably should rephrase the title of this issue.
Possibly if you have newly added the object (not created the object completely) then pressing escape could delete it?
So escape could work in this way for a double click added object only.
Do you think that would be helpful?
Or as you have suggested, a modifier for backspace that will delete the currently editted object, regardless of if it's a new object or not.
The more I think about this the more I like the modifier approach.