UI.set_toolbar_visible
-
Hi, I'm learning, so go easy on me. (I'll probably need to preface every post of mine here the ruby forum forever, or you could just remember that and I'll quit posting it )
So I am playing with the UI.set_toolbar_visible .....method?....... And I have gotten it to work. I can close and open toolbars as I see fit. But there are 4 toolbars that don't seem to be control-able.
Large Tool Set
Layers
Measurements
ShadowsSo I'll attempt to post my code.
toolbar_names_counter = 0 UI.toolbar_names.each do name = UI.toolbar_names[toolbar_names_counter] is_visible = true status = UI.set_toolbar_visible name, is_visible toolbar_names_counter = toolbar_names_counter +1 end
So that should go through and turn on every toolbar (I think). But it never opens the four I listed.
So then I found UI.toolbar_names. I type this into the ruby console:
puts UI.toolbar_names
and I get this output:
Standard Principle Camera Drawing Edit Construction Walk DisplayMode StandardViews Section Google GettingStarted VCB
Apparently those 4 toolbars are just not listed in the UI.toolbar stuff. Is there a way to access the unlisted toolbars?
Thanks,
Chris - sorry such a long post for something probably trivial.
-
Wonder if they are special elements. Layers, Measurements and Shadows contains custom content, not just toolbar buttons. Might be why. Not sure why Large Tool Set won't list.
hm... you'd think there's be an toolbars enumerable available...
-
It could be called a bug, or there may be other reasons the 4 toolbars are not listed using the "toolbar_names" method. Probably the only ones who can answer that are the developers.
-
Darn, that's what I was afraid of. I was hoping that I just missed something because I have no clue what I'm doing. There goes my dreams for a new toolbar manager ruby
Chris
-
Hey guys,
I've filed a bug. If any old-timers remember seeing this one from the years of yore, please let me know.
Thanks, Chris!
Cheers,
-
I think I've seen it. I believe there is also still a Mac-specific bug related to this, where the first 4 characters of the toolbar names are truncated.
-
Is there a way that I could write a script that controls the visibility other people's toolbars? Umm, for example, is there a method that will return ALL loaded toolbars, not just the default listed ones, but ALL that have been loaded by other rubies? Thanks,
Chris
-
http://forums.sketchucation.com/viewtopic.php?f=180&t=21156
Just linking various related threads together for other people looking for the same topic.
Advertisement