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

    Web Dialog on MAC

    Scheduled Pinned Locked Moved Developers' Forum
    8 Posts 4 Posters 928 Views 4 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.
    • BurkhardB Offline
      Burkhard
      last edited by

      Got some problems to run my plugin ( vid2su.rb ) on MAC. There's an error: Method not allowed

      • requested method POST for URL.... I know some of the solutions for that in general. But here it is only on MAC. Windows runs fine.
        Is it possible that there is a problem with safari and Web Dialog Browsers, that I do not know?

      Burkhard

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

      1 Reply Last reply Reply Quote 0
      • C Offline
        CPhillips
        last edited by

        @burkhard said:

        Got some problems to run my plugin ( vid2su.rb ) on MAC. There's an error: Method not allowed

        • requested method POST for URL.... I know some of the solutions for that in general. But here it is only on MAC. Windows runs fine.
          Is it possible that there is a problem with safari and Web Dialog Browsers, that I do not know?

        Burkhard

        If you are using execute_script() that could be your problem. Its borked on Mac.

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

          Thanks, CP but it occurs only by using the WebDialog Browser in Sketchup.
          The Webside itselfs works perfectly on MAC ( Safari ). That is I reckon a conflict between WDB and MAC.

          The error message is typical for script ( js ) problems. But there must be another solution.
          Where can I get some information about using WDBrowsers in Sketchup?

          Burkhard

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

          1 Reply Last reply Reply Quote 0
          • R Offline
            RickW
            last edited by

            There are several problems with Safari and WebDialogs. Most of the problems seem to be centered around actually accessing the internet through the WD (either callbacks to SU from web pages, your posts issue, etc). Talks with one of the SU folks indicated it's a Safari issue; talks with someone who knew someone with knowledge of Safari inner workings said it was a SU issue. The point? We don't know the source of the problem, only that a problem exists. Hopefully, it will be fixed before SU7...

            RickW
            [www.smustard.com](http://www.smustard.com)

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

              Thanks Rick!
              Einen schönen Tag

              Gruß Burkhard

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

              1 Reply Last reply Reply Quote 0
              • J Offline
                Jim
                last edited by

                @cphillips said:

                If you are using execute_script() that could be your problem. Its borked on Mac.

                Is this still correct? Can execute_script be used at all on a Mac?

                Edit: Found a clue here and will try what Chris suggests (calling pre-defined js functions in execute_script.)

                Hi

                1 Reply Last reply Reply Quote 0
                • C Offline
                  CPhillips
                  last edited by

                  @jim said:

                  @cphillips said:

                  If you are using execute_script() that could be your problem. Its borked on Mac.

                  Is this still correct? Can execute_script be used at all on a Mac?

                  Edit: Found a clue here and will try what Chris suggests (calling pre-defined js functions in execute_script.)

                  Yes it is still messed up. The string you pass to execute_script can be mangled in a number of ways on Mac. I found so many different problems that I gave up using it for anything but a simple function call with no arguments.

                  BUT. I just recently found a work around for Mac. Instead of calling execute_script with a string, write the string to a disk file (like frag.js) and then call a JavaScript function that will load the frag. Same result but it seems to work on both platforms.

                  
                  //javascript function that will load and execute file frag.js.
                  function loadScriptFrag()
                  {
                      var fileref=document.createElement('script')
                      fileref.setAttribute("type","text/javascript")
                      fileref.setAttribute("src", "./frag.js")
                      if (typeof fileref!="undefined")
                          document.getElementsByTagName("head")[0].appendChild(fileref)
                  }
                  
                  
                  1 Reply Last reply Reply Quote 0
                  • C Offline
                    CPhillips
                    last edited by

                    On a related note. The callbacks from javascript to ruby also have issues. Both on Mac and PC the return value string can be mangled.

                    Instead I put return values in a hidden text field in my html and fetch them via WebDialog.get_value(). As far as I can tell its foolproof.

                    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