Path: utzoo!attcan!uunet!husc6!bbn!rochester!pt.cs.cmu.edu!andrew.cmu.edu!rj0z+ From: rj0z+@andrew.cmu.edu (Robert George Johnston, Jr.) Newsgroups: comp.sys.mac.programmer Subject: Changing Resources Message-ID: Date: 18 Oct 88 16:31:11 GMT Organization: Carnegie Mellon Lines: 26 I am having a very hard time understanding why I cannot change a resource easily. Now, what am I doing wrong? I get a resource from a file: TheRes := GetResource(Type, ID); I use this resource for a while. And then allocate a new handle: NewRes := NewHandle(NewSize); I fill this handle with some data. Now, I want to replace the first resource with this new data. So, I tried: RmveResource(TheRes); DisposHandle(TheRes); AddResource(NewRes, Type, ID, Name); The call to AddResource is given the same Type, ID and Name of the original resource. AddResource returns NoErr. When I look in ResEdit, the resource data is invalid, and is usually huge. (GetInfo on the resource once told me that its size was approximately 1500K, but the file was only around 300 bytes.) Any help will be appreciated. Rob Johnston.