HTMLDialog vs WebDialog?
-
@medeek said:
The error codes posted above.
... are occurring (according to your error messages,) in "
medeek_roof_truss.rbs", line 5726, in callback methodonLButtonDown.In the first you are calling a
*()method upon an object that is referencing the global singletonnilobject. Since theNilClassdoes not have an "asterisk" method, aNoMethodErroris raised.The second method is caused by your code expecting a
Floatobject, but getting aStringobject instead.The answer is simple. Whenever an object reference could reference disparate types (classes) of obejcts, use a combination of type validation and Ruby
rescueclauses with theonLButtonDowncallback method. -
Okay 95% of that just went over my head, but I'll try and decipher into terms I can understand.
But why would this error only be raised for SketchUp running on MacOS and not Windows?
-
Basically I'm trying to prompt you to learn how to read Ruby error and backtrace messages.
“filename:lineNo: inmethod”‘ or “filename:lineNo.”`http://ruby-doc.org/core-2.2.4/doc/syntax/exceptions_rdoc.html
http://ruby-doc.org/core-2.2.4/Exception.html@medeek said:
Okay 95% of that just went over my head, but I'll try and decipher into terms I can understand.
An example in Ruby of testing if an object reference is pointing at an object of a certain class:
if obj.is_a?(NilClass)
... or ...
if obj.is_a?(Float)An example in Ruby of validating that an object reference call responds to a certain method call:
if obj.respond_to?(:methname)
... and testing for the "asterisk" method specifically:
if obj.respond_to?(:*)@medeek said:
But why would this error only be raised for SketchUp running on MacOS and not Windows?
I don't know (offhand) as I avoid Macs myself. (But OSX and MS Windows use different sets of keycodes.)
Actually, looking at the backtraces (in your original error listing) the errors are kicked off by a LButtonDown keypress, but are occurring in the `` create_timber_geometry()`' method, lines 1064 and 1355.
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