• Login
sketchucation logo sketchucation
  • Login
⚠️ Libfredo 15.4b | Minor release with bugfixes and improvements Update

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

Scheduled Pinned Locked Moved Developers' Forum
7 Posts 4 Posters 255 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.
  • C Offline
    Chris Fullmer
    last edited by 28 Mar 2009, 08:14

    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
    • T Offline
      thomthom
      last edited by 28 Mar 2009, 10:40

      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 28 Mar 2009, 11:06

        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 28 Mar 2009, 11:48

          @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 28 Mar 2009, 12:11

            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 28 Mar 2009, 12:26

              It's a great plugin Jim, thank you

              Frenglish at its best !
              My scripts

              1 Reply Last reply Reply Quote 0
              • C Offline
                Chris Fullmer
                last edited by 28 Mar 2009, 15:38

                @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
                1 / 1
                • First post
                  1/7
                  Last post
                Buy SketchPlus
                Buy SUbD
                Buy WrapR
                Buy eBook
                Buy Modelur
                Buy Vertex Tools
                Buy SketchCuisine
                Buy FormFonts

                Advertisement