sketchucation logo sketchucation
    • Login
    πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    Middle mouse button.

    Scheduled Pinned Locked Moved Developers' Forum
    8 Posts 7 Posters 2.2k Views 7 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.
    • C Offline
      CPhillips
      last edited by

      I am writing a tool that needs the middle mouse button but I am having trouble getting it to work.

      The left mouse buttons all seem to work fine but onMButtonDown and onMButtonDoubleClick are never called and onMButtonUp is only called after a double click.

      Has anyone got this to work. Is this a known bug?

      Chris

      1 Reply Last reply Reply Quote 0
      • M Offline
        MarcioAB
        last edited by

        Same problem here: Has anyone got this to work ? Or is this a known bug?
        The code below shows correctly "L" and "R" in the "Ruby Console" but never shows "M". Instead "M" it triggers the "Orbit tool".

        Thank you.

        require 'sketchup.rb'
        class Test1
        def onMButtonDown(flags, x, y, view)
        puts "M"
        end
        def onLButtonDown(flags, x, y, view)
        puts "L"
        end
        def onRButtonDown(flags, x, y, view)
        puts "R"
        end
        end

        def call1
        Sketchup.active_model.select_tool Test1.new
        end

        1 Reply Last reply Reply Quote 0
        • scottliningerS Offline
          scottlininger
          last edited by

          Hi Chris,

          This is a known issue to our team and should be addressed in a future maintenance release. I'm not aware of any workaround, unfortunately.

          • Scott Lininger
            SketchUp Software Engineer
            Have you visited the Ruby API Docs?
          1 Reply Last reply Reply Quote 0
          • PixeroP Offline
            Pixero
            last edited by

            @unknownuser said:

            Hi Chris,

            This is a known issue to our team and should be addressed in a future maintenance release. I'm not aware of any workaround, unfortunately.

            Sorry for hijacking the thread but I find this post rather discouraging.

            Not a: In the next release.
            Just a distant future service release. 😞
            I guess SU7 is further into the future than we all hope. πŸ‘Ž

            I can't understand why Google gives us nothing.
            Just some brief overview of approx what and when to make us not lose all hope.
            Google, we're starving!
            I guess I'm not the only one to look into alternative softwares just because we dont get ANY info on when and what will be fixed in SU7.
            End of hijack.

            1 Reply Last reply Reply Quote 0
            • scottliningerS Offline
              scottlininger
              last edited by

              Hey Jan,

              I really wish I could be more clear, but we're talking about timelines that aren't set in stone. I'd rather be vague than be disappointing!

              I understand your frustration. Let me restate my post to be: this bug has been fixed and will be available in our next release.

              • Scott Lininger
                SketchUp Software Engineer
                Have you visited the Ruby API Docs?
              1 Reply Last reply Reply Quote 0
              • T Offline
                tomasz
                last edited by

                Thanks Scott for you answer. What we really miss here in the Ruby section is a professional feedback from SU Team regarding bugs and missing Ruby features, for example:

                • ray casting bug - ray stops on hidden entities or entities on a hidden layers
                • selection bug displaying also a geometry of a definition
                • only first attribute restored when saved with SKM material
                  and few more...

                I understand that not all have to be answered. I am just glad to see you here.
                Tomasz

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

                1 Reply Last reply Reply Quote 0
                • fredo6F Offline
                  fredo6
                  last edited by

                  We can add this one (although I may have found a fix)
                  Web Dialog on Mac asynchronous .

                  Fredo

                  1 Reply Last reply Reply Quote 0
                  • renderizaR Offline
                    renderiza
                    last edited by

                    Hi, I have the same problem in 2017...Is this going to be fixed?

                    Here is the test I did...

                    class TestMiddleButton
                      #Not Working...
                      def onMButtonDown(flags, x, y, view)
                        puts "onMButtonDown; flags = #{flags}"
                        puts "                    x = #{x}"
                        puts "                    y = #{y}"
                        puts "                 view = #{view}"
                      end
                      
                      #This one is working....
                      def resume(view)
                        puts "resume; view = #{view}"
                      end
                    end
                    
                    Sketchup.active_model.select_tool TestMiddleButton.new
                    

                    [url=https://www.sketchupcode.com/:z3kqsidd]My Extensions ...[/url:z3kqsidd]

                    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