home *** CD-ROM | disk | FTP | other *** search
- Path: 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
-
- 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 !!
- ||<<->>||<<==>>||<<++>>||<<?>>||<<+>>||<<-->>||<<==>>||<<+>>||
-