Actions

clog-moldable-inspector

Action buttons

You can put action buttons anywhere in a view. An action button has a thunk attached to it that is executed when the button is clicked. If the thunk returns non-nil, the inspector pane is refreshed after the action. This is intended for actions that change the object and thus invalidate its views.

Action buttons can also be added to a pane's title bar, by specializing the generic function . An example is the hvs::*icon-copy* button on pathnames, which copies the pathname to the system clipboard. Check it out on this object: .

By alt-clicking an action button, you can inspect the thunk that represents the action. Try it on the hvs::*icon-copy* button of the inspector pane for the pathname that you just opened!

Eval buttons

Eval buttons differ from action buttons in one respect: the return value of the action thunk is inspected in a new pane. The arrow buttons in each object's "Operations" view are good examples.