Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!wuarchive!cs.utexas.edu!tut.cis.ohio-state.edu!purdue!haven!mimsy!midway!ellis.uchicago.edu!dwal From: dwal@ellis.uchicago.edu (David Walton) Newsgroups: comp.sys.mac.system Subject: Re: How to add startup icon to one that doesn't? Message-ID: <1990Aug6.211356.2710@midway.uchicago.edu> Date: 6 Aug 90 21:13:56 GMT References: <1841@petsd.UUCP> <1990Aug4.214719.24490@midway.uchicago.edu> <1967@ux.acs.umn.edu> Sender: news@midway.uchicago.edu (News Administrator) Organization: U. Chicago Computing Organizations, Academic and Public Comp. Lines: 85 In a previous post, I write: >>First, You can't show an INIT's ICN# just by cutting and pasting >>resources: you have to do it in code. > In article <1967@ux.acs.umn.edu> clarson@ux.acs.umn.edu (Chaz Larson) writes: >David, I've done just this at least a dozen times. Open the INIT >with ResEdit, >find an INIT resource named "ShowINIT", copy and paste >it into the target file, >and create/number ICON/ICN#s to accomplish >the deed. >In fact, I created a joke INIT for a friend's birthday just this >way. The file contained only two resources; the ShowINIT resource >and the ICN# to be shown, which was some cake or something. I >changed the filetype to "INIT" and dropped it into the System >folder, where it worked fine. Which doesn't mean that you don't still do it in code. It's simply that the resource you're cutting and pasting is an INIT resource designed to do what I/you described. In the aforementioned post, I continued to write: > Second, ShowINIT isn't a resource, it's a procedure written in >assembly language which is called by the INIT resource to show its >ICN#. In fact, it's the procedure which I mentioned in my original >reply. You can't just cut and paste this portion of the INIT code >with ResEdit; you have to put in a call to ShowINIT in the INIT code >itself, with the resource ID of the ICN# you want to display as one of >the parameters. Then Chaz continues... >Not true. It is true that ShowINIT was originally written in >assembler, but it compiles into an INIT resource, which can be cut ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Strictly speaking, no. The ShowINIT code can be included in an INIT resource, but it does not compile into a separate INIT resource unless you link it that way. And Apple, to my knowledge, still distributes the source/object code for the procedure (they may distribute it as an INIT resource, too). The original author did not make clear that the resource he referred was an INIT called ShowINIT or another type of resource. My point was that you in fact have to somehow include the code from the ShowINIT procedure (unless, of course, you want to write it yourself). >and pasted with ResEdit just fine. I'll be glad to mail you an >example, if you wish. This is basically what I mentioned in the last part of my post, i.e., that it's quite possible (as others pointed out) to add a second INIT resource to the INIT file which can grab the ICN# and display it. My point (however poorly expressed) is that you can't really cut and paste the ShowINIT _procedure_ into an _existing_ INIT resource. Cutting and pasting a resource that's named ShowINIT, which is in itself a complete CODE resource, is different from adding a procedure into an existing CODE resource. Several people have mentioned that there are utilities which will grab a file's ICN# and insert the second INIT resource automatically; it sound like at least one of these names the new INIT resource 'ShowINIT'--entirely appropriately. I don't think that all of them do, however, which means that you won't always find a ShowINIT resource to cut and paste. The drawback, as I stated repeatedly, is that this solution doesn't reflect the success or failure of the INIT's task. Most INITs use ShowINIT to indicate that they did or did not do something successfully, and this solution just grabs one ICN# and displays it regardless of the runtime conditions of the other INIT. In any case, I've wasted enough bandwidth on this subject... > >-- -- David Walton Internet: dwal@midway.uchicago.edu University of Chicago { Any opinions found herein are mine, not } Computing Organizations { those of my employers (or anybody else). }