home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / next / programm / 7846 < prev    next >
Encoding:
Text File  |  1992-12-21  |  1.9 KB  |  54 lines

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!ogicse!mimbres.cs.unm.edu!droid!andrew
  2. From: andrew@stone.com (Andrew Stone)
  3. Newsgroups: comp.sys.next.programmer
  4. Subject: Re: Can't get OpenPanel to display *.wksp.Z files
  5. Message-ID: <1992Dec19.165502.6818@stone.com>
  6. Date: 19 Dec 92 16:55:02 GMT
  7. Article-I.D.: stone.1992Dec19.165502.6818
  8. References: <1992Dec19.001122.28791@newshost.lanl.gov>
  9. Sender: andrew@stone.com
  10. Reply-To: andrew@stone.com
  11. Organization: Stone Design Corp
  12. Lines: 40
  13.  
  14. In article <1992Dec19.001122.28791@newshost.lanl.gov> jpm@lanl.gov (Pat  
  15. McGee) writes:
  16. > I'm working with an application that creates files with names that
  17. > end in .wksp.Z (yes, they are compressed). I'd like to use
  18. > OpenPanel to allow me to choose one of these files, with the
  19. > other files not visible.
  20. > When I put "wksp.Z" in the types: parameter of the  
  21. > runModalForDirectory:file:types: method, these files don't show
  22. > up. I also have "wksp" in the list; these files show up just like I'd  
  23. > expect.
  24. > Is there any way I can use OpenPanel to do what I want?
  25. > Has anyone written an equivalent of OpenPanel that I could get the  
  26. > source code to?
  27. > Do you have any other suggestions? (except the obvious one of not  
  28. > using .wksp.Z. That's outside my control.)
  29.  
  30. Pat, I haven't done this exactly, but:
  31.  
  32. Check out the OpenPanel delegate methods:
  33.  
  34. - (BOOL)panelValidateFilenames:sender;
  35. - (BOOL)panel:sender filterFile:(const char *)filename inDirectory:(const  
  36. char *)directory;
  37.  
  38. You probably have to run modal for the .Z type [remember its probablye  
  39. doing a strrchr on the ".", which explains why .wksp.Z doesn't work, and  
  40. then further filter the files based on the delegate methods.
  41.  
  42. andrew
  43. -- 
  44. ||<<->>||<<==>>||<<++>>||<<?>>||<<+>>||<<-->>||<<==>>||<<+>>||
  45. !!      Andrew Stone          !!        (505) 345-4800      !!
  46. !!    andrew@stone.com        <>       Stone Design Corp    !!
  47. ||<<->>||<<==>>||<<++>>||<<?>>||<<+>>||<<-->>||<<==>>||<<+>>||
  48.