home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / mac / programm / 21208 < prev    next >
Encoding:
Internet Message Format  |  1993-01-11  |  1.8 KB

  1. Path: sparky!uunet!gatech!paladin.american.edu!darwin.sura.net!haven.umd.edu!news.umbc.edu!comb1.comb.umd.edu!stern
  2. From: stern@comb1.comb.umd.edu (Brian Stern; COMB)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Re: TCL, MultiFinder, and Progress Dialogs
  5. Date: 11 Jan 1993 16:16 EST
  6. Organization: University of Maryland, Center of Marine Biotechnology
  7. Lines: 25
  8. Distribution: world
  9. Message-ID: <11JAN199316162844@comb1.comb.umd.edu>
  10. References: <96290@rphroy.ph.gmr.com>
  11. NNTP-Posting-Host: comb1.comb.umd.edu
  12. News-Software: VAX/VMS VNEWS 1.41    
  13.  
  14. In article <96290@rphroy.ph.gmr.com>, rrichter@link.ph.gmr.com (Roy Richter PH/32) writes...
  15. >I want to have a progress dialog up for an operation that takes
  16. >over a minute, so I've got the usual text string, and a horizontal
  17. >bar that fills up as the operation proceeds.  It would be nice to
  18. >also:
  19. >(1) let the Multifinder take time slices to update other programs,
  20. >    I assume that WaitNextEvent will do it;
  21. >(2) Have a "Cancel" button the user can push to cancel the 
  22. >    operation.  This has me stuck.
  23. >
  24. Call WNE with a mDownMask. If it returns true then call FindControl to get
  25. the control handle (pass it theEvent.where as the point) and then
  26. TrackControl. If TrackControl tells you that the mouseup occurred in
  27. your cancel button then go ahead and cancel the operation. Note that Apple
  28. now recommends a distinction between a 'Cancel' button and a 'Stop' button
  29. where the first results in a complete return to the conditions before the
  30. operation was started and the latter merely interuppts the operation. So if
  31. the operation were copying files 'cancel' would delete any files that had 
  32. been copied up to the point when the cancel button was hit and 'Stop' would
  33. leave any files which had already been copied but wouldn't copy any more.
  34.  
  35. Brian Stern
  36. Stern@mbimail.umd.edu
  37.  
  38.