Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
🫛 Lightbeans Update | Metallic and Roughness auto-applied in SketchUp 2025+ Download
True/false toggle?
-
I don't suppose there is some sort of built in toggle method for true and false, is there? Example of how I wanted to use it:
` reverse = false
def (key, repeat, flags, view)
if key == VK_UP
reverse.toggle
end
end #onKeyUp`The .toggle method does not exist, but it is what I was hoping to find, and hoping I just didn't know what it was called. Anything like this in the Ruby language?
Chris
-
Chris,
Personally, I just use
reverse = !reverse -
Aha! That does precisely what I was hoping for! Thanks Fredo,
Chris
Advertisement