10 messages in com.googlegroups.sketchuprubyNone Re: ruby module and class access...
FromSent OnAttachments
calmze01 Jun 2008 10:12 
Todd Burch - Katy, Texas01 Jun 2008 14:37 
calmze01 Jun 2008 15:29 
Todd Burch - Katy, Texas01 Jun 2008 18:42 
calmze01 Jun 2008 20:26 
Todd Burch - Katy, Texas02 Jun 2008 05:03 
David02 Jun 2008 10:27 
Todd Burch - Katy, Texas02 Jun 2008 13:45 
calmze02 Jun 2008 16:26 
Todd Burch - Katy, Texas02 Jun 2008 19:18 
Subject:None Re: ruby module and class access using ::
From:calmze (cal@gmail.com)
Date:06/01/2008 03:29:04 PM
List:com.googlegroups.sketchupruby

Thanks Todd.

There is no documentation for scopes. The InputPoint doc does not state that it is within the Sketchup scope. As far as I know the only modules in the docs are Sketchup, Geom, and UI. Thus I assume everything is within one of those scopes.

Overall, the Sketchup API is poorly documented (and there are lots of errors).

Wow I didn't know that class access from modules was done with :: . All constants are called with :: so I suppose classes can be considered constants.

Thanks a bunch.

On Jun 1, 5:37 pm, "Todd Burch - Katy, Texas" <mr.t@gmail.com> wrote:

The :: operator is the "scope" operator, meaning the InputPoint class is within the scope of the "Sketchup" module.

Anything documented in the Sketchup Ruby API (well, most anything) can be assumed to be in the Sketchup module.  There are some constants that Google defined that are part of the Object class, but that was errant and they probably won't go back and change that now.

Todd

On Jun 1, 12:12 pm, calmze <cal@gmail.com> wrote:

Often I see statements like:

Sketchup::InputPoint.new

What does the :: mean?

How do I know that InPoint is defined within Sketchup, since the docs don't explicitly state it?  How do I know it's not in Geom?

Thanks.- Hide quoted text -

- Show quoted text -