Path: utzoo!yunexus!geac!syntron!jtsv16!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!pasteur!agate!bionet!apple!han From: han@Apple.COM (Byron Han, Architect) Newsgroups: comp.sys.mac.programmer Subject: Re: Help! 2 Mac programming questions Message-ID: <19661@apple.Apple.COM> Date: 28 Oct 88 22:08:56 GMT Article-I.D.: apple.19661 References: <31482@bbn.COM> <5775@hoptoad.uucp> Organization: Apple Products - Networking & Communications Lines: 29 In article <5775@hoptoad.uucp> tim@hoptoad.UUCP (Tim Maroney) writes: >In article <31482@bbn.COM> dtani@BBN.COM (Dan Tani) writes: >>1) How do I get an application to launch and then open a data file by double >>clicking on that data file? > >The application has to have a bundle, with all that entails (version resource, >bundle bit set, FREFs) and the bundle has to refer to an FREF for the file >type of the doucment file. Also, the creator of the document has to be the >same as the creator of the application. > Also look at Inside Macintosh Volume II, chapter on Segment Loader about the CountAppFiles which returns how many files were selected from the Finder and opened (or printed). GetAppFiles will return the names of the files as well as file type and volume reference number. Note that under MultiFinder, if you double click on a file in the Finder and the application is already open, patches are made to standard file and a fake "Open" selection from the "File" menu is made. Appropriate details are available in the MultiFinder Developers Package I believe. Hope this helps. ------------------------------------------------------------------------------ Byron Han, Communications Architect The Journey Is The Reward... Apple Computer, Inc. ------------------------------------- 20525 Mariani Ave, MS27Y Internet: han@apple.COM Cupertino, CA 95014 UUCP:{sun,voder,nsc,decwrl}!apple!han -------------------------------------- GENIE: BYRONHAN ATTnet: 408-974-6450 Applelink: HAN1 CompuServe: 72167,1664 ------------------------------------------------------------------------------