sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    HTMLDialog vs WebDialog?

    Scheduled Pinned Locked Moved Developers' Forum
    23 Posts 5 Posters 4.5k Views 5 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Dan RathbunD Offline
      Dan Rathbun
      last edited by

      @medeek said:

      The error codes posted above.

      ... are occurring (according to your error messages,) in " medeek_roof_truss.rbs", line 5726, in callback method onLButtonDown.

      In the first you are calling a *() method upon an object that is referencing the global singleton nil object. Since the NilClass does not have an "asterisk" method, a NoMethodError is raised.

      The second method is caused by your code expecting a Float object, but getting a String object instead.

      The answer is simple. Whenever an object reference could reference disparate types (classes) of obejcts, use a combination of type validation and Ruby rescue clauses with the onLButtonDown callback method.

      I'm not here much anymore.

      1 Reply Last reply Reply Quote 0
      • medeekM Offline
        medeek
        last edited by

        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?

        Nathaniel P. Wilkerson PE
        Medeek Engineering Inc
        design.medeek.com

        1 Reply Last reply Reply Quote 0
        • Dan RathbunD Offline
          Dan Rathbun
          last edited by

          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.

          Link Preview Image
          Data validation - Wikipedia

          favicon

          (en.wikipedia.org)

          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.

          I'm not here much anymore.

          1 Reply Last reply Reply Quote 0
          • 1
          • 2
          • 2 / 2
          • First post
            Last post
          Buy SketchPlus
          Buy SUbD
          Buy WrapR
          Buy eBook
          Buy Modelur
          Buy Vertex Tools
          Buy SketchCuisine
          Buy FormFonts

          Advertisement