• Login
sketchucation logo sketchucation
  • Login
🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

OnRButtonUp broken?

Scheduled Pinned Locked Moved Developers' Forum
6 Posts 3 Posters 453 Views 3 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    AdamB
    last edited by 10 Oct 2010, 22:19

    onRButtonUp only gets called if the mouse doesn't move, whereas onLButtonUp gets called when the mouse button is released regardless of whether the mouse has moved.

    ` class ButtonTest

    def initialize
    	puts "started"
    end
    
    def onLButtonDown(flags, x, y, view)
    	puts "onLButtonDown"
    end
    def onLButtonUp(flags, x, y, view)
    	puts "onLButtonUp"
    end
    
    def onRButtonDown(flags, x, y, view)
    	puts "onRButtonDown"
    end
    def onRButtonUp(flags, x, y, view)
    	puts "onRButtonUp"
    end
    

    end

    Sketchup.active_model.select_tool ButtonTest.new`

    Developer of LightUp Click for website

    1 Reply Last reply Reply Quote 0
    • T Offline
      thomthom
      last edited by 10 Oct 2010, 23:40

      Tested your code on Win7, onRButtonUp always trigger, even when I move the mouse after onRButtonDown triggers before releasing.

      Thomas Thomassen — SketchUp Monkey & Coding addict
      List of my plugins and link to the CookieWare fund

      1 Reply Last reply Reply Quote 0
      • T Offline
        tomasz
        last edited by 11 Oct 2010, 06:28

        It does work fine on Vista.

        Author of [Thea Render for SketchUp](http://www.thearender.com/sketchup)

        1 Reply Last reply Reply Quote 0
        • A Offline
          AdamB
          last edited by 11 Oct 2010, 13:33

          ok, I've logged a bug with Google. Seems its just a Mac thing.

          Developer of LightUp Click for website

          1 Reply Last reply Reply Quote 0
          • A Offline
            AdamB
            last edited by 11 Oct 2010, 23:31

            Just for the record..

            On Mac, onRButtonUp doesn't get called apart from for a simple down-up click event. However, onRButtonDoubleClick gets called instead.. so just stick your code in there and things work.

            [Appreciated the super fast response from the Google Team]

            Developer of LightUp Click for website

            1 Reply Last reply Reply Quote 0
            • T Offline
              thomthom
              last edited by 12 Oct 2010, 06:14

              So both events are busted.

              And when they fix it..?

              Thomas Thomassen — SketchUp Monkey & Coding addict
              List of my plugins and link to the CookieWare fund

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              1 / 1
              • First post
                1/6
                Last post
              Buy SketchPlus
              Buy SUbD
              Buy WrapR
              Buy eBook
              Buy Modelur
              Buy Vertex Tools
              Buy SketchCuisine
              Buy FormFonts

              Advertisement