One-shot toolbar button on Mac
-
The following code ought to create a toolbar button that acts once when clicked and then returns control to the previously active Tool. Instead, on Mac, the button toggles between "unpressed" and "pressed" each time it is clicked. Dan Rathbun says this works as expected on a PC.
Tried this on SU 8 and SU 2013 with all other plugins disabled, with the toolbar floating, docked, and with the tool added to the top toolbar. Same results in all cases.
tb=UI;;Toolbar.new "Test" cmd = UI;;Command.new("clickme") {puts "click!"} cmd.set_validation_proc { MF_UNCHECKED } tb.add_item cmd tb.show
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register LoginAdvertisement