sketchucation logo sketchucation
    • Login
    πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    Mystery

    Scheduled Pinned Locked Moved Developers' Forum
    4 Posts 3 Posters 129 Views 3 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.
    • M Offline
      Michaelv
      last edited by

      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)
      end

      I'm on a MAC

      Anybody can help? Fredo?

      1 Reply Last reply Reply Quote 0
      • TIGT Offline
        TIG Moderator
        last edited by

        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

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

          @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 deactivate within Object, and it's getting inherited by EVERYTHING, including Fredo's modules.

          I'm not here much anymore.

          1 Reply Last reply Reply Quote 0
          • M Offline
            Michaelv
            last edited by

            @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#deactivate

            YES! 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.

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

            Advertisement