Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!lll-crg!nike!ucbcad!ucbvax!decvax!decwrl!sun!idi!apple!tomas From: tomas@apple.UUCP Newsgroups: net.micro.mac Subject: Re: Request for help with Standard File Message-ID: <141@apple.UUCP> Date: Wed, 20-Aug-86 13:08:37 EDT Article-I.D.: apple.141 Posted: Wed Aug 20 13:08:37 1986 Date-Received: Sat, 23-Aug-86 22:00:17 EDT References: <15332@ucbvax.BERKELEY.EDU> Reply-To: tomas@apple.UUCP (Tom Taylor) Organization: Apple Computer Inc., Cupertino, USA Lines: 37 In article <15332@ucbvax.BERKELEY.EDU> carlton@ernie.Berkeley.EDU (Mike Carlton) writes: > >I'm using SFGetFile, (actually SFPGetFile, which is the same except that I'm >giving it a custom dialog), and I want to present one of two groups of files, >based on which of a pair of radio buttons is active. What I've done is told >SFGetFile to display all types of files, and then I use the file filter >procedure to filter out one of the two groups after it reads the status of >the radio buttons. > >The problem comes when the user hits the other radio button: I want the file >list to display a different group of files now. So, I need SFGetFile to read >the volume info again and call my file filter for each file. These are the >same actions as if you hit the Drive button, but it must apply to the current >disk. > >Any ideas on how to do this? I've tried posting a disk event for the drive >holding the current disk (thinking to fool SF by telling it the disk has just >been inserted), but it either ejects the disk or ignores the event. I've also >tried decrementing the global value SFSaveDisk (which contains the current disk >number) and telling SF that the Drive button was hit, but it ignores the value >and just writes a new value after cycling to the next drive. > >Just to make things more interesting, it needs to be done in a "safe" way, e.g. >no jumping into the code of Pack3, as there are already at least 2 versions of >Standard File and there may be more. > >Thanks in advance for any ideas. > >Mike Carlton > >"Bugs Mr. Rico, zillions of them" -- Starship Trooper To make SFGetFile or SFPGetFile redraw the whole list simply have the Dialog Hook routine return 101. Macintosh Technical Note #47 describes your exact situation and even has the source code to an example. Tom Taylor