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

    Something new for SU ruby one year after.???

    Scheduled Pinned Locked Moved Developers' Forum
    11 Posts 7 Posters 558 Views 7 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
      tonn
      last edited by

      I made this question at google forum, but it seems this forum is more active...
      (I keep on without understand which is the reason because official forums are not maintained properly by the owner)
      Ok, my question.... I tried a little SUruby a year ago. At that moment, I saw some flaws :

      • There is no IDE for develop the plugins.
      • There is no way of to write dialogs properly
      • There is no conection with Layout (as Dan said at a post)
        Is there a trick? Anybody knows the future of this?
        Is there any significant improvement at SU 8 (for ruby)?
        Thanks
      1 Reply Last reply Reply Quote 0
      • TIGT Online
        TIG Moderator
        last edited by

        @tonn said:

        I made this question at google forum, but it seems this forum is more active...
        (I keep on without understand which is the reason because official forums are not maintained properly by the owner)
        Ok, my question.... I tried a little SUruby a year ago. At that moment, I saw some flaws :

        • There is no IDE for develop the plugins.
        • There is no way of to write dialogs properly
        • There is no conection with Layout (as Dan said at a post)
          Is there a trick? Anybody knows the future of this?
          Is there any significant improvement at SU 8 (for ruby)?
          Thanks

        This is by far the most active forum - many of us are on other forums and work closely with Google on some issues too...
        To address your issues...

        • There are several web-console and Ruby testing tools on the www but mst of us get by with Notepad++ and snippet testing in the built-in Ruby Console.
        • The API's 'inputbox' writes simple dialogs, the API's 'webdialog' allows you to write dialogs as complex as you like but it does take some effort...
        • There is no API SUp connection with Layout - but there is obviously connection between them 'manually'.
        • v8 does have a few good new Ruby methods - mainly revolving around new 'solid'/'manifold' functions [mainly in Pro]...

        TIG

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

          @tonn said:

          Is there any significant improvement at SU 8 (for ruby)?

          The observers has been significantly enhanced. More stable and some new events that's more usable.
          http://www.thomthom.net/software/sketchup/observers/

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

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

            Thanks
            Humm. I don't know if I'm going to wait one more year so.
            Sincerely, I don't know what hidden reason can have google for not work on an simple IDE + Dialogs builder...

            @unknownuser said:

            There is no API SUp connection with Layout - but there is obviously connection between them 'manually'

            TIG... I dont understand you. I asked about the possibility of do something with layout from Ruby. If I remember well, Layout has no plugins isn't it?
            I think that LAYOUT would have to be integrated at SUp. It have not sense to have the model and the plots are not connected.
            A last question, I saw that posts are not ordered by date ?
            Thanks

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

              There are some posts that are made "sticky" so that they are always on the top of the post list. After the sticky posts and announcement posts, the rest are sorted by date.

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

              1 Reply Last reply Reply Quote 0
              • GaieusG Offline
                Gaieus
                last edited by

                @chris fullmer said:

                the rest are sorted by date.

                Read: sorted by date/time of the last post by default. But at the bottom of the topic list, there are different sorting tools as well.

                Gai...

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

                  @tonn said:

                  Sincerely, I don't know what hidden reason can have google for not work on an simple IDE + Dialogs builder...

                  "Hidden" reason?

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

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

                    @thomthom said:

                    @tonn said:

                    Sincerely, I don't know what hidden reason can have google for not work on an simple IDE + Dialogs builder...

                    "Hidden" reason?

                    He means "unknown" reason. (English is not his 1st language.)

                    Writing an IDE for embedded Ruby is difficult. Ruby runs in Sketchup's process, so during testing, if you crash Sketchup, you also would crash Ruby and likely the IDE as well.

                    I would like to have a dialog builder.. or use one of the MS VisualStudio Express products to design a dialog and export it (as an rc file?,) to a plugin that would read the design file, and output a Ruby script.
                    The problem is we need to write Win32 system call wrappers (including callbacks,) for this. (Perhaps an SKX::GUI module? As ThomThom and I were discussing in another topic, it may be smart to follow the object model that has been set in the MacRuby project, as Apple intends to replace MRI Ruby with MacRuby on future Macs.)

                    I'm not here much anymore.

                    1 Reply Last reply Reply Quote 0
                    • C Offline
                      Cleverbeans
                      last edited by

                      The main difficulty I see with a GUI builder is ensuring it's cross platform. Other CAD systems I've work with that provide this feature are using a prepackaged variant of Visual Studio which is Windows only. Creating a GUI builder from scratch is a non-trivial project and well outside the scope of the Sketchup development team so I would think something custom built for Sketchup to be highly unlikely. The only reasonable possibility I can think of is perhaps fitting into the QT framework since Ruby already has bindings and it's platform independent allowing development in QT designer. That or a community built solution, but I'm not confident our development community has the manpower for such a project. Having done some API work in Revit which comes with GUI building tools but which is so prohibitive in how it allows developers to interact with the application that it's nearly useless. It's a trade I'm happy to make. It's certainly not as strong as the AutoCAD API, however it's not entirely a fair comparison since AutoCAD has had decades longer to mature by comparison. Even then, I find the openness of Sketchup's API to be very refreshing in an industry which has historically committed itself to proprietary shenanigans.

                      Beyond that the only feature I'd like to see in an IDE is code completion for Sketchup Objects, but that is much lower on my wish list compared to say... fixing observers. I was also very disappointed to see solid operations restricted to Pro-only versions, which is presumably to prevent the community from writing replacement tools for the pro-only features related to solid manipulation. I would have preferred to see Sketchup differentiate itself by the quality of it's tools rather than artificial restrictions on the features provided as they did with dynamic components.

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

                        @cleverbeans said:

                        The main difficulty I see with a GUI builder is ensuring it's cross platform.

                        This is why I suggested using something that exists, and then can export a platform independant text file describing the dialog. I guess I boo-booed when I said rc file (which is a compiled file.) I really meant a res file, which is plain text.

                        I imagine a ruby script reading that file.. and writing out a ruby template either cross-platform (if possible,) or for OSX or Win32 (the user chooses an option.) Perhaps maybe even for WebDialog class? Anyway.. once the template is generated, the coder fills in the empty callback methods, etc. and plugs it into the rest of their plugin code.

                        I'm not here much anymore.

                        1 Reply Last reply Reply Quote 0
                        • C Offline
                          Cleverbeans
                          last edited by

                          What you're describing is exactly how the QT Framework works, it's cross platform, and the Ruby bindings already exist. It also enjoys the advantage of being open-source, although the QT Designer IDE is proprietary. So just as you can write and compile C# code for the .NET framework without Visual Studio, the task is greatly simplified with the native IDE.

                          GUI work is well outside my day to day development however, so I'm not sure if it could be made to work with the Sketchup API. I'll defer such decisions to those better qualified to make them. πŸ˜„

                          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