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

    Hide components panel on close

    Scheduled Pinned Locked Moved Developers' Forum
    6 Posts 3 Posters 253 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.
    • S Offline
      simonstaton
      last edited by

      I am making a few posts atm but thats because im hurrying to meet a deadline πŸ˜„

      this problem is that I want my components panel to close when sketchup closes. is there an on event close function that I could use?

      1 Reply Last reply Reply Quote 0
      • Chris FullmerC Offline
        Chris Fullmer
        last edited by

        Yup, look at the AppObserver.

        http://code.google.com/apis/sketchup/docs/ourdoc/appobserver.html

        Chris

        Lately you've been tan, suspicious for the winter.
        All my Plugins I've written

        1 Reply Last reply Reply Quote 0
        • S Offline
          simonstaton
          last edited by

          @chris fullmer said:

          Yup, look at the AppObserver.

          http://code.google.com/apis/sketchup/docs/ourdoc/appobserver.html

          Chris

          I just had a look at that and it seems to be what I am looking for but when I put

           def onQuit()
             UI.messagebox("onQuit; ")
           end
          

          into my .rb file nothing seems to happen no messagebox appears

          1 Reply Last reply Reply Quote 0
          • Chris FullmerC Offline
            Chris Fullmer
            last edited by

            It has to be put into a class and you have to instantiate the class as a tool. And you also have to attach an observer to the Sketchup object.

            Check out the full example in the introduction paragraph on that page. It shows better how to use it in context.

            Chris

            Lately you've been tan, suspicious for the winter.
            All my Plugins I've written

            1 Reply Last reply Reply Quote 0
            • S Offline
              simonstaton
              last edited by

              @chris fullmer said:

              you have to instantiate the class as a tool.

              well I need it to hide when sketchup closes not on a tool press. you got any ideas on how I cans et this up to close on sketcup close. I have managed to get it to apepar on sketchup open. but its just closeing it

              1 Reply Last reply Reply Quote 0
              • AdamBA Offline
                AdamB
                last edited by

                @chris fullmer said:

                It has to be put into a class and you have to instantiate the class as a tool. And you also have to attach an observer to the Sketchup object.

                Check out the full example in the introduction paragraph on that page. It shows better how to use it in context.

                Chris

                Apart from onQuit is broken on Mac OSX which is annoying.

                Also be aware that these "stuff has finished / been deleted" generally get invoked after the fact so don't expect to get useful info from the objects in question.

                Adam

                Developer of LightUp Click for website

                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