tedj@hpcilzb.HP.COM (Ted Johnson) (10/20/87)
I've written an application in LSC (2.11) that creates its own documents. I have given the application its own custom icon, but have not figured out how to give the documents it creates their own icons (right now the documents are automatically given the generic document icon). Can someone please give me a clue? -Ted P.S. I don't think it's important, but I am running System/Finder 4.1/5.5 on a SE HD20. ***************************************************** Ted C. Johnson Hewlett-Packard, Design Technology Center Santa Clara, CA (408)553-3555 UUCP: ...hplabs!hpcea!hpcid!tedj ******************************************************
brian@hpfclm.HP.COM (Brian Rauchfuss) (10/23/87)
Since I don't have Inside Mac or any source code here, this explanation is going to be a little vague, but here goes... The method of attaching an icon to a document is simular to the method of attaching an icon to a program. First decide the file type id you are going to use for your documents, like 'WORD' for MacWrite documents. Then in your program you need to call the toolbox after you create your document to attach this as the file type and your program id as the owner. Now go into ResEdit and add three new resources to your program, a new bundle, a new FREF and the ICN# you want to use. These should be simular to the ones you created for your program icon, the FREF specifying the file id, and the bundle specifying the FREF and the attached ICN#. Now just set the bundle bit and rebuild the desktop and the finder should give the documents the proper icon. Brian Rauchfuss