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

    New API doc - typos and questions

    Scheduled Pinned Locked Moved Developers' Forum
    370 Posts 35 Posters 256.4k Views 35 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.
    • snicoloS Offline
      snicolo
      last edited by

      Guys, thanks for the heads up, you can blame this one on ScottL 🀣 but also he was the one that corrected it, so I guess he is even.

      Should be fixed shortly.
      Simone.

      Simone Nicolo
      QA Manager
      http://www.sketchup.com

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

        Just saw the updates. πŸ˜„
        Scott even sneaked in a UTM class - which apparently has been there since SU6??

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

          WOW! no replies for almost a year! Things must really have improved on the SketchUp API side of things .......just kidding!
          I noticed Google is buying Motorola or 12.5 Billion today http://www.telegraph.co.uk/technology/google/8702132/Google-buys-Motorola-Mobility-in-12.5bn-deal.html

          Looks like they ran out of money once again, still can't afford to hire someone to get rid of the typos in the API. 😞 😞 😞

          [my plugins](http://thingsvirtual.blogspot.ca/)
          tomot

          1 Reply Last reply Reply Quote 0
          • scottliningerS Offline
            scottlininger
            last edited by

            @tomot said:

            WOW! no replies for almost a year!

            Hey Tomot,

            I'm still listening. πŸ˜„

            We have been making incremental fixes now and then. I'll take this ping as a useful reminder to check the thread for things we still need to do...

            • Scott Lininger
              SketchUp Software Engineer
              Have you visited the Ruby API Docs?
            1 Reply Last reply Reply Quote 0
            • thomthomT Offline
              thomthom
              last edited by

              What would your preferred channel for API documentation issues be? This thread or the comment pages on the API pages?

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

              1 Reply Last reply Reply Quote 0
              • scottliningerS Offline
                scottlininger
                last edited by

                @thomthom said:

                What would your preferred channel for API documentation issues be? This thread or the comment pages on the API pages?

                Reporting issues via the code.google.com comments tool (which you can find at the bottom of every documentation page) is better, because it warns other users right on the page.

                • Scott Lininger
                  SketchUp Software Engineer
                  Have you visited the Ruby API Docs?
                1 Reply Last reply Reply Quote 0
                • Dan RathbunD Offline
                  Dan Rathbun
                  last edited by

                  Yea.. but the formatting sucks!

                  I'm not here much anymore.

                  1 Reply Last reply Reply Quote 0
                  • scottliningerS Offline
                    scottlininger
                    last edited by

                    @dan rathbun said:

                    Yea.. but the formatting sucks!

                    ...of course if you prefer to post nicely formatted stuff to this thread, that's cool, too! πŸ˜„

                    • Scott Lininger
                      SketchUp Software Engineer
                      Have you visited the Ruby API Docs?
                    1 Reply Last reply Reply Quote 0
                    • thomthomT Offline
                      thomthom
                      last edited by

                      @unknownuser said:

                      @dan rathbun said:

                      Yea.. but the formatting sucks!

                      ...of course if you prefer to post nicely formatted stuff to this thread, that's cool, too! πŸ˜„

                      And there is some other wee issues, it quickly wraps the comments into pages, after 10 pages. And it's not always obvious.

                      The biggest problem is if you have your browser set to prefer a language over English, then you'll be presented with an empty comment page. (I think the comments are all gone.) Every time I have to install a new system, or use another computer here in Norway, and the preferred language is set to Norwegian I cannot see any of the comments.
                      I have to rearrange the preferred languages to English before I get the comments because the API doc pages forcefully redirect me to a so-called localised version for my language, even though everything is still in English.
                      So I can imagine there's many people not aware of the comments at the bottom of the API pages.

                      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

                        It would be better to have INLINE (expandable) comment block beneath each method. I know you guys can do this because you did it on the Release notes pages.

                        Also expandable sample code block under each method.

                        Basically it needs to be more like a wiki page. Jim experimented a bit with this on his code site page.

                        I'm not here much anymore.

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

                          @unknownuser said:

                          @dan rathbun said:

                          Yea.. but the formatting sucks!

                          ...of course if you prefer to post nicely formatted stuff to this thread, that's cool, too! πŸ˜„

                          HOW! ??

                          I don't think it takes markup... or does it?
                          If so. What kind? git markup? bbCode? what?

                          I'm not here much anymore.

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

                            @Scott.. on the subject of the API... see this thread:
                            http://groups.google.com/group/sketchupruby/browse_thread/thread/112f655ea6067034/2c575f2d2113a894#2c575f2d2113a894

                            Wouldn't it be better to have a DC playsound() click function appended to the the DC class?

                            I'm not here much anymore.

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

                              @dan rathbun said:

                              It would be better to have INLINE (expandable) comment block beneath each method. I know you guys can do this because you did it on the Release notes pages.

                              ? Inline comment on the release notes?

                              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:

                                @dan rathbun said:

                                It would be better to have INLINE (expandable) comment block beneath each method. I know you guys can do this because you did it on the Release notes pages.

                                ? Inline comment on the release notes?

                                Yes, instead of random (newest first,) ordered comments at the page bottom...

                                ... a poster would click an add note button WITHIN each method section. The note would be wrapped in a collapsed DIV or SPAN that is INLINE with the method section.

                                At the bottom of each method would be a "plus" button that has a title "Read Notes (current_num)"

                                If the user wished to get more info on that SPECIFIC method, they can click the "+" button, and the collapsed DIV would expand.

                                The same could be true for Community Contributed Sample Code Snippets. Each method could have a collapsed "snippets" section, that works in the same manner.

                                For an example of what I'm talking about.. see the Sketchup Release Notes page.

                                I'm not here much anymore.

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

                                  @dan rathbun said:

                                  The same could be true for Community Contributed Sample Code Snippets. Each method could have a collapsed "snippets" section, that works in the same manner.

                                  For an example of what I'm talking about.. see the Sketchup Release Notes page.

                                  Oh, I thought you meant that the release notes had inline comments.

                                  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

                                    Since we are on this subject of API page format and features....

                                    The API is still lacking:

                                    • Fully qualified class names

                                    The organization of the docs misleads readers in some cases. For instance they would think that the PickHelper and Menu classes (as two examples,) are within the UI namespace. But they are not. They are within the Sketchup namespace.
                                    Another example is Vertex, the Docs mislead people into thinking it's Geom::Vertex, when it's really Sketchup::Vertex

                                    • Ancestors: The mixin modules are not displayed for each class.

                                    It would help greatly if the output of .ancestors().reject{|a|a==self} was displayed for each class and module in the API.

                                    # Class method
                                    class Module
                                      def lineage()
                                        ancestors.reject{|a|a==self}
                                      end
                                      def self.lineage()
                                        ancestors.reject{|a|a==self}
                                      end
                                    end
                                    
                                    • Constants

                                    A constants section is needed for each class and module, to list any constants defined within that namespace.

                                    • Methods

                                    • It's not clear (for the API classes,) what are class methods, and what are instance methods. (I suppose we assume they are instance methods.)* The access is not specified. (Again we assume they are all public, I suppose.)

                                    I'm not here much anymore.

                                    1 Reply Last reply Reply Quote 0
                                    • scottliningerS Offline
                                      scottlininger
                                      last edited by

                                      @dan rathbun said:

                                      @unknownuser said:

                                      @dan rathbun said:

                                      Yea.. but the formatting sucks!

                                      ...of course if you prefer to post nicely formatted stuff to this thread, that's cool, too! πŸ˜„

                                      HOW! ??

                                      I don't think it takes markup... or does it?
                                      If so. What kind? git markup? bbCode? what?

                                      The comments don't accept markup. I'm just saying that if you have a comment that needs code formatting or something, you can post to this Sketchucation thread.

                                      Thanks for the extra feedback, guys. I've blocked out some time to catch up on the comments.

                                      Cheers,

                                      • Scott Lininger
                                        SketchUp Software Engineer
                                        Have you visited the Ruby API Docs?
                                      1 Reply Last reply Reply Quote 0
                                      • T Offline
                                        tomot
                                        last edited by

                                        I don't think Scott really gets it!
                                        The entire API has been written by someone that passed provisionally in middle school. Then went home and proudly displayed his/her proud parents, his/her proficiency in English.
                                        We used to give a (PP} Provisional Pass to guest students, our government had invited at tax payers expense to receive an education in our country, before they return back to their country of origin. In some cases it was an insult to give our student a PP in line with the PP definition. We also gave most of our guest students a PP, we called it a Political Pass.

                                        Picking at random:

                                        Group.split
                                        
                                            The split method is used to compute the boolean split (map overlay) of the two groups representing manifold solid volumes (this ^ arg). If the specified objects (this and arg) do not represent manifold volumes, this method fails.
                                        
                                        

                                        Sorry! but I don't know what this entire CODE statement means:

                                        what is a boolean split ? (this should be underlined to a definition link)
                                        what is a manifold solid? (this should be underlined to a definition link)
                                        what does this mean "If the specified objects (this and arg)"
                                        where is the (map overlay)?

                                        Speaking of overlays: the API contains not one 3d image ................" a picture is worth a thousand words"
                                        Many of the coded API examples, will give errors when entered into the Ruby console.
                                        I think there is work major work still to be done!

                                        Speaking of Work to be done:

                                        There is handful of users at this forum that would probably love to make correction to the API.
                                        The time it took for them to make comments could have been more productively used to corrected the API.
                                        Why not give them access to the API server and allow them to make corrections directly?

                                        cheers!

                                        [my plugins](http://thingsvirtual.blogspot.ca/)
                                        tomot

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

                                          @tomot said:

                                          what does this mean "If the specified objects (this and arg)"

                                          We've already noted that these terms are confusing. The keyword this is from Javascript, and means the receiver. (It's not a Ruby keyword. It just shows the writer had a brain-fart and his web programming mind spit out the wrong word.)

                                          Whenever you see this in the API docs, you should replace it with the Ruby keyword self, which is the current instance object, (the object on the left of the 'dot', in this case a group object.) The argument (nicked named "arg") is also a group object.

                                          .. so to paraphrase:

                                          self_group.split( arg_group )

                                          I'm not here much anymore.

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

                                            As for the other 3D geometric terms, you'll just have to open another browser to wikipedia, and paste them in.

                                            The API docs are a technical reference, not a tutorial. It might be nice to have definition links, but we'd rather the errors were corrected first.

                                            I'm sure you can find a browser plugin that lets you highlight text, then right-click and have a wiki lookup link on the popup menu.

                                            I'm using Chrome now, and when I hilight "manifold solid" in your post, and right-click, an option appears on the context menu that says: "Search Google for 'manifold solid'"
                                            It's likely I can find a Chrome extension, that will search Wikipedia, also.

                                            I'm not here much anymore.

                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 14
                                            • 15
                                            • 16
                                            • 17
                                            • 18
                                            • 19
                                            • 16 / 19
                                            • First post
                                              Last post
                                            Buy SketchPlus
                                            Buy SUbD
                                            Buy WrapR
                                            Buy eBook
                                            Buy Modelur
                                            Buy Vertex Tools
                                            Buy SketchCuisine
                                            Buy FormFonts

                                            Advertisement