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

    WebDialogs, "skp:", and Windows 8/IE 10?

    Scheduled Pinned Locked Moved Developers' Forum
    8 Posts 5 Posters 480 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.
    • J Offline
      jasef
      last edited by

      When using WebDialogs with JavaScript, you can pass messages from the JS back to the Ruby plugin using this technique:

      window.location = "skp:callback_name@callback_data"

      (described in "Accessing SketchUp from JavaScript" in Automatic SketchUp on page 319)

      The skp: is a psuedo-protocol and the above line of code sends callback_data to the Ruby method callback_name.

      This works fine across Mac (using Safari instances for the WebDialogs) an Windows (IE instances) for local HTML files (using WebDialog.set_file html_filepath) and it works for remote JavaScript web pages (using WebDialog.set_url my_url) in every instance we've seen…except with Windows 8! (which uses IE 10 for WebDialogs?)

      We've looked into workarounds (setting the registry to properly handle "skp:", etc.) but can't find anything easy. Is there anything we can do to get this "skp:" message passing to work in IE 10 WebDialogs for remote .html files?

      Thanks,

      j.

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

        (I thought embedded IE (maybe only IE8) uses IE7 mode.)

        Did you play around with different doctypes or setting standard/quirks/etc. mode?
        Check out the lost WebDialog manual. Whatever the solution is, it would be valuable to have in the manual.

        1 Reply Last reply Reply Quote 0
        • Dan RathbunD Offline
          Dan Rathbun
          last edited by

          @jasef said:

          The skp: is a psuedo-protocol and the above line of code sends callback_data to the Ruby method callback_name.

          Microsoft calls them "Asynchronous Pluggable Protocols"
          see this MSDN page for more info

          I'm not here much anymore.

          1 Reply Last reply Reply Quote 0
          • Dan RathbunD Offline
            Dan Rathbun
            last edited by

            @jasef said:

            Is there anything we can do to get this "skp:" message passing to work in IE 10 WebDialogs for remote .html files?

            Did you set the WebDialog to allow actions from your remote host ?

            see: WebDialog.allow_actions_from_host()

            đź’­

            I'm not here much anymore.

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

              Dan, we tried WebDialog.allow_actions_from_host() with no luck so far.

              Correction: this is not an IE10 issue; Win 8 uses IE10 as the default browser, but SketchUp is using IE7 for web dialogs:

              Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.2; WOW64; Trident/6.0; .NET4.0E; .NET4.0C; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729) Google-SketchUp/8.0 (PC)

              1 Reply Last reply Reply Quote 0
              • H Offline
                honkinberry
                last edited by

                My understanding is that Windows is not "using" IE7 for WebDialogs, that is just one unusual nature of the user agent string. MSDN says to trust the Trident setting as being more accurate:
                http://msdn.microsoft.com/en-us/library/ms537503(v=vs.85.aspx

                As such, Trident/6.0 = IE10.

                --J

                1 Reply Last reply Reply Quote 0
                • Dan RathbunD Offline
                  Dan Rathbun
                  last edited by

                  Yes I think applications host the WebBrowser Control from shdocvw.dll (not MSIE, itself.)

                  See: Chapter 11 - The WebBrowser Control

                  On XP, shdocvw.dll is ver 6.0.xxxx, and is likely newer on Windows 8.

                  I'm not here much anymore.

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

                    @jasef said:

                    Dan, we tried WebDialog.allow_actions_from_host() with no luck so far.

                    Correction: this is not an IE10 issue; Win 8 uses IE10 as the default browser, but SketchUp is using IE7 for web dialogs:

                    Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.2; WOW64; Trident/6.0; .NET4.0E; .NET4.0C; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729) Google-SketchUp/8.0 (PC)

                    The rules for picking doctype (and hence render engine) is different for embedded IE than browser IE. It's much more conservative in order to preserve application compatibilities.

                    To force WebDialogs to use the latest render mode use the X-UA-Compatible META element.

                    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>

                    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