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!
    🔌 Smart Spline | Fluid way to handle splines for furniture design and complex structures. Download

    WxWindows for SketchUp Dialogs

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

      @unknownuser said:

      Have you used the WxFormBuilder? It would be nice to have a straight output compatible with WxSU! There is a beta which works with Python.

      Tomasz

      or you can export your design to a xrc file (xml style) and load it with xml methods from the Wx module.

      xml = Wx::XmlResource.get
      xml.load(your_file.xrc)

      (google for "xrcise", this utility write for you the code needed to load your xrc)

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

        @unknownuser said:

        I would appreciate any help with solving this strange bugsplat which appears instead of a simple ruby error message in the console.
        It happens after triggering an 'evt_button'.

        It looks like WxSU doesn't handle errors communication between WxRuby and Sketchup.

        The best way to get rid of bugsplats is to handle exceptions by yourself, at the end of each method that uses WxSU:
        That way, you display the call stack, letting you know where the bug is.

        
        rescue => detail
           puts detail.message
           puts detail.backtrace.join("\n")
        
        
        1 條回覆 最後回覆 回覆 引用 0
        • T 離線
          tomasz
          最後由 編輯

          @malkomitch said:

          The best way to get rid of bugsplats is to handle exceptions by yourself, at the end of each method that uses WxSU:
          That way, you display the call stack, letting you know where the bug is.

          Thanks a lot for your help.
          I get a bugsplat when closing SU, but it is definitely better this way.
          I though that begin ... rescue ... end is required, but I am glad to hear that rescue alone is sufficient.

          Writing about xml loading I must say that I prefer to write my own Ruby code based on 'initial' FormBuilder layout, as it helps me better understand WxRuby. Thanks for hint anyway!

          Tomasz

          Author of Thea Render for SketchUp

          1 條回覆 最後回覆 回覆 引用 0
          • Dan RathbunD 離線
            Dan Rathbun
            最後由 編輯

            @unknownuser said:

            I thought that begin ... rescue ... end is required, but I am glad to hear that rescue alone is sufficient.

            That is because in module definitions, the module statement is a block statement so the word module works the same as begin (after all, the module does need an end.)

            
            module My_Module
              # method defs
              # code goes here
            rescue
              # error handling code
            else
              # only do code if no exceptions
            ensure
              # always do this code on exit
            end # the end of the method def
            
            

            The same is true for method definitions, where the def keyword 'begins' the block.

            
            def my_method
              # code goes here
            rescue
              # error handling code
            else
              # only do code if no exceptions
            ensure
              # always do this code
            end # the end of the module
            
            

            I'm not here much anymore.

            1 條回覆 最後回覆 回覆 引用 0
            • T 離線
              tomasz
              最後由 編輯

              @dan rathbun said:

              That is because in module definitions, the module statement is a block statement so the word module works the same as begin (after all, the module does need an end.)

              Thanks for the explanation.

              Author of Thea Render for SketchUp

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

              Advertisement