home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sys / amiga / programm / 12429 < prev    next >
Encoding:
Internet Message Format  |  1992-08-18  |  853 b 

  1. Path: sparky!uunet!portal!cup.portal.com!Tony-Preston
  2. From: Tony-Preston@cup.portal.com (ANTHONY FRANCIS PRESTON)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Getting rid of requesters
  5. Message-ID: <64215@cup.portal.com>
  6. Date: Tue, 18 Aug 92 07:20:30 PDT
  7. Organization: The Portal System (TM)
  8. References:  <1992Aug15.220923.9546@CS.ORST.EDU>
  9. Lines: 17
  10.  
  11. Try adding the code:
  12.  
  13.  long oldval;
  14.  struct Process *me;
  15.  
  16.  me = (struct Process *)FindTask(0);
  17.  oldval = me->pr_WindowPtr;   /* save old value */
  18.  
  19.  me->pr_WindowPtr = -1;   /* disable all requestors */
  20.  
  21.  ....[do whatever you want...]...
  22.  
  23.  me->pr_WindowPtr = oldval;   /* put the old value back */
  24.  
  25.  This disables the requestor and returns error/cancel.  For example if
  26.  you write to a disk and the disk is full, you will get an error back
  27.  on the write.  You will not get the system requestor.
  28.