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 / CyberProgressBroadcaster


ICyberProgressBroadcaster

Initializes this progress broadcaster.

void ICyberProgressBroadcaster (in CyberAbortUPP proc,
in Ptr procData);
proc
A pointer to a programmer-defined function that implements the abort behavior for the progress broadcaster object.
procData
A pointer to data that is to be passed to the callback function.
DISCUSSION
You should call the ICyberProgressBroadcaster method to initialize a newly created CyberProgressBroadcaster object.

The callback function you register implements the behavior of the Abort method; the Abort method calls this function. This allows you to customize the behavior of the Abort method without creating a subclass. You can set the procData parameter to point to some data that you want Cyberdog to pass to the callback function. For example, you might set this parameter to point to the CyberStream object whose progress the progress broadcaster is reporting so that the callback function can call the stream's Abort method.

The following type is used for abort functions. The function takes three parameters: a message code, a pointer to a progress broadcaster, and a pointer to some data; the function returns no value.

typedef void (* CyberAbortProcPtr) (
CDAbortProcMessage msgCode,
CyberProgressBroadcaster* broadcaster,
Ptr userDataPtr)
;
The MyAbortFunction programmer-defined function (page 189) illustrates the form of an abort function.

If you subclass CyberProgressBroadcaster and override this method, your override must call its inherited method.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 JUL 1996