Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!purdue!haven!umd5!zben From: zben@umd5.umd.edu (Ben Cranston) Newsgroups: comp.sys.mac.programmer Subject: Re: INIT getting it's file name... Summary: What about init extenders??? Message-ID: <5511@umd5.umd.edu> Date: 26 Oct 89 18:01:44 GMT References: <56505@tiger.oxy.edu> <4020@helios.ee.lbl.gov> Reply-To: zben@umd5.umd.edu (Ben Cranston) Distribution: usa Organization: University of Maryland, College Park Lines: 23 In article <56505@tiger.oxy.edu> sonenbli@oxy.edu (Andrew D. Sonenblick) writes: > Ok, this is a quick one but it is very important: is there any way > for an INIT to get the name of the file it is in? I need to later open > the resource fork of the file and I want the user to be able to change the > name of the file; hence, my INIT needs to be able to read in the file name. In article <4020@helios.ee.lbl.gov> beard@ux1.lbl.gov (Patrick C Beard) writes: > The best way is to give your init file a unique creator type. MacDTS > registers these so that developers won't have conflicts. Then, since > you know that the type of your file is 'INIT', just search through > the system folder (every time you need your file) searching for your > file with creator = '!&*(' and type = 'INIT' ... I'd worry about INIT expanders running inits from other folders than the system folder. Maybe the best thing would be to save the folder number and file name and reopen it later... -- Sig DS.L ('ZBen') ; Ben Cranston * Computer Science Center Network Infrastructures Group * University of Maryland at College Park