Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!nrl-cmf!ames!xanth!hoptoad!tim From: tim@hoptoad.uucp (Tim Maroney) Newsgroups: comp.sys.mac.programmer Subject: Re: Creating Resources??????? Message-ID: <6569@hoptoad.uucp> Date: 18 Feb 89 16:15:20 GMT References: <4481@hubcap.UUCP> Reply-To: tim@hoptoad.UUCP (Tim Maroney) Organization: Eclectic Software, San Francisco Lines: 19 In article <4481@hubcap.UUCP> mikeoro@hubcap.UUCP (Michael K O'Rourke) writes: >I am trying to create and read from a resource to store user preferences. >I created a data structure with two booleans and two inits. All the data >writes out fine, but when I try to read it back in it gets messed up. > >Volume 1 talks about header, application and reserved data at the beginning >of a resource. I'm not expected to write this out as part of my data structure >am I? I can't figure out what's going on. Sounds like you're using File Manager I/O when you should be using Resource Manager I/O. Use CreateResFile to make the file to store the resource, if it doesn't exist already, then use AddResource to add the resource to the file if it doesn't exist already. If you do this, you can ignore the section on the resource file format with the stuff about headers etc. -- Tim Maroney, Consultant, Eclectic Software, sun!hoptoad!tim "Next prefers its X and T capitalized. We'd prefer our name in lights in Vegas." -- Louis Trager, San Francisco Examiner