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

    D = c.uniq - wrong syntax or a bug?

    Scheduled Pinned Locked Moved Developers' Forum
    7 Posts 4 Posters 257 Views 4 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.
    • Chris FullmerC Offline
      Chris Fullmer
      last edited by

      Hi, I'm trying to use the uniq method of ruby, but I am getting an unexpected error. Here's my example.

      a=[1,2,3,4,5] b=[2,3,4] c = a+b d = c.uniq

      The error is:

      Error; #<NoMethodError; undefined method `execute_script' for [1, 2, 3, 4, 5];Array>
      C;/Program Files (x86)/Google/Google SketchUp 7/Plugins/webconsole.rb;40;in `initialize'
      C;/Program Files (x86)/Google/Google SketchUp 7/Plugins/webconsole.rb;26;in `call'
      

      Any thoughts?

      Chris

      Lately you've been tan, suspicious for the winter.
      All my Plugins I've written

      1 Reply Last reply Reply Quote 0
      • thomthomT Offline
        thomthom
        last edited by

        The error seem to indicate you are trying to call an .execute_script method on an Array object. Doesn't seem to be related to your example.

        Thomas Thomassen — SketchUp Monkey & Coding addict
        List of my plugins and link to the CookieWare fund

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

          This code works in the RUBY console directly. Bug from Jim's webconsole...

          Frenglish at its best !
          My scripts

          1 Reply Last reply Reply Quote 0
          • J Offline
            Jim
            last edited by

            @matt666 said:

            Bug from Jim's webconsole...

            yep. I'll see what's going on, unless you've already fixed it.

            Hi

            1 Reply Last reply Reply Quote 0
            • J Offline
              Jim
              last edited by

              Hehe, I used the variable 'd' for the dialog and then it got redefined in the webdialog. 😳

              It's fixed: http://sketchuptips.blogspot.com/2007/08/plugin-webconsolerb.html

              Hi

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

                It's a great plugin Jim, thank you

                Frenglish at its best !
                My scripts

                1 Reply Last reply Reply Quote 0
                • Chris FullmerC Offline
                  Chris Fullmer
                  last edited by

                  @jim said:

                  Hehe, I used the variable 'd' for the dialog and then it got redefined in the webdialog. 😳

                  It's fixed: http://sketchuptips.blogspot.com/2007/08/plugin-webconsolerb.html

                  Ahh, I hadn't considered a glitch in the webconsole - it was worked so incredibly well this whole time. Thanks for looking at it and getting a fix out there so fast!

                  @Thom, yeah I thought the execute script was an odd error, so I thought maybe Google had messed up the .uniq method or something on their end.

                  Glad its all up and working now, thanks Jim!

                  Chris

                  Lately you've been tan, suspicious for the winter.
                  All my Plugins I've written

                  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