13 messages in com.googlegroups.sketchuprubyNone Re: sketchup ruby geometry parsing| From | Sent On | Attachments |
|---|---|---|
| calmze | 09 Jun 2008 13:22 | |
| calmze | 09 Jun 2008 17:06 | |
| morisdov | 10 Jun 2008 06:10 | |
| calmze | 10 Jun 2008 06:56 | |
| morisdov | 10 Jun 2008 10:56 | |
| calmze | 10 Jun 2008 11:02 | |
| calmze | 10 Jun 2008 16:45 | |
| calmze | 10 Jun 2008 16:45 | |
| morisdov | 11 Jun 2008 03:05 | |
| calmze | 11 Jun 2008 07:27 | |
| Todd Burch - Katy, Texas | 15 Jun 2008 15:04 | |
| calmze | 16 Jun 2008 07:59 | |
| Todd Burch - Katy, Texas | 16 Jun 2008 18:06 |
| Subject: | None Re: sketchup ruby geometry parsing![]() |
|---|---|
| From: | Todd Burch - Katy, Texas (mr.t...@gmail.com) |
| Date: | 06/16/2008 06:06:34 PM |
| List: | com.googlegroups.sketchupruby |
When I used to develop on Windows, I just used Notepad (sucks) unless I needed a line number, then I would bring up scite to get the line number.
Now that I do all my dev on the Mac, I use TextWrangler. I like the side drawer where I can quickly get to any number of edit sessions. It does syntax highlighting, but not for Ruby (but there might be a plugin somewhere - I would look if I cared).
So, in otherwords, no IDE currently in use. Netbeans looked slick when I saw a demo a few months ago.
I guess I'm holding out for an IDE that is fully integrated into SketchUp with built in debugger (I'm not holding my breath for that one). ;)
Here's my magical ruby script that ties SketchUp / Ruby to JRuby:
#------------------------------------- require 'sketchup.rb'
dt1 = Time.now puts "before date" x = `Date` ; dt2 = Time.now puts "after date. Elasped was #{dt2-dt1} seconds, x=>#{x}<"
t1 = Time.now puts "before jruby call..." ##x = `jruby 'myscripts/jruby_test.rb'`
x = `/Users/toddburch/jruby-1.0.1/bin/jruby ~/Documents/myruby/ jruby_test.rb` ; t2 = Time.now
puts "after jruby call. Elapsed Time was #{t2-t1} seconds, result=>#{x}<" #---------------------------------------
And here is the called jruby script:
#---------------------------------------------
# Valid as of JRuby 1.0
# This is the 'magical Java include line'. include Java
# With the 'include Java' above, we can now refer to things that are part of the # standard Java platform via their full paths. frame = javax.swing.JFrame.new("Window") # Creating a Java JFrame. label = javax.swing.JLabel.new("Hello")
# We can transparently call Java methods on Java objects, just as if they were defined in Ruby. frame.getContentPane.add(label) # Invoking the Java method 'getContentPane'. frame.setDefaultCloseOperation(javax.swing.JFrame::EXIT_ON_CLOSE) frame.pack frame.setVisible(true) #---------------------------------------------
You will note that SketchUp goes into la-la land when JRuby is doing it's thing.
As far as having any issues with the install, I have a couple comments.
1) Charles Oliver Nutter (Mr. JRuby) was a great help, because I had issues too. He responded to my emails fast. 2) The JRuby install, when I ran it, needed improvement. It altered my system profile for my bash shell, and it should have only updated the profile for my userid. Shame on it. 3) I had to modify the path in the profile from what it created to fully qualify the path to JRuby so it would work. Shame on it.
Todd
On Jun 16, 9:59 am, calmze <cal...@gmail.com> wrote:
Todd,
Can you send me some brief instructions or a list of some resources you used to set up JRuby? Some examples of using JRuby from inside Ruby would also be helpful. My email is calmze at gmail dot com. Also, what IDE are you using for Ruby? I'm using scite since it came with the Ruby download.
Thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
ideas" group.
To post to this group, send email to sket...@googlegroups.com
To unsubscribe from this group, send email to
sket...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/sketchupruby?hl=en
-~----------~----~----~----~------~----~------~--~---




