home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / mac / programm / 21027 < prev    next >
Encoding:
Text File  |  1993-01-08  |  2.0 KB  |  51 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!camex!lloyd!kent
  3. From: kent@lloyd.Camex.COM (Kent Borg)
  4. Subject: Re: Proper way to do Self-Modifying code?
  5. Message-ID: <1993Jan08.125014.4740@lloyd.Camex.COM>
  6. Organization: Camex Inc., Boston MA
  7. References: <1993Jan4.120353.16699@kth.se> <1993Jan05.163138.20910@lloyd.Camex.COM> <NEERI.93Jan7232329@iis.ethz.ch>
  8. Date: Fri, 08 Jan 1993 12:50:14 EST
  9. Lines: 40
  10.  
  11. In article <NEERI.93Jan7232329@iis.ethz.ch> neeri@iis.ethz.ch (Matthias Neeracher) writes:
  12. >In article <1993Jan05.163138.20910@lloyd.Camex.COM>, kent@lloyd.Camex.COM (Kent Borg) writes:
  13. >> Yes, trivial, so instead consider my post as follows: How should one
  14. >> find one's A5 world from within a sleep queue procedure?
  15. >
  16. >I have never written a sleep queue proc, but wouldn't the following work ?
  17. >
  18. >TYPE TheBigSleep =
  19. >   RECORD
  20. >      sleepy :        SleepQRec;
  21. >      wonderfulWorld: A5WorldPtr; /* Whatever you want */
  22. >   END;
  23. >...
  24. >valium : TheBigSleep;
  25. >...
  26. >SleepQInstall(@valium);
  27. >
  28. >According to TFM, your sleep routine will be called with a pointer to
  29. >valium in A0 that it can cast to the appropriate type. Am I missing anything ?
  30.  
  31. No, you are not missing anything, I was the one missing.  Sure looks
  32. like that will work.
  33.  
  34. Um, though a healthy dose of "RTFM" is appropiate here, I think there
  35. is also a little of another effect: "It is always in the *first* place
  36. you look, you just weren't looking carefully enough when you looked
  37. there because you didn't yet know how lost it was."
  38.  
  39. I spotted the A0 note, realized that it was not a pointer to my A5,
  40. nor was it a refcon, so I looked further.  By the time I realized that
  41. there was no A5 or refcon sitting waiting for me I had forgotten that
  42. I might use A0 to *find* one.  Stupid I am sometimes.
  43.  
  44. Thanks for the help.
  45.  
  46. --
  47. Kent Borg            kent@camex.com or kentborg@aol.com (when it is *working*)
  48.                                             H:(617) 776-6899  W:(617) 426-3577
  49. As always, things look better when some costs are left out.
  50.                               -Economist 3-28-92 p. 94
  51.