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