sketchucation logo sketchucation
    • 登入
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    ⚠️ Important | Libfredo 15.6b introduces important bugfixes for Fredo's Extensions Update

    Mathematics related problem

    已排程 已置頂 已鎖定 已移動 Developers' Forum
    23 貼文 4 Posters 2.5k 瀏覽 4 Watching
    正在載入更多貼文
    • 從舊到新
    • 從新到舊
    • 最多點贊
    回覆
    • 在新貼文中回覆
    登入後回覆
    此主題已被刪除。只有擁有主題管理權限的使用者可以查看。
    • M 離線
      meeta
      最後由 編輯

      @thomthom said:

      @meeta said:

      I know that many UI boxes is absolutely silly but that's my way of debugging because I know no other way! pls recommend any other method for debugging!

      Output the values to the Ruby Console, use the puts method. puts "Hello World"

      yes i tried doing that,, but strangely the answer in ruby is always right but not in sketchup! so i figured something must be wrong in the code or in sketchup! hopefully its my code because that'll be easier to fix

      Meet A

      1 條回覆 最後回覆 回覆 引用 0
      • thomthomT 離線
        thomthom
        最後由 編輯

        @meeta said:

        yes i tried doing that,, but strangely the answer in ruby is always right but not in sketchup! so i figured something must be wrong in the code or in sketchup! hopefully its my code because that'll be easier to fix

        ??
        You are aware of the Ruby Console window in Sketchup, right? That's the one I'm referring to. That will let you see the values you get from the script running in SU's Ruby.

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

        1 條回覆 最後回覆 回覆 引用 0
        • M 離線
          meeta
          最後由 編輯

          @thomthom said:

          You are aware of the Ruby Console window in Sketchup, right? That's the one I'm referring to. That will let you see the values you get from the script running in SU's Ruby.

          oh you mean that ruby console,, i thought you were talking of the interactive ruby console.. sorry about them.. let me try it out now!

          Meet A

          1 條回覆 最後回覆 回覆 引用 0
          • thomthomT 離線
            thomthom
            最後由 編輯

            There are people that have worked out how to hook up debuggers to SU's ruby. But I've so far managed by using the Sketchup Ruby Console to output data throughout the script when I need to debug errors and abnormalities. It's the Sketchup Ruby Console that most people here on this forum will be referring to when they mention the Console.

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

            1 條回覆 最後回覆 回覆 引用 0
            • M 離線
              meeta
              最後由 編輯

              ohh really? thanks i am newb with sketchup programming have been using sketchup for a few years though.. anyways now i wont look like a fool if anyone says console and i think of the irb! thanks

              Meet A

              1 條回覆 最後回覆 回覆 引用 0
              • thomthomT 離線
                thomthom
                最後由 編輯

                For most people here, the Sketchup Ruby Console is the debugging tool. Some are also using Jim's custom console which has some extended features.

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

                1 條回覆 最後回覆 回覆 引用 0
                • thomthomT 離線
                  thomthom
                  最後由 編輯

                  FYI, I'd never used Ruby before I started making plugins for SU. And I only recently installed a normal Ruby installation on my computer - never touched a full Ruby installation before.

                  So there's no wonder we're getting confused here. 😄

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

                  1 條回覆 最後回覆 回覆 引用 0
                  • M 離線
                    meeta
                    最後由 編輯

                    haha i see what you mean.. i ought to not touch the irb as well! i just downloaded and installed jim's web console.. its really good.. i dinno i could write and test the code in sketchup! i used to restart and edit it in msft notepad! not anymore.. always love increasing productivity : 💚

                    Meet A

                    1 條回覆 最後回覆 回覆 引用 0
                    • thomthomT 離線
                      thomthom
                      最後由 編輯

                      I write in Notepad++ and use the regular Console to debug. Reload the changes by typing load "rubyfile.rb" into the Console. Crude - but it works. Though there are cases where I really wish I could step through the code...

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

                      1 條回覆 最後回覆 回覆 引用 0
                      • M 離線
                        meeta
                        最後由 編輯

                        ahh notepad++ old friend.. i used to do my c++ programming on it and then take it to university to test it! haha
                        i think i am gonna take the night off and start over with this tomorrow might crack something.. 😄 good night world!

                        Meet A

                        1 條回覆 最後回覆 回覆 引用 0
                        • 1
                        • 2
                        • 2 / 2
                        • 第一個貼文
                          最後的貼文
                        Buy SketchPlus
                        Buy SUbD
                        Buy WrapR
                        Buy eBook
                        Buy Modelur
                        Buy Vertex Tools
                        Buy SketchCuisine
                        Buy FormFonts

                        Advertisement