sketchucation logo sketchucation
    • Login
    ℹ️ GoFundMe | Our friend Gus Robatto needs some help in a challenging time Learn More

    OnRButtonUp broken?

    Scheduled Pinned Locked Moved Developers' Forum
    6 Posts 3 Posters 453 Views
    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.
    • AdamBA Offline
      AdamB
      last edited by

      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
      • thomthomT Offline
        thomthom
        last edited by

        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

          It does work fine on Vista.

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

          1 Reply Last reply Reply Quote 0
          • AdamBA Offline
            AdamB
            last edited by

            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
            • AdamBA Offline
              AdamB
              last edited by

              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
              • thomthomT Offline
                thomthom
                last edited by

                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
                • First post
                  Last post
                Buy SketchPlus
                Buy SUbD
                Buy WrapR
                Buy eBook
                Buy Modelur
                Buy Vertex Tools
                Buy SketchCuisine
                Buy FormFonts

                Advertisement