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

    Yet another SavePanel question

    Scheduled Pinned Locked Moved Developers' Forum
    5 Posts 3 Posters 243 Views 3 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.
    • T Offline
      talig
      last edited by

      Hi everyone,
      I have a savepanel question for you guys.
      Is there any way to tell from the code if a savepanel was closed using "Cancel" or using "Ok"? Tried the documentation, didn't find any access to that particular thing.
      Maybe you know if this sets some bit or something like that?

      Thanks a bundle,

      • TaliG

      Avatar: all rights reserved to Bryan Eppihimer

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

        The manual says it returns nil if the user cancels. Is that not so?

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

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

          I think savepanel returns the selected path and filename as a String, or either false or nil when the Cancel button is used.

          
          
          file = UI.savepanel
          
          if file
            # maybe check for other possible bad input,
            # do something useful with file.
          else
            # use hit cancel
          end
          
          
          

          Hi

          1 Reply Last reply Reply Quote 0
          • T Offline
            talig
            last edited by

            I'm pretty sure I've tried these. I'll try it again...

            Avatar: all rights reserved to Bryan Eppihimer

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

              Test the return value. The manual has been wrong before. It might be false or en empty string.

              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