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

Multiple file extensions in openpanel

已排程 已置頂 已鎖定 已移動 Developers' Forum
24 貼文 6 Posters 1.6k 瀏覽 6 Watching
正在載入更多貼文
  • 從舊到新
  • 從新到舊
  • 最多點贊
回覆
  • 在新貼文中回覆
登入後回覆
此主題已被刪除。只有擁有主題管理權限的使用者可以查看。
  • J 離線
    Jim
    最後由 編輯 2008年2月23日 下午8:51

    I know that the following will display only folders and zip files in the openpanel dialog:

    
    fn = UI.openpanel "Select a zip file.", "",  "*.zip"
    
    

    Is there a way to specify more than one file extension, like .zip and .rb?

    Hi

    1 條回覆 最後回覆 回覆 引用 0
    • J 離線
      Jim
      最後由 編輯 2008年2月23日 下午8:54

      Answer to my own question: use a semi-colon:

      
      fn = UI.openpanel "Select a zip file.", "",  "*.zip;*.rb"
      
      

      Hi

      1 條回覆 最後回覆 回覆 引用 0
      • T 離線
        todd burch
        最後由 編輯 2008年2月25日 上午2:13

        Thanks Jim. I have updated the Ruby Wiki Doc. http://groups.google.com/group/SketchUp-Plugins-Dev/web/Ruby-UI.html?hl=en

        Todd

        1 條回覆 最後回覆 回覆 引用 0
        • J 離線
          Jim
          最後由 編輯 2008年2月25日 上午3:36

          I think that's a Windows thing, not strictly a Ruby thing.

          Hi

          1 條回覆 最後回覆 回覆 引用 0
          • T 離線
            todd burch
            最後由 編輯 2008年2月25日 上午4:05

            You are correct. I updated it to qualify that tip for Windows users. Thanks.

            1 條回覆 最後回覆 回覆 引用 0
            • A 離線
              Al Hart
              最後由 編輯 2009年1月31日 上午12:14

              When I tried this in SU 7 on XP and Vista, the openfile panel displayed only the .zip files, (no .rb files), and showed this '*.zip;_.rb' in the File name box: (with an underscore instead of a *)

              fn = UI.openpanel "Select a zip file.", "",  "*.zip;*.rb"
              
              

              When I pass it just one extension, it works:

              UI.openpanel "Select a zip file.", "",  "*.zip"
              

              But if I pass it a starting folder it fails:

              UI.openpanel "Select a zip file.", "c;/tmp",  "*.zip"
              

              showing '_.zip' in the File Name box

              Any thoughts. (Or maybe its just my machines)

              Al Hart

              http:wiki.renderplus.comimageseefRender_plus_colored30x30%29.PNG
              IRender nXt from Render Plus

              1 條回覆 最後回覆 回覆 引用 0
              • T 離線
                todd burch
                最後由 編輯 2009年1月31日 下午2:20

                Smells like a bug. Report it.

                1 條回覆 最後回覆 回覆 引用 0
                • A 離線
                  Al Hart
                  最後由 編輯 2009年1月31日 下午2:37

                  Thanks Todd.

                  I did in this other thread

                  Is there a better place to report Ruby bugs?

                  Actually, I was hoping I was doing something wrong, or that there was a workaround. 😞

                  Al Hart

                  http:wiki.renderplus.comimageseefRender_plus_colored30x30%29.PNG
                  IRender nXt from Render Plus

                  1 條回覆 最後回覆 回覆 引用 0
                  • J 離線
                    Jim
                    最後由 編輯 2009年1月31日 下午2:43

                    I just checked in V6 Pro and it works as expected. V7 Pro appears to be borked.

                    Hi

                    1 條回覆 最後回覆 回覆 引用 0
                    • T 離線
                      todd burch
                      最後由 編輯 2009年1月31日 下午2:46

                      Thanks for testing Jim.

                      Al, that's as good a place as any.

                      A guy over on the Ruby API on Google Groups found an interesting bug the other day. I reported it. http://groups.google.com/group/sketchupruby/browse_thread/thread/cea693f78613f521/d1baffa49e08010a#d1baffa49e08010a

                      In summary, a 4 sided face was getting created with only 3 vertices.

                      1 條回覆 最後回覆 回覆 引用 0
                      • T 離線
                        todd burch
                        最後由 編輯 2009年1月31日 下午4:24

                        That's news to me!! I've made several, although no exhaustive, changes there.

                        Who said that - Google? It would be nice if two things were to happen if that's the case:

                        1. Tell the people who do use it
                        2. Get rid of it (without losing the updates that were made)

                        When the Ruby Wiki was first put together, I asked the question "Will these changes get integrated into "official" the Ruby Help system" The answer I got back was an overwhelming "we don't know, but there it is - update it as much as you want."

                        Then, the next thing I see up at code.google.com was this web site: http://code.google.com/apis/sketchup/docs/developers_guide/index.html

                        There was no external-to-Google announcement (like an email to concerned citizens) or promotion of this web site (other than a no-fanfare link or two) that I am aware of, so then we had (and now we have) 3, count 'em, 3 different sources for doc.

                        For some time now, I have slacked off of updating the Ruby Doc Wiki, as it appears to me, unless I can be told different, that my updates are falling on deaf ears.

                        It's a mess. Someone at Google needs to decide of they want the doc updated, for free, by volunteers like us, and if so, there needs to be a process put in place that our changes make it to whatever is deemed to be the official doc in a timely manner. I mean, it's HTML for Pete's sake - not even a PDF. Maybe we need a "docforge" system???

                        Todd - not happy about this at all.

                        1 條回覆 最後回覆 回覆 引用 0
                        • A 離線
                          Al Hart
                          最後由 編輯 2009年1月31日 下午4:41

                          That's why I added the comment about the Wiki no longer being active - because a Wiki where we could help with the documentation would be a good idea.

                          Also, now that Peter, Scott and others at SketchUp were starting to develop things using Web Dialogs and Ruby, I was hoping they would help to improve the language it self and the documentation.

                          I'll pass this thread along to the person at Google who replied to the request to join the Wiki group, and maybe we can all come up with something which Google and some outside developers (by request and/or invitation) can help with.

                          I liked the idea that you were updating the documentation.

                          Al Hart

                          http:wiki.renderplus.comimageseefRender_plus_colored30x30%29.PNG
                          IRender nXt from Render Plus

                          1 條回覆 最後回覆 回覆 引用 0
                          • Chris FullmerC 離線
                            Chris Fullmer
                            最後由 編輯 2009年1月31日 下午8:01

                            Being totally new here, I echo Todd's frustration with having 3 sources for the API. I have a hard time telling which of the 3 I'm actually in. All I know is that things are documented slightly differently in different palces and sometimes the wiki has the best syntax and usage info (which is what I normally need TONS of help with).

                            Poor/multiple/unregulated/disorganized documentation has been a large frustration of mine with SU, and now that I'm looking at Ruby, its only gotten worse. I wish they would put more effort into making the info more complete and the process more transparent. I really would like to code in Ruby and I have some great ideas, and I'm getting there. But its very frustrating feeling like my #1 hinderance to learning is the SketchUp API.

                            Chris

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

                            1 條回覆 最後回覆 回覆 引用 0
                            • A 離線
                              Al Hart
                              最後由 編輯 2009年1月31日 下午11:32

                              @unknownuser said:

                              Thanks Jim. I have updated the Ruby Wiki Doc. http://groups.google.com/group/SketchUp-Plugins-Dev/web/Ruby-UI.html?hl=en

                              Todd

                              Is this Wiki being kept up to date.

                              I tried to join it and got this response:

                              @unknownuser said:

                              %(#BFFFFF)[This is a group that never really went anywhere, so we aren't actually using it.

                              Thanks for checking, however!]

                              **Added later:**After the initial posting of this post, Mark apologized that he was thinking of a different group:

                              @unknownuser said:

                              BTW, I see that I was quoted in the forum. If you wouldn't mind updating that to include
                              that I was wrong, that this wasn't the group I thought it was, I'd appreciate it. I don't
                              want folks to be misled because I got confused.

                              Al Hart

                              http:wiki.renderplus.comimageseefRender_plus_colored30x30%29.PNG
                              IRender nXt from Render Plus

                              1 條回覆 最後回覆 回覆 引用 0
                              • A 離線
                                Al Hart
                                最後由 編輯 2009年1月31日 下午11:34

                                Since my original posting of Mark's reply about the Wiki group, Mark has apologized. He was thinking of a different group:

                                @unknownuser said:

                                BTW, I see that I was quoted in the forum. If you wouldn't mind updating that to include
                                that I was wrong, that this wasn't the group I thought it was, I'd appreciate it. I don't
                                want folks to be misled because I got confused.

                                Al Hart

                                http:wiki.renderplus.comimageseefRender_plus_colored30x30%29.PNG
                                IRender nXt from Render Plus

                                1 條回覆 最後回覆 回覆 引用 0
                                • A 離線
                                  Al Hart
                                  最後由 編輯 2009年2月1日 上午12:52

                                  @unknownuser said:

                                  Then, the next thing I see up at code.google.com was this web site: http://code.google.com/apis/sketchup/docs/developers_guide/index.html

                                  I looked at this ruby documentation source and was surprised to see that Sketchup.load was not even on it. 😢

                                  Al Hart

                                  http:wiki.renderplus.comimageseefRender_plus_colored30x30%29.PNG
                                  IRender nXt from Render Plus

                                  1 條回覆 最後回覆 回覆 引用 0
                                  • T 離線
                                    todd burch
                                    最後由 編輯 2009年2月1日 上午2:52

                                    Yes, it's a 3-way mess.

                                    1 條回覆 最後回覆 回覆 引用 0
                                    • Tyler MillerT 離線
                                      Tyler Miller
                                      最後由 編輯 2009年2月4日 下午6:18

                                      Hey guys -

                                      We hear you loud and clear about the documentation mess. We're working hard to resolve it.

                                      -Tyler

                                      1 條回覆 最後回覆 回覆 引用 0
                                      • T 離線
                                        todd burch
                                        最後由 編輯 2009年2月4日 下午6:43

                                        Thanks Tyler.

                                        1 條回覆 最後回覆 回覆 引用 0
                                        • thomthomT 離線
                                          thomthom
                                          最後由 編輯 2009年2月4日 下午7:06

                                          @tyler miller said:

                                          Hey guys -

                                          We hear you loud and clear about the documentation mess. We're working hard to resolve it.

                                          -Tyler

                                          Ooooh! So good to hear this! 👍 👍

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

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

                                          Advertisement