This bungalow-style building is located on the highway in a small hamlet outside Middletown, NY. It might have been a store with owner's residence on the second floor.
It definitely looks as if it were designed and built by the owner.
Scotchtown (near Middletown), NY, c. 1920.
Chapter 17—Reference Resources
Begin by creating a folder where you'll store SketchUp stuff, if you haven't already made one. I'm using
c:/models. You might prefer
/home/your_name/desktop/sketchup_stuff. Under that folder, create a subfolder named "doc" or "reference" or whatever.
Download the Tutorial Companion Package for this chapter. Extract it into your "doc" or other subfolder. There's a lot of stuff here! The most extensive (by file count) group is my cover for the Google API docs.
I've seldom heard a dumber argument. Charts (stock market and other financial charts, not navigation charts) are a way of showing numeric series visually, to aid sighted persons. Imagine this argument: "Charts are for sighted persons. They are not helpful for the visually impaired. We should not have charts." (Navigation charts discriminate against visually impaired pilots. Therefore we should not have navigation charts?)
How about, "Google SketchUp is a way to display 3D models for sighted persons. It is not for the visually impaired. We should not have SketchUp." Dumb, dumber or dumbest? You choose.
Frame-based websites are a wonderful navigation vehicle for sighted persons. Google's API docs would be better if they had been done with frames. I redid them with frames. You judge the results.
Open a browser, but not your everyday browser. I use Google Chrome for my reference browser. Then File/Open (in Chrome, press Ctrl+O) your
/models/doc/api-doc.html. (Choose your folder, not mine.) You'll see something like this:
The default opening implies a click on the "All" topic (frame across the top). In the top frame, click the "Geom" link. You'll see this:
Individual classes are shown in the left-side frame. The main frame is still showing the "All" page. Click "Transformation" in the left frame and you get here:
You may have noticed a slight delay in loading this one. This is actual Google doc from Google's servers. It's not as quick as loading HTML from your local disk. When you click "rotation", you're back to full speed as you are looking down the loaded page for the "#rotation" link.
If you knew that the Transformation class was in the Geom category, you could have got here with one less click, using the All page:
And with that, I will withdraw from the "explaining the Sketchup Ruby API" business. You are on your own. But first, a hint: it is not easy to get started with the API. Posting a basic question in the SketchUcation Developer's Forum is highly, highly recommended! "Hi, I'm looking to write my first tool. What classes do I need to use? Martin told me to ask here."
Actually, don't post that question. Google your question first. You'll find that one already answered. I posted the question (among hundreds of others).
send_action()method. That will lead here:
This list (it's four times longer than the image shows) is unsorted and substantially unhelpful. I've organized it. You can pick it from the list of App Level classes in the left frame, or from the All page in the main frame.
From this sorted list you can easily choose, for example, a tool if you know the tool's name.
'selectMoveTool:' will do just what the name suggests. (And, on a less cheerful note, you can easily see that there is no support here for File menu actions.)
For Ruby I prefer ruby-doc.org. It's main menu is this:
You can see that the ruby-doc people like frames, too. The top-left frame lists the source code files. This is useful if you are truly Ruby hardcore, want the exact details and speak fluent C, which I doubt describes many of us.
The middle-top panel is the one I start in. It lists all the Ruby classes. Need to throw together a Ruby regular expression? Click Regexp. That gets to the class doc, including an all-too-brief explanation of what the class is, a list of methods, another of constants and documentation of each method.
The right frame lists all the methods, alphabetically. I don't find this particularly helpful. In the case of Regexp, for instance, clicking "match" within the Regexp class gets to the regular expression match method reasonably quickly. Scrolling the method list to "match" gives you lots of choices, and most are irrelevant to Regexp's match method.
If you are new to Ruby, this is probably too deep. Your assignment (just when you thought you were going to breeze through this short chapter!) is to Google "Ruby tutorial" and find one that is targeted at your level.
My choice is at ruby-doc.org/core/.
The rest of this chapter is for those who want to go on to WebDialog work, in which fancy user interfaces combine web pages with Ruby. If you'd like to spend some time with all you've learned so far (or you can't wait to program that wicked roller coaster ride) this would be a good time to a) close this chapter and this tutorial, or b) return to the Table of Contents to find your favorite topic. This material will wait patiently for your return.
for ... in loop doesn't work as you want you can find it quickly in the left-hand column:
Mine is at www.w3schools.com/js/.
2+2in the input window returns
4in the output window. In the screenshot below, please explain the last result:
To open this one, open
js_console.html in your
Oh yes, the last result.
( NaN == NaN ) is false.
NaN you use the
That is at htmlhelp.com/reference/html40/alist.html. The other front door is the organizational list at htmlhelp.com/reference/html40/olist.html:
I know enough CSS to know that a single
border property can set size, style and color, but I use it infrequently enough to never remember the right order. I do remember that the wrong order will set absolutely nothing—the renderer will see the property value, say to itself "What's this?", give up and discard the thing.
One click here on "border" and I've got the exact information I need:
This lets you dress up your HTML with CSS styles, without ever troubling to learn the myriad properties and values. (Border styles can be dotted, dashed, solid, double, groove, ridge, etc. Are you going to remember even a few of them?)
Find this data at www.w3schools.com/css. Ask Google for a little help finding alternatives.
That's great. You found out what you needed to know about
PickHelper.test_point(). But the next time you come here, you will be looking for something else:
Geom::Transformation.new() has ten different sets of arguments, for example. It's important that you be able to get do the SketchUp Ruby API front door with a single click:
In the next chapter, we'll get on to HTML and CSS so you can do the slickest WebDialogs ever, providing the front ends for your ever-so-fabulous Ruby plugins. You'll be glad you have your reference browser set up.