Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!wuarchive!psuvax1!psuvm!cxt105 From: CXT105@psuvm.psu.edu (Christopher Tate) Newsgroups: comp.sys.mac.programmer Subject: Re: creating resources Message-ID: <91080.214743CXT105@psuvm.psu.edu> Date: 22 Mar 91 02:47:43 GMT References: <1065@ub.d.umn.edu> <1991Mar21.234809.26603@ux1.cso.uiuc.edu> Organization: Penn State University Lines: 27 In article <1991Mar21.234809.26603@ux1.cso.uiuc.edu>, resnick@cogsci.uiuc.edu (Pete Resnick) says: >1. You *really* don't want to create a resource with thousands >of integers anyway. There is a Tech Note on why not to abuse >the Resource Manager in just this way. I would be much better >to use the data fork of the file to store your integers. If >you need them in memory, just read them into a handle from there. Why not? A resource with a thousand integers is only a couple or four thousand bytes -- peanuts, compared to a lot of the color PICT resources floating around out there.... What's wrong with putting them in a resource, and using GetResource() to load them into a relocatable block in the heap? At that point, you can call DetachResource() to let the Resource Mangler forget about them, and then play whatever games with the block that you want. IMHO, that's a lot prettier than storing them in your app's data fork.... ------- Christopher Tate | Student-Type Person | Migratory lifeform with a cxt105@psuvm.psu.edu | tropism for bookstores. {...}!psuvax1!psuvm.bitnet!cxt105 | cxt105@psuvm.bitnet |