thomthom / quadface-tools

Suite of tools for manipulating quad faces in SketchUp.
https://extensions.sketchup.com/en/content/quadface-tools
MIT License
17 stars 1 forks source link

ErrorDialog error #106

Open thomthom opened 7 years ago

thomthom commented 7 years ago

Original report by me.


Reported by @duanekemp

#<NoMethodError: undefined method `[]' for nil:NilClass>
C:/Users/Duane/AppData/Roaming/SketchUp/SketchUp 2016/SketchUp/Plugins/TT_QuadFaceTools/vendor/error-handler/error_reporter.rb:329:in `block in create_dialog'
C:/Users/Duane/AppData/Roaming/SketchUp/SketchUp 2016/SketchUp/Plugins/TT_QuadFaceTools/vendor/error-handler/error_reporter.rb:352:in `call'
C:/Users/Duane/AppData/Roaming/SketchUp/SketchUp 2016/SketchUp/Plugins/TT_QuadFaceTools/vendor/error-handler/error_reporter.rb:352:in `block in trigger_event'
C:/Users/Duane/AppData/Roaming/SketchUp/SketchUp 2016/SketchUp/Plugins/TT_QuadFaceTools/vendor/error-handler/error_reporter.rb:348:in `each'
C:/Users/Duane/AppData/Roaming/SketchUp/SketchUp 2016/SketchUp/Plugins/TT_QuadFaceTools/vendor/error-handler/error_reporter.rb:348:in `trigger_event'
C:/Users/Duane/AppData/Roaming/SketchUp/SketchUp 2016/SketchUp/Plugins/TT_QuadFaceTools/vendor/error-handler/error_reporter.rb:306:in `block in create_dialog'
SketchUp:1:in `call'

Related code is:

      on("dialog_ready") { |dialog, data|
        section = preference_key
        user_data = {
          :user_name => Sketchup.read_default(section, "name",  ""),
          :user_email => Sketchup.read_default(section, "email", "")
        }
        call(dialog, "restore_form", user_data)
        dialog = data = nil
      }

For some reason data in the callback from the dialog is nil.

Not sure what might cause that...