Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!cs.utexas.edu!uunet!intercon!amanda@intercon.uu.net From: amanda@intercon.uu.net (Amanda Walker) Newsgroups: comp.sys.mac.programmer Subject: Re: Config File Resource Blues Message-ID: <1168@intercon.UUCP> Date: 11 Jul 89 17:58:01 GMT References: <7930@hoptoad.uucp> <2013@dogie.macc.wisc.edu> <1165@intercon.UUCP> Sender: news@intercon.UUCP Reply-To: amanda@intercon.uu.net (Amanda Walker) Organization: InterCon Systems Corporation Lines: 34 In article <7930@hoptoad.uucp>, tim@hoptoad.uucp (Tim Maroney) writes: > Amanda, this is exactly the approach Ross Yahnke described in his > message! What are you contributing by reading it right back to him? Hmm. You're right. Oops. My apologies. I seem to have missed the original article. Our machine was dropping incoming news on the floor for a while recently. > this approach is terribly inefficient in terms of > memory usage, since the whole resource map is getting resized and > reshuffled twice. That makes sense, although I tend to regard worrying about memory efficiency while writing to resource files to be on the order of tilting at windmills :-). In particular, I would think that resource maps for a settings files wouldn't be that big (if Ross described using huge numbers of resources in his settings file, I take back that remark,, but I'd argue he's doing something the hard way...). > Except that if you do this using your pseudocode, the default settings > resource in the application file will be removed. Do I have to explain > why it's a no-no to write to your application file? No. What I was referring to was putting a default config resource into the application *at build time*. This way the read_settings routine doesn't have to care whether or not the settings file already exists. The write_settings routine always creates the settings file if it doesn't already exist, so the application never writes to itself. -- Amanda Walker InterCon Systems Corporation -- amanda@intercon.uu.net | ...!uunet!intercon!amanda