The button performs its action upon releasing the mouse. In musical contexts, you might want to use mouseDownAction_() to set a function to be performed on pressing the mouse (see View, and examples below).

If the drag contains a number, then valueAction_() is performed using the currentDrag. If the drag contains anything else, action is set to the current drag. You could, for example, drag a function to an Button, and action would then be set to that function.

In a musical context, a button-down press is more meaningful than a button-up (release) as it's more intuitive to press a button on the beat. For that you can use View's View: mouseDownAction (a superclass of Button).

If you drag a function to a button, the button's action is set to that function. you can us this for swapping functions.

Using Routine to set button states on the fly.

Using Routine to set button states on the fly 2.

Complex drag and drop example try dragging the buttons to white slot, and then between white slots, or simply out of the view.