Path: utzoo!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!pasteur!ames!ncar!tank!kaon!nucsrl!bob From: bob@eecs.nwu.edu (Bob Hablutzel) Newsgroups: comp.sys.mac.programmer Subject: Re: locking INITs Message-ID: <10050009@eecs.nwu.edu> Date: 24 Aug 88 15:19:18 GMT References: <1278@sfmag.UUCP> Organization: Northwestern U, Evanston IL, USA Lines: 31 ... Stuff omitted ... >What's the scoop? Is the system supposed to lock my INIT before executing >it, or do I have to do it myself? If the latter, is it appropriate and >sufficient just to set the Lock attribute for my INIT resource (i.e. in >the resource file on disk) or should I write code (RecoverHandle, HLock, >etc.) to lock myself at run time? And do I have to unlock myself >before returning to the system? In all the INITs I've written I've set the locked bit in the resource header. I would recommend doing this as the fastest and most code efficient way of doing things. Don't bother unlocking it - it will be disposed soon anyhow. >Please indulge me if these are naive questions; this is my first >piece of Mac code and I'm finding that all of the books I've seen >(including I.M.) gloss over a lot of the details. (Is it silly of >me to try programming the Mac without the Tech Notes?) No such thing as naive questions when first writting Mac code :-) One of the biggest problems in programming on the Mac is that details in IM do tend to get glossed over (To prevent flames: other details are covered in great detail). Yes, it is silly to try to program on a Mac without the Tech Notes. Consider them as important as IM itself (sometimes more important). >Kelvin Delbarre, AT&T Bell Labs (UNIX Development), Summit NJ, attunix!kd Bob Hablutzel, Northwestern University ACNS Development BOB@NUACC.ACNS.NWU.EDU