On Mar 23, 2007, at 18:05 UTC, Tim Jones wrote: > I'm trying to use the OpenDialog to allow a user to only select files > that end in ".tar.gz" or ".tgz". I've created a Filetype entry > called GzipTarFile that has the extensions field containing: > > .tgz, .tar.gz > > However, when I set the dlg.Filter to "GzipTarFile" and display the > dialog, all files are selectable.
You're probably running on a Mac, and have forgotten to set the MacType to something. If you don't set it to something, by default, it matches all file types. For binary data like this, if there is no standard MacType that is appropriate, then just make one up (e.g. "T.Gz"). The filter will then match any files with that MacType, or any untyped files with the given extension. Of course it's better to find an actual, in-use file type to specify. Unix tools probably don't set one, but if you find some well-written GUI app that creates gzipped tarballs, then it should be setting something for the MacType, and you could use that. Then it would work even for the output of that tool, when the files lack one of the standard extensions. But again, if there is no such tool, then just make up a type (and make sure that if you create such files in your tool, you set the type code!). HTH, - Joe -- Joe Strout -- [EMAIL PROTECTED] Verified Express, LLC "Making the Internet a Better Place" http://www.verex.com/ _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html>
