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

    UI.openpanel - wildcard bug

    Scheduled Pinned Locked Moved Developers' Forum
    7 Posts 5 Posters 706 Views 5 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.
    • thomthomT Offline
      thomthom
      last edited by

      http://code.google.com/apis/sketchup/docs/ourdoc/ui.html#openpanel

      @unknownuser said:

      SU7 Bug: The wildcards are not working properly if more than one is entered (e.g. ".jpg;.png") or if a directory is included. The '*' gets converted to a '_'.

      I get that bug even with only one wildcard:
      filename = UI.openpanel('Open CSV File', 'c:\\', '*.csv')

      ? ❓ ?

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

      1 Reply Last reply Reply Quote 0
      • Dan RathbunD Offline
        Dan Rathbun
        last edited by

        @thomthom said:

        I get that bug even with only one wildcard:
        filename = UI.openpanel('Open CSV File', 'c:\\', '*.csv')

        I always got that bug... with any wildcard, including '?'

        And BTW I did file a new bug report on this, as a reminder.

        I'm not here much anymore.

        1 Reply Last reply Reply Quote 0
        • fredo6F Offline
          fredo6
          last edited by

          Dan, Tom,

          Thans for having filed the bug to the SU Team.
          Apparently this is still not solved in SU8 M1
          Note that, strangely, wildcards work in SU6, but in SU7 and SU8, we got the * replaced by an underscore

          Fredo

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

            @unknownuser said:

            Note that, strangely, wildcards work in SU6, but in SU7 and SU8, we got the * replaced by an underscore

            Yea - It's an annoying regression bug. Seems like it's not been considered important enough. Though I find it troublesome as it#s makes it awkward for the end user. πŸ˜•

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

            1 Reply Last reply Reply Quote 0
            • S Offline
              shirazbj
              last edited by

              I tried "a.jpg".

              Why ".jpg" is not listed in the "files of type"?

              1 Reply Last reply Reply Quote 0
              • honoluludesktopH Offline
                honoluludesktop
                last edited by

                Someone previously showed me that it works this way.

                chosen_file=UI.openpanel("Select DXF File","", "*.Dxf")

                1 Reply Last reply Reply Quote 0
                • Dan RathbunD Offline
                  Dan Rathbun
                  last edited by

                  @honoluludesktop said:

                  Someone previously showed me that it works this way.

                  chosen_file=UI.openpanel("Select DXF File","", "*.Dxf")

                  And also like:
                  chosen_file=UI.openpanel("Select DXF File","*.Dxf")

                  However... Windows will use it's own directory paths it automatically saves into the Registry, for each file extension.

                  (1) If the openpanel has never before selected a *.dxf file, then the openpanel will (likely) open in the user's My Documents folder.

                  (2) If the User did previously select a *.dxf file, with the openpanel, Windows will open in the Most Recently Used (MRU) path Windows saved for the *.dxf extention.

                  Setting the working directory via Dir.chdir has no effect on what directory the openpanel starts in.

                  I'm not here much anymore.

                  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