Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Cyberdog Programmer's Kit / Part 3 - Cyberdog Reference
Chapter 7 - Classes and Methods


CyberProgressReceiver

Superclasses
ODObject
Subclasses
none
An object of the CyberProgressReceiver class is used to monitor the progress of an asynchronous process.

Description

The CyberProgressReceiver class is an abstract class for monitoring the progress of an asynchronous operation, such as a download operation performed by a Cyberdog stream. You use a progress receiver object together with a progress broadcaster (page 297) and a progress part (page 313) to monitor and display the progress and status of an asynchronous operation.

When an object initiates an asynchronous operation, such as a Cyberdog display part opening a Cyberdog stream, the object can create a corresponding CyberProgressBroadcaster object to represent that process and attach it to a progress part, such as the navigator. The progress part, in turn, attaches a progress receiver to the progress broadcaster object. The object calls the broadcaster's accessor methods periodically to notify it of the status and progress of the asynchronous operation; the broadcaster broadcasts these changes in status and progress to the progress receiver.

Typically, there is a one-to-one relationship between a progress broadcaster object and a progress receiver object. However, if necessary, you can attach multiple progress receivers to a progress broadcaster, or vice versa. For example, if you were downloading multiple images located on a web page, you might represent the downloading of each image as a separate broadcaster, and attach one progress receiver to all the broadcasters to monitor the progress of all the download operations.

The CyberProgressReceiver class is an abstract superclass that you must subclass and implement to create a progress receiver. If you subclass the CyberProgressPartExtension class to create a custom progress part, you must create a corresponding CyberProgressReceiver subclass.

For more information on using progress parts to display progress, see the description of the CyberProgressPartExtension class (page 313).

Methods

This section presents summary descriptions of the CyberProgressReceiver methods grouped according to purpose, followed by detailed descriptions.

Initialization and Cleanup

ICyberProgressReceiver
Initializes this progress receiver.
Attaching and Detaching Processes

BroadcasterAttached
Notifies this progress receiver that it has been attached to a progress broadcaster.
BroadcasterDetached
Notifies this progress receiver that it has been detached from a progress broadcaster.
Retrieving Processes

CountBroadcasters
Retrieves the number of progress broadcasters attached to this progress receiver.
GetBroadcaster
Retrieves a progress broadcaster attached to this progress receiver.
Receiving Progress

ResetProgress
Resets the status and progress attributes of this progress receiver to their default values.
SetAmountDone
Sets a value representing what portion of an asynchronous process has been completed.
SetAmountTotal
Sets a value representing the total amount of work to be completed by an asynchronous process.
SetErrorString
Sets the error string associated with an asynchronous process.
SetProgressMode
Sets the progress mode associated with an asynchronous process.
SetProgressPercent
Sets the percentage of an asynchronous process that has been completed.
SetStatusString
Sets the status string associated with an asynchronous process.

Methods
BroadcasterAttached
BroadcasterDetached
CountBroadcasters
GetBroadcaster
ICyberProgressReceiver
ResetProgress
SetAmountDone
SetAmountTotal
SetErrorString
SetProgressMode
SetProgressPercent
SetStatusString

Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 JUL 1996