This is what ChatGPT responded with in answer to my question:
You’re not doing anything “wrong” in that snippet — you’ve run into a long-standing SketchUp-for-macOS toolbar/palette bug/limitation, not a Ruby API usage issue.
What’s going on (macOS)
On macOS, extension toolbars are those floating Tool Palettes. There’s a known issue where:
- If a palette is horizontal (snapped to the top edge), tooltips don’t show. SketchUp Community+2SketchUp Community+2
- Switching orientation often requires a SketchUp restart before tooltips behave again. SketchUp Community+1
- Related: “hover/press feedback” and command appearance updates are also inconsistent for plugin palettes on macOS (validation/state/visual response not updating as expected). GitHub+1
SketchUp’s own API issue tracker has this logged as an API/UI bug affecting tooltips, status bar text, and command appearance for plugin toolbars (palettes) on macOS. GitHub
Why your icon doesn’t “darken/depress” like Windows
Windows and macOS are using different native UI implementations for these toolbars/palettes. On macOS, extension palettes have multiple documented UI behavior gaps (including the “pressed/highlight” and command-state rendering). GitHub+1
If what you really want is a “toggled/checked” look (not just a momentary press effect), the intended API mechanism is a validation proc:
cmd3.set_validation_proc {
tool_active? ? MF_CHECKED : MF_UNCHECKED
}
…but note: on macOS palettes this has historically been unreliable (it’s part of the same family of issues). GitHub+1
One small code nit (not the cause, but worth fixing)
This line:
toolbar = toolbar.add_item cmd3
add_item returns an integer id, so that overwrites your toolbar object. Prefer:
toolbar.add_item(cmd3)
Again: this isn’t what’s breaking tooltips; it just prevents you from adding more items afterwards.
Practical workarounds you can suggest to Mac users (today)
- Keep extension palettes vertical (dock to the left side) if they want tooltips. SketchUp Community+2SketchUp Community+2
- If they change orientation, quit + relaunch SketchUp to get tooltips back. SketchUp Community+1
- If you want better “remembered” palette behavior, prefer
toolbar.restoreovertoolbar.show(more about visibility/positioning than tooltips, but it’s the recommended pattern on Mac). SketchUp Community - Encourage power users to place a few critical commands in the main (top) toolbar via Customize Toolbar, since the worst behavior tends to be with separate extension palettes. GitHub
Bottom line: your command setup is fine; the tooltip + visual feedback problems you’re seeing match a known macOS palette issue in SketchUp.