Mystery
-
So I'm writing a script, nothing too fancy.
It's not fully working yet, but functionally it is (some methods are puts instead)
The mystery is that every time the script ends, at the time I select the selection tool I get this message in the console:@unknownuser said:
Error: #<ArgumentError: wrong number of arguments (1 for 0)>
/Library/Application Support/Google SketchUp 8/SketchUp/Plugins/LIBFREDO6_Dir_43/Lib6Traductor.rb:155:in `deactivate'Needless to say I have the traductor and the LIBFREDO_Dir, bu I am in no way calling them within the script, nor sending ay instruction that should create this.
Also my script end is a standard deactivate method as follows:
@unknownuser said:
def deactivate
Sketchup::set_status_text("",SB_PROMPT)
Sketchup::set_status_text("",SB_VCB_LABEL)
Sketchup::set_status_text("",SB_VCB_VALUE)
endI'm on a MAC
Anybody can help? Fredo?
-
Are all of your methods wrapped inside a module and/or class ?
I'd be surprised that Fredo has a raw 'deactivate' method
I suspect you do !
It might be an observer trapping your error into his own error reporting, assuming it's his tool's error...
The standard Tool deactivate method is
def deactivate(**view**)
...Try adding that inside a Tool class...
???
https://developers.google.com/sketchup/docs/ourdoc/tool#deactivate -
@tig said:
Are all of your methods wrapped inside a module and/or class ?
It looks to me as not.
He is defining a global method
deactivatewithinObject, and it's getting inherited by EVERYTHING, including Fredo's modules. -
@tig said:
Are all of your methods wrapped inside a module and/or class ?
I'd be surprised that Fredo has a raw 'deactivate' method
I suspect you do !
It might be an observer trapping your error into his own error reporting, assuming it's his tool's error...
The standard Tool deactivate method is
def deactivate(**view**)
...Try adding that inside a Tool class...
???
https://developers.google.com/sketchup/docs/ourdoc/tool#deactivateYES! That did it!
Yes it was all within a class. Just adding "(view)" solved the problem. I didn't change anything else. The deactivate method was within the class and still is.
Yes indeed I strongly suspected that Fredo had nothing to do with this.
Thanks TIG and Dan.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register LoginAdvertisement