Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!apple!usc!sdd.hp.com!uakari.primate.wisc.edu!caen!mondo.engin.umich.edu!mystone From: mystone@mondo.engin.umich.edu (Dean Yu) Newsgroups: comp.sys.mac.programmer Subject: Re: Simple questions regarding MultiFinder and File Referencing Message-ID: <1991Jan17.220745.1621@engin.umich.edu> Date: 17 Jan 91 22:07:45 GMT References: <91048.134609BRBOYER@MTUS5.BITNET> Sender: news@engin.umich.edu (CAEN Netnews) Reply-To: mystone@mondo.engin.umich.edu Organization: Patches 'R' Us, A Wholly Owned Subsidiary of Cyberite Systems Lines: 35 In article <91048.134609BRBOYER@MTUS5.BITNET> BRBOYER@MTUS5.BITNET (Bradley R. Boyer) writes: >I have just strted programming with great respect to MultiFinder. There are >only a few things that I haven't figured out yet. > >Q 1: How do I determine my current open directory by refnum? > - Somehow while I running all over the disk, my output folder > gets changed. When I write my parameters back to disk, it is written > to the wrong folder. I would determine this value when I first run > so I could keep track of it. When your application is first launched, the directory containing your application (or the directory containing the documents you launched with) is set to the default directory. You can get the working directory reference number with a call to _GetVol. >Q 2: How do I determine if Multifinder is running another program? > - I could turn off my windows if I am not currently running. > You can't tell if MultiFinder is running another program, per se, but you can tell when you get switched into the background. If you specify in your 'SIZE' resource that you can accept suspend and resume events, MultiFinder will send you an osEvent (formerly app4Events) when you get switched in and out. You can hide your windows on this event. You should check out the MultiFinder Programmers' Guide for a more detailed description. (The Process Manager chapter in IM VI provides similar info for System 7.) _______________________________________________________________________________ Dean Yu | E-mail: mystone@mondo.engin.umich.edu Patches 'R' Us | Real-mail: Dean Yu A Division of Cyberite Systems | 909 Church St Apt C | Ann Arbor, MI 48104 I'm not the voice of Reason, much | Phone: 313 662-4073 less the voice of Cyberite. | 313 662-4163 -------------------------------------------------------------------------------