sketchucation logo sketchucation
    • Login
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    ⚠️ Update | Sketchucation Tools 5.0.8 released with licensing improvements and bugfixes Download

    SKUI — A GUI Framework for SketchUp

    Scheduled Pinned Locked Moved Developers' Forum
    75 Posts 21 Posters 20.1k Views 21 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.
    • P
      pgarmyn
      last edited by

      Has SKUI been tested on Mac ?
      Mac-users ❓

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

        @pgarmyn said:

        Has SKUI been tested on Mac ?
        Mac-users ❓

        Yes, I have a mac I test it on.
        How come? You found issues?

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

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

          So, I'm a bit unclear here - have you found issues with SKUI on OSX?

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

          1 Reply Last reply
          Reply Quote 0
          • P
            pgarmyn
            last edited by

            @thomthom said:

            So, I'm a bit unclear here - have you found issues with SKUI on OSX?

            Completly clear : Before i use it, i wanted to know..... So i don't have any experience yet with SKUI.
            Thanks for the info : tested on Mac

            1 Reply Last reply
            Reply Quote 0
            • P
              pgarmyn
              last edited by

              @thomthom said:

              Yes, I have a mac I test it on.
              How come? You found issues?

              No I have Mac issues with the SU inputbox and was looking for an alternative...

              See : http://sketchucation.com/forums/viewtopic.php?f=11%26amp;t=57642#p524309

              1 Reply Last reply
              Reply Quote 0
              • A
                arunkumargonal
                last edited by

                Hi ThomThom,

                SKUI is helping me a lot in building some basic GUI.

                Need your help for the following scenario.
                I am adding controls to the window. I have kept a selection observer, when ever the selection changes, Need to remove all the controls in the window and add new ones.

                I am trying to use the remove_control method of control_manager which is not deleting all the controls. Please let me know if it is right to use the below code for removing all the controls of the window.

                window.controls.each do |control| window.remove_control(control) end

                Thank you,
                Arun.

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

                  hm... haven't really done much for removing. I don't recall what that method was for. Though, performance wise I would think it would be faster to put them in a Groupbox - then hide/show the groupbox. ...saying that - maybe hide/show need to be added...

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

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

                    No - Control.visible and Control.visible= is already implemented! 😄
                    But I really should generate them docs.

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

                    1 Reply Last reply
                    Reply Quote 0
                    • A
                      arunkumargonal
                      last edited by

                      Hey TT,

                      The remove_control works good. It indeed removes the control from the window.
                      The issue was with my code, I was using window.controls.each to call the remove_control in which, the control is deleted from the array.
                      My code:
                      @window.controls.each do |container| @window.remove_control(container) end

                      Code in remove_control
                      @controls.delete( control )

                      I commented the delete inside the remove_control function and used @windows.controls.clear in my function.

                      Thanks & Regards,
                      Arun

                      1 Reply Last reply
                      Reply Quote 0
                      • tt_suT
                        tt_su
                        last edited by

                        Ah, you where removing elements from the collection you iterated - that will usually always cause problems with any collection. You want to make an array copy of the collection first and iterate that instead.

                        @window.controls.to_aeach

                        1 Reply Last reply
                        Reply Quote 0
                        • brewskyB
                          brewsky
                          last edited by

                          Hi TT,

                          I want to try to add a progressbar control to SKUI.
                          It does not seem very different from the jQuery widget for "button"...
                          Do you have any tips on where to start? 😉

                          Another question, how did you disable the right-click / context menu in the webdialog?
                          Would be nice to temporarily enable "view source"...

                          Thanks!

                          Sketchup BIM-Tools - http://sketchucation.com/forums/viewtopic.php?p=299107

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

                            @brewsky

                            Don't want to be a bringer of bad news 😳 , but I have some negative experiences with that.

                            It can be problematic to do a progressbar to webdialog. Due to the "freeze" that happends when ruby calculates.

                            There where some early reports on that long ago. (Look in the first link at first post.)
                            Don't know if that is still a problem with 2015.

                            404 Not Found

                            favicon

                            (sketchucation.com)

                            1 Reply Last reply
                            Reply Quote 0
                            • D
                              driven
                              last edited by

                              @brewsky said:

                              Another question, how did you disable the right-click / context menu in the webdialog?
                              Would be nice to temporarily enable "view source"...

                              jQuery UI blocks the right click menu...

                              on a mac you can either right click into an input box, or try and do it before the page loads...

                              BTW: you can easily view the time lags in a webdialog by simply adding a gif to a page, as SU works harder it will slow, stop, restart, it's even more noticeable if you use a css3 loader that runs a text animation...

                              john

                              learn from the mistakes of others, you may not live long enough to make them all yourself...

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

                                The right click blocking is done explicitly in ui.js file.

                                Hi

                                1 Reply Last reply
                                Reply Quote 0
                                • brewskyB
                                  brewsky
                                  last edited by

                                  @jolran said:

                                  It can be problematic to do a progressbar to webdialog. Due to the "freeze" that happends when ruby calculates.

                                  Thanks for pointing this out. Might be better to let this rest until I really need it 😉
                                  One positive thing might be that the progressbar would be for while I wait for a server to process my model so I don't think ruby has to work hard in the background.

                                  Sketchup BIM-Tools - http://sketchucation.com/forums/viewtopic.php?p=299107

                                  1 Reply Last reply
                                  Reply Quote 0
                                  • brewskyB
                                    brewsky
                                    last edited by

                                    @jim said:

                                    The right click blocking is done explicitly in ui.js file.

                                    Thanks! Found it 😄

                                    Sketchup BIM-Tools - http://sketchucation.com/forums/viewtopic.php?p=299107

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

                                      @unknownuser said:

                                      Thanks for pointing this out. Might be better to let this rest until I really need it 😉
                                      One positive thing might be that the progressbar would be for while I wait for a server to process my model so I don't think ruby has to work hard in the background.

                                      Ah, you might be ok then if it's not coming from Ruby.

                                      And (se above Drivens post) I remember now. Indeed Driven has showed me some cure for a progressbar. So it's doable.

                                      Although a progressbar might not be the most important aspect of your plugin 😉 😄

                                      1 Reply Last reply
                                      Reply Quote 0
                                      • D
                                        driven
                                        last edited by

                                        I think @jolran refers to this one?the dlg is request the draw and then the undo...

                                        I added in the spin just to show it wasn't blocking...

                                        you can draw as well, but that ruins the undo's in this demo...

                                        john

                                        learn from the mistakes of others, you may not live long enough to make them all yourself...

                                        1 Reply Last reply
                                        Reply Quote 0
                                        • P
                                          pgarmyn
                                          last edited by

                                          @driven said:

                                          I think @jolran refers to this one?[attachment=0:19ejklyu]<!-- ia0 -->wdlg_counter.gif<!-- ia0 -->[/attachment:19ejklyu]

                                          I added in the spin just to show it wasn't blocking...

                                          you can draw as well, but that ruins the undo's in this demo...

                                          john

                                          Does it also work in Windows?
                                          In my experience, this only works on mac.

                                          1 Reply Last reply
                                          Reply Quote 0
                                          • D
                                            driven
                                            last edited by

                                            @pgarmyn said:

                                            Does it also work in Windows?
                                            In my experience, this only works on mac.

                                            Did I send you this early 'type-matic' test?
                                            at first it was mac only...
                                            Jorlan added the meta tags and had it working on SU v8 on Windows...
                                            I then built a few different versions that added the cubes and that ran for him as well...
                                            The removal of geometry in the gif is untested on a PC, but should also work...
                                            The code could be better, but it just playing around...

                                            Try it, adjusting 'setTimeout' to allow time to draw/navigate while it continues running...

                                               type_this = " " + "This text should be typed one char at a time by ruby." + " "
                                               @type = type_this.scan(/./)
                                               @text = ""
                                            
                                               @dlg = UI;;WebDialog.new()
                                               @dlg.set_size(500,100)
                                               @dlg.show_modal
                                            
                                                 @html =  %Q(
                                                    <!DOCTYPE html>
                                                    <html>
                                                    <head>
                                                       <meta http-equiv="content-type" content="charset=UTF-8" />
                                                       <meta http-equiv="MSThemeCompatible" content="Yes" />
                                                       <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
                                                       <style>span {height;100%; width;10px; text-align;center;background-color;blue;color;white;}</style>
                                                    </head>
                                                    <body>
                                                       <script>
                                                             setTimeout(function(){window.location='skp;auto2ruby';}, 200)
                                                       </script>
                                                      </body>
                                                    </html>
                                                   )
                                            
                                              def span(n)
                                                %Q[<span>#{n}</span>]
                                              end
                                               def do_this
                                                 if not (@text.length) >= (@type.length)
                                                   n = @type[(@text.length+1)]
                                                   n = n.sub(/\s/, "\u00A0" ) if n == /\s/
                                                   @text << n.to_s
                                                   @html << span(n)
                                                   @dlg.set_html(@html) if not (@text.length) == (@type.length-1)
                                                 else
                                                   puts "shit happens"
                                                 end
                                               end
                                            
                                               @dlg.add_action_callback("auto2ruby") {|d,params|
                                                   do_this
                                                   }
                                            
                                               @dlg.set_html(@html)
                                            

                                            john

                                            learn from the mistakes of others, you may not live long enough to make them all yourself...

                                            1 Reply Last reply
                                            Reply Quote 0

                                            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                            With your input, this post could be even better 💗

                                            Register Login
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 4 / 4
                                            • First post
                                              Last post
                                            Buy SketchPlus
                                            Buy SUbD
                                            Buy WrapR
                                            Buy eBook
                                            Buy Modelur
                                            Buy Vertex Tools
                                            Buy SketchCuisine
                                            Buy FormFonts

                                            Advertisement