D = c.uniq - wrong syntax or a bug?
-
Hi, I'm trying to use the uniq method of ruby, but I am getting an unexpected error. Here's my example.
a=[1,2,3,4,5] b=[2,3,4] c = a+b d = c.uniq
The error is:
Error; #<NoMethodError; undefined method `execute_script' for [1, 2, 3, 4, 5];Array> C;/Program Files (x86)/Google/Google SketchUp 7/Plugins/webconsole.rb;40;in `initialize' C;/Program Files (x86)/Google/Google SketchUp 7/Plugins/webconsole.rb;26;in `call'
Any thoughts?
Chris
-
The error seem to indicate you are trying to call an
.execute_script
method on an Array object. Doesn't seem to be related to your example. -
This code works in the RUBY console directly. Bug from Jim's webconsole...
-
@matt666 said:
Bug from Jim's webconsole...
yep. I'll see what's going on, unless you've already fixed it.
-
Hehe, I used the variable 'd' for the dialog and then it got redefined in the webdialog.
It's fixed: http://sketchuptips.blogspot.com/2007/08/plugin-webconsolerb.html
-
It's a great plugin Jim, thank you
-
@jim said:
Hehe, I used the variable 'd' for the dialog and then it got redefined in the webdialog.
It's fixed: http://sketchuptips.blogspot.com/2007/08/plugin-webconsolerb.html
Ahh, I hadn't considered a glitch in the webconsole - it was worked so incredibly well this whole time. Thanks for looking at it and getting a fix out there so fast!
@Thom, yeah I thought the execute script was an odd error, so I thought maybe Google had messed up the .uniq method or something on their end.
Glad its all up and working now, thanks Jim!
Chris
Advertisement