home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!sdd.hp.com!uakari.primate.wisc.edu!ames!pacbell.com!network.ucsd.edu!ucsbcsl!mcl!scott
- From: scott@mcl.ucsb.edu (Scott Bronson)
- Newsgroups: comp.sys.mac.programmer
- Subject: Re: Accessing an INIT File after StartUp?
- Message-ID: <scott.714446609@mcl>
- Date: 22 Aug 92 01:23:29 GMT
- References: <8103@sirius.ucs.adelaide.edu.au> <BsMnKF.Mpz@taligent.com> <63766@cup.portal.com>
- Sender: root@ucsbcsl.ucsb.edu
- Lines: 18
-
- In <63766@cup.portal.com> Chewy@cup.portal.com (Paul Frederick Snively) writes:
-
- >I'd also like to point out that there's a Toolbox/OS Code Snippet on various
- >of the Developer CD series that contains a Snippet that I wrote, called
- >KeepMeAround, that performs some admittedly sick jiggery-pokery with a
- >one-shot patch to CloseResFile and some skullduggery with the resource chain
- >that keeps the INIT's file open until the system is restarted.
-
- Yes, but PLEASE don't use this technique to keep your file open forever
- for something as menial as a dialog box. Just imagine if every INIT you
- had kept its file open--even though FCBs are dynamically allocated, we'd
- still be inviting problems. The original poster said he wanted to keep
- a dialog box around. How about creating only the DITL, setting its
- system bit, loading and detaching it, then calling NewDialog() passing
- it your detached DITL handle? Just make sure that your DITL doesn't use
- any PICT, ICON, or CNTL resources--those must all be user items.
-
- - Scott
-