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

  1. Path: sparky!uunet!caen!rphroy!link.ph.gmr.com!rrichter
  2. From: rrichter@link.ph.gmr.com (Roy Richter PH/32)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: TCL, MultiFinder, and Progress Dialogs
  5. Message-ID: <96290@rphroy.ph.gmr.com>
  6. Date: 11 Jan 93 18:30:40 GMT
  7. Sender: news@rphroy.ph.gmr.com
  8. Organization: GM Research and Environmental Staff
  9. Lines: 25
  10. Nntp-Posting-Host: link.ph.gmr.com
  11.  
  12. I want to have a progress dialog up for an operation that takes
  13. over a minute, so I've got the usual text string, and a horizontal
  14. bar that fills up as the operation proceeds.  It would be nice to
  15. also:
  16.  
  17. (1) let the Multifinder take time slices to update other programs,
  18.     I assume that WaitNextEvent will do it;
  19. (2) Have a "Cancel" button the user can push to cancel the 
  20.     operation.  This has me stuck.
  21.  
  22. I use the Class Library to manage the dialogs.  That way, I just
  23. GetGoodClicks and so on.  In this case, I'm not passing control up the
  24. line to let the DeskTop get the click and dispatch it.  I wouldn't want
  25. to break up my operation into a bunch of Tasks, that would be
  26. hard--since I'm updating the progress dialog in a callback.  I'd prefer
  27. the MultiFinder timeout and clicks be self-contained in the callback.
  28. That was I can use the callback in many places, as needed.  Otherwise
  29. I'd need to restucture the code into a Task everytime I thought a
  30. time-slice was needed.
  31.  
  32. Any hints?
  33.  
  34. --
  35. Roy Richter                  Internet: rrichter@ph.gmr.com
  36. Physics Dept, GM Research    UUCP:     rphroy!rrichter
  37.