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

    Mac Webdialog opens in background

    Scheduled Pinned Locked Moved Developers' Forum
    11 Posts 5 Posters 522 Views 5 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.
    • W Offline
      Whaat
      last edited by

      Is this a common issue on Mac's with Webdialogs? Do you need to explicity call 'bring_to_front' for the dialog to open in front of the SketchUp window? I don't have a Mac so I can't test this but would the following code work to ensure that the dialog opens in front of the SketchUp window?

      @dlg.show{@dlg.bring_to_front}
      

      I doubt that the following would work:

      @dlg.show{}
      @dlg.bring_to_front
      

      OR

      @dlg.bring_to_front
      @dlg.show{}
      

      Thanks.

      SketchUp Plugins for Professionals

      1 Reply Last reply Reply Quote 0
      • W Offline
        Whaat
        last edited by

        ...still having no success with getting Mac Webdialogs to open 'on top'. Doesn't anyone know the solution?

        SketchUp Plugins for Professionals

        1 Reply Last reply Reply Quote 0
        • BurkhardB Offline
          Burkhard
          last edited by

          edited...does not work.

          [http://www.ia-plus.de(http://www.ia-plus.de)]

          1 Reply Last reply Reply Quote 0
          • W Offline
            Whaat
            last edited by

            Here's another idea. Does anyone know of any Ruby script that has a working Webdialog for Mac's (i.e. dialog does not open in background).

            SketchUp Plugins for Professionals

            1 Reply Last reply Reply Quote 0
            • BurkhardB Offline
              Burkhard
              last edited by

              I tried several with no luck. That was my idea as well.

              The only one I know are from Google 😉 ( If the instructor/ mentor is one of them )

              [http://www.ia-plus.de(http://www.ia-plus.de)]

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

                Here's what I do: I detect if the user is on a mac, and if so I open the dialogs with "show_modal". Modal dialogs on the PC are truly modal, meaning when they're visible you can't click on anything else in SketchUp, but on the mac they aren't truly modal... they just float on top of everything.

                if is_mac == true
                  dialog.show_modal
                else
                  dialog.show
                end
                

                It's a bit hacky, but it works.

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

                  @unknownuser said:

                  It's a bit hacky, but it works.

                  Hacky shmacky...thankyou so much!!

                  SketchUp Plugins for Professionals

                  1 Reply Last reply Reply Quote 0
                  • thomthomT Offline
                    thomthom
                    last edited by

                    Not-Really-Modal modal window... would never have though of trying that.

                    I feel there should be a list of SU Ruby tricks. And this should be on the list.

                    btw,how do you find out if SU is running on a mac?

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

                    1 Reply Last reply Reply Quote 0
                    • A Offline
                      azuby
                      last edited by

                      PLATFORM = (Object;;RUBY_PLATFORM =~ /mswin/i) ? ;windows ; ((Object;;RUBY_PLATFORM =~ /darwin/i) ? ;mac ; ;other)
                      

                      edit: It's a one-liner.

                      azuby

                      *error initus :: Blocks | CurrentDate | d/Code | extensionmanager | FFlipper | HideEdges | MeasuredArea | ModelHistory | PluginsHelp | PronButton | SAWSO | SCP | SU²CATT

                      Bad English? PM me, correct me. :smile:**

                      1 Reply Last reply Reply Quote 0
                      • thomthomT Offline
                        thomthom
                        last edited by

                        Just had another though, if you really want a modal window on mac? Not possible?

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

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

                          @thomthom said:

                          Just had another though, if you really want a modal window on mac? Not possible?

                          Not currently possible, unfortunately.

                          • Scott Lininger
                            SketchUp Software Engineer
                            Have you visited the Ruby API Docs?
                          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