Path: utzoo!attcan!uunet!cs.utexas.edu!rutgers!psuvax1!psuvm!ricevm1.bitnet!mayer-a From: MAYER-A@RICEVM1.BITNET (David Mayer) Newsgroups: comp.sys.mac.programmer Subject: Resource Fork data storage--related question Message-ID: <1715MAYER-A@RICEVM1> Date: 19 Jul 90 18:31:16 GMT References: <1990Jul17.172044.20361@Neon.Stanford.EDU> Distribution: na Organization: Rice University - ICSA Lines: 28 In article <1990Jul17.172044.20361@Neon.Stanford.EDU>, commons@Sunburn.Stanford.EDU (Peter Commons) says: > >I'm currently working on a new multi-user game for the Mac. In thinking about >how I would like my save file to look, it would be very convenient to have >one resource with the main data and one resource with the data for each player >(rather than have all the data sequentially laid out in the data fork) because >the game will only need to look at one player's info at a time. > >Can I do this? If so, should I use my own (non-reserved) resource name? And if >I define my own resource type, how do I specify it's length (or does it >automatically make it as long as the handle I pass it when I call AddResource? > >Thanks in advance. WELL, I have a related question. It may be more of a Pascal question than a Macintosh question, though. I would like to retrieve the contents of a (rather long) array. A resource of my own type seems like a logical structure for this. I know how to load a resource into memory, but I don't see how then to store the contents into an array I've declared... I would appreciate any suggestions or better ideas. Thanks! --David