The example for Set.include? http://code.google.com/apis/sketchup/do ... ml#include? uses a different method name:
- Code: Select all
status = set.contains? object
New API doc - typos and questionsNew API doc - typos and questionsI'm looking at the new API docs and I noted an inconsistency in the documentation. I thought we might collect them here as they're discovered and hopefully we'll see them addressed.
The example for Set.include? http://code.google.com/apis/sketchup/do ... ml#include? uses a different method name:
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
Re: New API doc - typos and questionsVector3d.linear_combination
http://code.google.com/apis/sketchup/do ... ombination
What's the two extra arguments? Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
Re: New API doc - typos and questionsLast edited by Chris Fullmer on Fri Feb 27, 2009 12:05 am, edited 1 time in total.
Re: New API doc - typos and questionsI'm pretty certain the material observer is completely wrong. The base class defines all but two methods incorrectly, and doesn't appear to use them all that correctly either.
Re: New API doc - typos and questionsHello everyone,
Yes, we just launched some new docs for the Ruby API on the code site. These are the most accurate and up to date documentation we have ever had, and we hope that they are useful. (That being said, there is obviously still room for improvement.) Your help in finding typos/missing details are very welcome! What isn't evident just from glancing at the site is that we have a new process internally for maintaining and updating the docs that will help us be more responsive to changes from here on out. (ThomThom, I've already pulled in your questions/corrections and will be pushing them out soon.) By the way, HUGE thanks must be given to the people who worked on the wiki-enabled docs over the last couple of years. We integrated those community changes, and I'm currently doing a review to make sure that any changes from the last couple months are reflected in the new docs. Thank you! (The wiki docs are still up for now, and I will continue to monitor them for fixes.) http://code.google.com/apis/sketchup/ Keep the corrections coming!
Re: New API doc - typos and questions
Hey Chris (or Jim), I don't think that's a standard method... (am I wrong?) I went to go add it to the docs, but I can't find it. Maybe it's part of some script out there? Let me know,
Re: New API doc - typos and questionsScott, I have question. This is coming from me, and I have little understanding of this documentation stuff. But is the SU Ruby code documented in a similar way to rDoc or something? Is it set up so that you guys can change the documentation, then run some rDoc like command on it and it automatically updates the website? Does that make sense?
Also, I like the tag that shows what version of SU each method is compatible with Chris Last edited by Chris Fullmer on Fri Feb 27, 2009 12:58 am, edited 1 time in total.
Re: New API doc - typos and questions[ruby newb]i thought the face.get_glued_instances method was added with the latest M1 release?[/ruby newb]
Re: New API doc - typos and questions
Yes. We now generate the docs directly from source code comments, using something like rdoc. So we make a change to the source. It gets code reviewed and checked in. Then we push a button and it all goes onto the new site. So... there are likely some "autogeneration" bugs that we will all discover over the coming weeks. Not to mention plain old human error. Which, by the way, is why the get_glued_instances method isn't up there. Remus is right, that was added with M1 and I am a bonehead. Fix coming! Thx,
Re: New API doc - typos and questions
Attached script demonstrates using the MaterialsObserver as documented. The base class may not have all of the methods correctly implemented, but SketchUp will call them. As the docs say, the onMaterialRemoveAll does not fire in a particularly useful way. Let me know if you find anything else! Thanks! Please, register (free) to access all the attachments on the forums.
Re: New API doc - typos and questionsI guess my blanket comments about the MaterialObserver were not entirely accurate
The documentation on onMaterialChange is a little inadequate. It says it is called whenever a material is altered, but it doesn't get called when you change size or color, just texture.
Re: New API doc - typos and questions
Scott, I got the information from the Release Notes page.
Re: New API doc - typos and questionsNoticed in another thread that there seem to be some deviation related to send_action. viewtopic.php?f=180&t=16751&start=15#p135201
Seems to be a couple more as well. Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
Re: New API doc - typos and questions
Thanks Scott!
Re: New API doc - typos and questionsUnder the UI Classes section:
Tool, Toolbar and Webdialog all links to the Array class: http://code.google.com/apis/sketchup/do ... array.html Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
Re: New API doc - typos and questionsA bunch of fixes got pushed on Friday. Thanks again to folks who found typos, both from this thread and from the wiki documentation. Keep 'em coming!
I'm on vacation for the next week, so don't think I'm ignoring anyone if I don't reply for a few days. Thanks, guys!
Re: New API doc - typos and questionsThanks Scott.
I'm still puzzled about the six arguments for Vector3d.linear_combination.
How does this really work? Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
Re: New API doc - typos and questionsNot to mention that the example at the bottom of the method does not actually include the method of linear combination. It only shows:
Re: New API doc - typos and questionsPolygonMesh.add_polygon
The example shows how to use the add_point method.
Re: New API doc - typos and questionsWish we had red pens to scribble on the docs.
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
Re: New API doc - typos and questions
Great idea, really. I'm sure there are browser plugins that allow social sharing of sticky notes, or comments on web pages.
Re: New API doc - typos and questionsOh, yea... at least for Firefox. I mean to remember something like that.
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
Re: New API doc - typos and questionsCould this be something? https://addons.mozilla.org/en-US/firefox/addon/2792
Anyone tried it? Or got better solutions? Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
Re: New API doc - typos and questionsPoint3d.project_to_plane:
http://code.google.com/apis/sketchup/do ... ct_to_line Shows the wrong example code (uses from project to line). and I know I gave the link for project_to_line. Its so you can see both methods simultaneously and see the error better. Thanks! Chris
Re: New API doc - typos and questionsSo far I am really truly enjoying the new docs. They feel much better, thanks for the efforts to get them to where they are. I'm also excited that changes might be able to happen faster now too, that is great.
I'm noticing that sometimes in the methods list, when I click on a method, it takes me to the class index for that method. Other times it willtake me directly to the entry for that method within the class. I prefer the latter. But I don't know why sometimes it does one thing and sometimes it does another, Chris
Re: New API doc - typos and questionshttp://code.google.com/intl/nb/apis/ske ... l#inputbox
It doesn't mention how to allow drop-down options by using a third array with strings separating each option with a pipe | character. Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
Re: New API doc - typos and questionsYou can do a dropdown box?
Re: New API doc - typos and questionsUI.inputbox ['Hello'], ['World'], ['Mars|Pluto|World|Monkeys'], 'Title'
"Global Material Changer" and "Component Spray" uses it. That's the only way I knew it was possible. Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
Re: New API doc - typos and questions
Sure, and I made this to ease the pain a little: http://sketchuptips.blogspot.com/2008/0 ... class.html
Re: New API doc - typos and questionsNice one Jim.
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
SketchUcation One-Liner AdvertsNeed Authorised SketchUp Training by experts in various disciplines? Check out our Training details.
|