home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sys / mac / programm / 14351 < prev    next >
Encoding:
Internet Message Format  |  1992-08-21  |  1.4 KB

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