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

  1. Path: sparky!uunet!sun-barr!apple!apple!taligent!keith@taligent.com
  2. From: keith@taligent.com (Keith Rollin)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Re: vblCount and Macintosh Programming Secrets
  5. Message-ID: <Bt3p2H.Ap6@taligent.com>
  6. Date: 16 Aug 92 23:54:17 GMT
  7. References: <Bt1wyG.MnL@grayhawk.rent.com>
  8. Sender: usenet@taligent.com (More Bytes Than You Can Read)
  9. Organization: Taligent
  10. Lines: 26
  11.  
  12. In article <Bt1wyG.MnL@grayhawk.rent.com>, rich@grayhawk.rent.com (Richard
  13. Harms) writes:
  14. > On page 501 is the code for a subroutine called MySpinner...  In it, the
  15. > VBLTask field vblCount is reset to a non-zero value only if CrsrBusy is
  16. > equal to zero. My question is, if CrsrBusy is a non-zero value, and the
  17. > vblCount field isn't reset to something non-zero, won't that result in
  18. > the VBL task failing to ever execute again?
  19. > From MPW 411:
  20. > >The task must then reset vblCount, or its entry will be removed 
  21. > >from the queue after it has been executed.
  22.  
  23. Good eye! How does the following look to you:
  24.  
  25. oldA5 = SetA5(myTaskPtr->A5);
  26. if (CrsrBusy == 0)
  27.     SpinCursor(32);
  28. myTaskPtr->theTask.vblCount = pDesiredCount;
  29. (void) Seta5(oldA5);
  30.  
  31. --
  32. Keith Rollin
  33. Phantom Programmer
  34. Taligent, Inc.
  35.