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

    Need testers for my Ruby Code Editor

    Scheduled Pinned Locked Moved Developers' Forum
    19 Posts 9 Posters 533 Views 9 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.
    • Rich O BrienR Offline
      Rich O Brien Moderator
      last edited by

      @unknownuser said:

      can you draw with this or am i just lost on the forums again?

      You can draw with this but you need to speak Ruby...

      ...and yes you've fallen into the wrong forum again....

      Download the free D'oh Book for SketchUp 📖

      1 Reply Last reply Reply Quote 0
      • D Offline
        dacastror
        last edited by

        this console is wonderful that good to continue to improve
        for now I just watch a possible error in the syntax highlighting when I write something like this;

        n = 100
        periodos = 20
        c = Math;;PI*periodos/n
        ve=[]; ve_inv=[]; vectors=[]; vec_invert=[]
        for j in 0..n
           Math.sin(c*j)
        end
        

        (google translator)

        1 Reply Last reply Reply Quote 0
        • alexschreyerA Offline
          alexschreyer Extension Creator
          last edited by

          Hi All,

          Thanks so much for the feedback! It's greatly appreciated. Some comments:

          @dacastror said:

          I just watch a possible error in the syntax highlighting

          I know about that quirk. It goes away if you leave more spaces. Try:

          c = Math::PI * periodos / n

          instead of

          c = Math::PI*periodos/n

          @unknownuser said:

          can you draw with this or am i just lost on the forums again?

          Rich is right... code away!!!

          @trogluddite said:

          The only thing I think I'd miss is the ability to search the code to find "that" method, where I know that a bug I just noticed is snuggled!
          I also get a slight graphical glitch with the output pane at the bottom - intermittent white lines when scrolling the display that don't line up with the text.

          Keep working with it and let me know what you think. I have written the Sketchfab plugin on it and I find it now much easier than external editors. The only caveat is that I can't edit this plugin in the editor or things go bonkers...

          Search is actually implemented nicely in CodeMirror. I just have to expose that in the UI. Goes on the wishlist.

          Yep, I noticed the lines in the results, too. I only get them when I scroll up. Have to figure out what it is.

          @sdmitch said:

          ...and was constantly mistakenly hitting the tab key to indent lines so it will be nice not having to add spaces.

          The Tab and Shift-Tab work like a charm. You can even set your preferences to TABs (of varying width) or spaces.

          Cheers,
          Alex

          Author of "Architectural Design with SketchUp":
          http://sketchupfordesign.com/

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

            👍

            Much smother interface!

            So far, so good. Only 1 thing noticed. A CSS thing. The quit button collapses when minimizing the window horisontal.
            I'm on IE 9.

            1 Reply Last reply Reply Quote 0
            • alexschreyerA Offline
              alexschreyer Extension Creator
              last edited by

              @jolran said:

              The quit button collapses when minimizing the window horisontal.

              I thought I fixed that in v.3.1... Could you re-download and install and see if it still happens?

              Cheers,
              Alex

              Author of "Architectural Design with SketchUp":
              http://sketchupfordesign.com/

              1 Reply Last reply Reply Quote 0
              • alexschreyerA Offline
                alexschreyer Extension Creator
                last edited by

                Could anyone with a Mac check this, too, please... I did some Mac checks but I develop on Windows.

                Cheers,
                Alex

                Author of "Architectural Design with SketchUp":
                http://sketchupfordesign.com/

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

                  @alexschreyer said:

                  Could anyone with a Mac check this, too, please... I did some Mac checks but I develop on Windows.

                  Cheers,
                  Alex

                  Pretty nice, overall! But...

                  I tried it out on Joe Zeh's dovetailed_components.rb, and found that the syntax highlighting is sensitive to spaces in statements. For example,

                  @dadoDelta = delta * (1.0 - dadoDepth/width)

                  causes the remainder of the file to be displayed all olive green, but if I put a space after the /, it fixes things. Seems like there is a parsing bug?

                  Steve

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

                    @slbaumgartner said:

                    @alexschreyer said:

                    Could anyone with a Mac check this, too, please... I did some Mac checks but I develop on Windows.

                    Cheers,
                    Alex

                    Pretty nice, overall! But...

                    I tried it out on Joe Zeh's dovetailed_components.rb, and found that the syntax highlighting is sensitive to spaces in statements. For example,

                    @dadoDelta = delta * (1.0 - dadoDepth/width)

                    causes the remainder of the file to be displayed all olive green, but if I put a space after the /, it fixes things. Seems like there is a parsing bug?

                    Steve

                    the same thing happens unless there is a space after <<

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

                      @alexschreyer said:

                      Could anyone with a Mac check this, too, please... I did some Mac checks but I develop on Windows.

                      Cheers,
                      Alex

                      More tidbits:

                      The options window isn't sized to the contents and isn't scrollable. I had to stretch it out before I could see all the items.

                      On a Mac the editor keeps disappearing behind other windows. I'd like it better if it were modal (which, on a Mac, just keeps it on top, it doesn't block events to other windows).

                      The tooltips that say "Alt-..." are wrong on Mac. They should be "Command-..." instead. For instance, "Alt-S" inserts a German Eszett!

                      Command-S gets "Save As", even when you have been editing an existing file.

                      The snippet Mac or PC? has syntax errors. Presumably you meant to have :windows and :mac as symbols, but there is a space between the : and the name.

                      Is there a find or find+replace capability? If so, what triggers it? No standard key press seems to get there. Seems like a pretty basic editor function. Undo would also be very helpful, especially if you make a mess by inserting a snippet at the wrong place!

                      The syntax highlighter picks out SketchUp keywords out of context and without regard to capitalization. So, for example, if you name a variable "entities", it is highlighted as a keyword. Should only happen for "Entities" and "xxx.entities" (without getting into whether it is a good idea to name variables the same as keywords).

                      I was confused by the "explore current selection" and "List object's attributes" buttons until I discovered that they pertain to a selected object in SketchUp, not in the editor!

                      1 Reply Last reply Reply Quote 0
                      • alexschreyerA Offline
                        alexschreyer Extension Creator
                        last edited by

                        @slbaumgartner said:

                        More tidbits

                        Thanks so much for the thorough checks. Some comments:

                        • The code highlighter is indeed quite space sensitive. That I believe is just how CodeMirror works. I'll look into it, but I don't think I can change that.

                        • Good catch with the Command key. Wasn't even thinking of that...

                        • I'll add show_modal on the mac. Makes perfect sense...

                        • I left the save as feature in there to save me from needing another button and to have a fail-safe. Might be good to add a simple save, though.

                        • I'll update the snippet. It's actually updated in the code

                        • The selection explorer buttons need more descriptive icons, I think. I'll look into that.

                        • The class/method highlighting is indeed a bit brute-force-ish right now. If anyone wants to work with me on making that more reliable, then I'd very much appreciate that. For example, methods should only show up with the respective classes. All of that is implementable in CodeMirror. It just needs tome TLC...

                        Cheers,
                        Alex

                        Author of "Architectural Design with SketchUp":
                        http://sketchupfordesign.com/

                        1 Reply Last reply Reply Quote 0
                        • alexschreyerA Offline
                          alexschreyer Extension Creator
                          last edited by

                          Forgot to mention:

                          • Yes to Find/Replace. Next version, though...
                          • Undo is in there. Just make sure the editor window is highlighted when you do Command-Z

                          Cheers,
                          Alex

                          Author of "Architectural Design with SketchUp":
                          http://sketchupfordesign.com/

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

                            @alexschreyer said:

                            Forgot to mention:

                            • Yes to Find/Replace. Next version, though...
                            • Undo is in there. Just make sure the editor window is highlighted when you do Command-Z

                            Cheers,
                            Alex

                            I find that Command-Z works only for text you type yourself, not for snippets inserted from the menu. You can highlight a section of code and hit delete, though.

                            Steve

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

                              STill haven't been able to play around with this. Going away for the weekend - so won't be able to do anything until at least next week. 😕

                              Looking mighty good though. 😄

                              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
                                Trogluddite
                                last edited by

                                Well, I've now been thoroughly immersed in my latest Ruby projects for the last couple of weekends, and a plugin or two for work too, and...

                                ...I now wouldn't be without this plugin - it has become truly indispensable.

                                I'm still running Notepad++ for the bulk of 'big' coding, but when it comes to testing and de-bugging, this is the bee's knees. The 'undo last coding cock-up' button alone is a godsend, it just makes it so fast to restore a test rig, tweak a line of code, and try again. It's also great for trying out new API methods and generally poking around inside a model.

                                A couple of observations and suggestions...

                                • The cursor can become a tad hard to spot if next to a highlighted bracket, just needs a slightly more subtle highlight.
                                • Typing can get a bit slow with code of 100's of lines, but I guess that is down to CodeMirror, I've seen other editors based around it that behave similarly.
                                • It would be really nice if it could have the "file on disk has changed - update?" feature similar to Notepad++; that would save a lot of cutting and pasting when using an external editor in parallel - and as a reminder to be very careful when editing the same file in two different places!

                                Thankyou again for sharing this with us - as well as getting the routine coding jobs done, the 'live interaction' with SU is really helping me to learn Ruby and the API so much faster.

                                1 Reply Last reply Reply Quote 0
                                • alexschreyerA Offline
                                  alexschreyer Extension Creator
                                  last edited by

                                  @trogluddite said:

                                  ...when it comes to testing and de-bugging, this is the bee's knees.

                                  Thanks for your comments! Glad to hear you like the editor.

                                  I'll look into your suggestions but - as you said - the display just naturally becomes slower with 100's of lines of code simply because it renders everything in JavaScript. Not sure if #3 is already implemented in CodeMirror somehow... have to look.

                                  Cheers,
                                  Alex

                                  Author of "Architectural Design with SketchUp":
                                  http://sketchupfordesign.com/

                                  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