Article View: comp.sys.next.programmer
Article #2161Re: Can't get OpenPanel to display *.wksp.Z files
From: Andrew Stone
Date: Sat, 19 Dec 1992 16:55
Date: Sat, 19 Dec 1992 16:55
40 lines
2031 bytes
2031 bytes
In article <1992Dec19.001122.28791@newshost.lanl.gov> jpm@lanl.gov (Pat McGee) writes: > > I'm working with an application that creates files with names that > end in .wksp.Z (yes, they are compressed). I'd like to use > OpenPanel to allow me to choose one of these files, with the > other files not visible. > > When I put "wksp.Z" in the types: parameter of the > runModalForDirectory:file:types: method, these files don't show > up. I also have "wksp" in the list; these files show up just like I'd > expect. > > Is there any way I can use OpenPanel to do what I want? > > Has anyone written an equivalent of OpenPanel that I could get the > source code to? > > Do you have any other suggestions? (except the obvious one of not > using .wksp.Z. That's outside my control.) > Pat, I haven't done this exactly, but: Check out the OpenPanel delegate methods: - (BOOL)panelValidateFilenames:sender; - (BOOL)panel:sender filterFile:(const char *)filename inDirectory:(const char *)directory; You probably have to run modal for the .Z type [remember its probablye doing a strrchr on the ".", which explains why .wksp.Z doesn't work, and then further filter the files based on the delegate methods. andrew -- ||<<->>||<<==>>||<<++>>||<<?>>||<<+>>||<<-->>||<<==>>||<<+>>|| !! Andrew Stone !! (505) 345-4800 !! !! andrew@stone.com <> Stone Design Corp !! ||<<->>||<<==>>||<<++>>||<<?>>||<<+>>||<<-->>||<<==>>||<<+>>||
Technical Details
Message-ID:
<1992Dec19.165502.6818@stone.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!ogicse!mimbres.cs.unm.edu!droid!andrewReferences:
<1992Dec19.001122.28791@newshost.lanl.gov>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!ogicse!mimbres.cs.unm.edu!droid!andrew From: andrew@stone.com (Andrew Stone) Newsgroups: comp.sys.next.programmer Subject: Re: Can't get OpenPanel to display *.wksp.Z files Message-ID: <1992Dec19.165502.6818@stone.com> Date: 19 Dec 92 16:55:02 GMT Article-I.D.: stone.1992Dec19.165502.6818 References: <1992Dec19.001122.28791@newshost.lanl.gov> Sender: andrew@stone.com Reply-To: andrew@stone.com Organization: Stone Design Corp Lines: 40