Author Topic: Default pattern in system file->Open dialog -- often changing to *.txt  (Read 317 times)

jporkkahtc

  • Senior Community Member
  • Posts: 2194
  • Hero Points: 192
  • Text
Over the last week or so I've noticed that the system File->Open dialog pattern is getting set to "Text Files (*.txt)" very often.

For example, I just opened a JSON file - the pattern was *.*
I did File->Open again, and the pattern was reset to *.txt

I just tried to repro, and it happens about 30-40% of the time -- just opening the same couple of files over and over again -- sometimes the pattern stays *.*, and sometimes it switches to *.txt

I do not have any *.txt files open.


The only thing I can think of is that I recently edited the list in: Tools > Options > File Options > Files of Type Filters
Mostly, I removed a bunch of the patterns for file types I never use.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 5779
  • Hero Points: 461
I haven't been able to reproduce this.

I did reproduce a problem where SlickEdit seems to switch between "All Files (*.*)" and "Makefiles (*.*)" but then settles on the last match ("Makefiles (*.*)"). The issue here is that SlickEdit only matches the "*.*" and never looks at the label. Also, "Makefiles (*.*)" should be "Makefiles (Makefile;*.mk;*.mak)". I have added a hot fix for this default setting.

jporkkahtc

  • Senior Community Member
  • Posts: 2194
  • Hero Points: 192
  • Text
So, in 25.0.2 this continues to plague me.
If anything, it seems worse.

In trying to pin down a repro, I've found that it cycles thru the patterns if I don't change the pattern box in File->Open -- I just enter a filename manually for a file I know exists.
File->Open: Reset the pattern to AllFiles(*.*)
Open some file
File->Open:  Pattern is now Makefiles(*.*)
Open some file
File->Open: Pattern is now TextFiles(*.txt)
Open some file
File->Open: Pattern is now SQLFiles(*.sql)
Open some file
File->Open: Pattern is now Slick-C (*.e;*.sh)

Look at the attached image -- Slick is walking thru the patterns backwards.
From AllFiles, it skips Assembler and goes to Makefiles, then continues walking up the list each time I use File->Open.

If I set the pattern to C/C++ files - then it sticks - presumably, this is the end of the list of patterns?


How does Slick decide what to set the pattern to when File->Open is opened?

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 5779
  • Hero Points: 461
The slightly new syntax requires that there be a space between the text and the open paren "All Files<space>(". Also, the Makefiles setting was bad and has now been updated but it does not update when you install 25.0.2 if you made any changes. Having multiple settings with the same wildcards (*.* for "All Files" and "Makefiles" isn't supported).

Post your def_file_types. I suspect it has problems.

jporkkahtc

  • Senior Community Member
  • Posts: 2194
  • Hero Points: 192
  • Text
def_file_types

Code: [Select]
All Files (*.*),C/C++ Files (*.c;*.cc;*.cpp;*.cp;*.cxx;*.c++;*.h;*.hh;*.hpp;*.hxx;*.h++;*.inl;*.xpm),C# Files (*.cs),Powershell (*.ps1;*.psm1;*.psd1);Groovy Files (*.groovy;*.gvy;*.gy;*.gsh),Java Files (*.java),HTML Files (*.htm;*.html;*.shtml;*.asp;*.jsp;*.php;*.php3;*.rhtml;*.css),CFML Files (*.cfm;*.cfml;*.cfc),XML Files (*.xml;*.dtd;*.xsd;*.xmldoc;*.xsl;*.xslt;*.ent;*.tld;*.xhtml;*.build;*.plist),XML/SGML DTD Files (*.xsd;*.dtd),XML/JSP TagLib Files (*.tld;*.xml),Objective-C (*.m;*.mm;*.h),IDL Files (*.idl),Basic Files (*.vb;*.vbs;*.bas;*.frm),JavaScript (*.js;*.ds;*.json),Google Go Files (*.go),Perl Files (*.pl;*.pm;*.perl;*.plx),Python Files (*.py),Java Properties (*.properties),Lua Files (*.lua),Tcl Files (*.tcl;*.tlib;*.itk;*.itcl;*.exp),Slick-C (*.e;*.sh),SQL Files (*.sql),Text Files (*.txt),Makefiles (*.*),Assembler (*.asm)

jporkkahtc

  • Senior Community Member
  • Posts: 2194
  • Hero Points: 192
  • Text
Ah ... I noticed "Powershell (*.ps1;*.psm1;*.psd1);Groovy Files (..."
Used a ; instead of a ,.

Fixing this fixes File->Open: Yay!

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 5779
  • Hero Points: 461
Glad you figured it out. Makefile is still messed up. The new default setting are:

Windows and Mac:
Makefiles (Makefile;*.mk;*.mak)

Unix:
Makefiles (Makefile;makefile;*.mk;*.mak)