Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!ames!oliveb!apple!keith From: keith@Apple.COM (Keith Rollin) Newsgroups: comp.sys.mac.programmer Subject: Re: FilterProc with Standard File Message-ID: <30545@apple.Apple.COM> Date: 12 May 89 04:57:40 GMT References: <2768@natinst.natinst.com> Organization: Apple Computer Inc, Cupertino, CA Lines: 41 In article <2768@natinst.natinst.com> brian@natinst.com (Brian H. Powell) writes: > We want to use our own FilterProc (not the file-filter type, but the >modal dialog type) with Standard file (SFPGetFile, SFPPutFile). > The problem is that we lose the ability to handle things like > * typing scrolls the list of files > * arrow keys scrolling the list of files > * tab switches disks > * popup on the folder name shows you a list of folders > * etc. (You know, all the normal stuff you usually see.) > > How can we get all this behavior and have our own filterProc also? It >appears that Standard File is using it's own filterProc if you don't supply >one, and it does most of this stuff for you. The Proc is in the middle of the >PACK resource somewhere, so there's no convenient way of programmatically >getting to the right code. > > Any suggestions, either on how to get the Mac to do what we want >directly, or on how to duplicate the operation of the Standard File filter in >our own filter? > Brian, The Sample Code disks (yes, there are two in the next batch) will contain a sample chock(sp?) full of SF samples. In the meantime, you should be able to do what you want. Without seeing your program, I don't know for sure what is going on, or even which filter your are trying to use (there are actually 3). If you are really using the ModalDialog filter, then it sounds like you aren't returning TRUE, saying that you didn't handle the event and that someone else should. In this case, that someone else is Standard File. I demonstrate all 3 kinds of filtering in this sample program, so you should be able to find what you need there. It is on Phil and Dave's Excellent CD, which will be mailed to all developers soon (if you didn't get it at the Developer's Conference). ------------------------------------------------------------------------------ Keith Rollin --- Apple Computer, Inc. --- Developer Technical Support INTERNET: keith@apple.com UUCP: {decwrl, hoptoad, nsc, sun, amdahl}!apple!keith "Argue for your Apple, and sure enough, it's yours" - Keith Rollin, Contusions