@colin, AND I just confirmed that the
NoMethodError due to
#deleted? getting called upon the model object, is what is causing the problem with the Options dialog.
Put your Options dialog into the error state where it will not populate when you click on a DC component.
At the console, paste in this command …
You should see the error displayed thus …
Error: #<NoMethodError: undefined method `deleted?' for
su_dynamiccomponents/ruby/dcclass_overlays.rbe:212:in `block in pull_attribute_tree'
Now let’s give the
Sketchup::Model class a temporary
Paste in this definition …
class Sketchup::Model; def deleted?; !valid?(); end; end
… it simply defines the method that calls the existing
#valid? method but negates the result and returns it. This satisfies the DC’s
pull_attribute_tree method’s conditional statement, so it doesn’t raise an exception.
Now, again execute the refresh dialogs method call …
The Options dialog populates ! Yeah! (The crowd goes wild!) :cheer:
So for a fix, a fix script can be dropped into the Plugins folder …
unless Sketchup::Model.method_defined? :deleted?
end # class
end # unless
Do y’all realize that I reported this 5 YEARS AGO ! … back in v1.3.2 ?
Ruby Errors in Dynamic Components - #2 by DanRathbun
… but as this thread shows people were having issues back in DEC of 2014.