Thread View: comp.sys.next.programmer
2 messages
2 total messages
Started by Pat McGee
Sat, 19 Dec 1992 00:11
Can't get OpenPanel to display *.wksp.Z files
Author: Pat McGee
Date: Sat, 19 Dec 1992 00:11
Date: Sat, 19 Dec 1992 00:11
28 lines
1245 bytes
1245 bytes
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.) Thanks, -- Pat McGee jpm@lanl.gov, (505) 667-4196 Distributed Computing Environments Group, Los Alamos National Laboratory MS B272, P. O. Box 1663, Los Alamos, NM 87545
Re: Can't get OpenPanel to display *.wksp.Z files
Author: 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 !! ||<<->>||<<==>>||<<++>>||<<?>>||<<+>>||<<-->>||<<==>>||<<+>>||
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads