sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Action callback - Duh!

    Scheduled Pinned Locked Moved Developers' Forum
    4 Posts 2 Posters 181 Views 2 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.
    • thomthomT Offline
      thomthom
      last edited by

      Just occurred to me that I don't need to use java to add callbacks to ruby from webdialogs.

      This works just as well:

      
      <body>
      <a href="skp;foo@bar">Hello World</a>
      </body>
      
      

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

      1 Reply Last reply Reply Quote 0
      • jolranJ Offline
        jolran
        last edited by

        Would you care to further explain, please ?

        This looks intresting BTW, just in time..

        Edit: Ok. gives you "bar" in callback value (key, value).
        So what the difference VS window.location.href = whatever.. ?
        Have you found something to adress the sync issue ???

        Or are you making tabs, heh πŸ˜„ ?

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

          I've normally attached a JS event which calls: window.location = 'skp:foo@bar'; for all event callbacks from JS to Ruby. Even for links. But it's not needed at all as only activates the custom skp: protocol.

          Still need to use JS for buttons etc - but for <A> elements that triggers callback it can be simplified by adding directly into the HREF attribute.

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

          1 Reply Last reply Reply Quote 0
          • jolranJ Offline
            jolran
            last edited by

            I see.

            Clever solution, anyway. Save's some code.

            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