• Login
sketchucation logo sketchucation
  • Login
ℹ️ GoFundMe | Our friend Gus Robatto needs some help in a challenging time Learn More

UI.openpanel - wildcard bug

Scheduled Pinned Locked Moved Developers' Forum
7 Posts 5 Posters 706 Views
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.
  • T Offline
    thomthom
    last edited by 3 Sept 2010, 09:23

    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
    • D Offline
      Dan Rathbun
      last edited by 3 Sept 2010, 11:37

      @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
      • F Offline
        fredo6
        last edited by 20 Feb 2011, 10:47

        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
        • T Offline
          thomthom
          last edited by 20 Feb 2011, 13:50

          @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 8 Mar 2011, 12:00

            I tried "a.jpg".

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

            1 Reply Last reply Reply Quote 0
            • H Offline
              honoluludesktop
              last edited by 8 Mar 2011, 18:46

              Someone previously showed me that it works this way.

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

              1 Reply Last reply Reply Quote 0
              • D Offline
                Dan Rathbun
                last edited by 8 Mar 2011, 21:45

                @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