Title Banner

Previous Book Contents Book Index Next

Newton Developer Technical Information: Newton Programmer's Guide: 2.1 OS Addendum /
Chapter 7 - Sound / Sound Reference
Protos / protoRecorderView


SetState

recorderview.statusText:SetState(oldState, newState, hasSound)

Sent by the recorder view to indicate a state change when the user taps one of the buttons.

oldState
The recorder view's previous state. The possible values are shown in Table 7-7.

newState
The recorder view's new state. The possible values are shown in Table 7-7.

hasSound
A Boolean that is true if the recorder currently has some sound frames defined. This parameter allows you to determine if the recorder view has any data to play (Boolean is true), or if it has none (Boolean is nil).

return value
Ignored; you can return anything.

DISCUSSION

Each time there's a state change, the recorder view sends this *SetState message to the statusText slot in the view. By default the statusText slot is nil. You can catch state changes by implementing a statusText slot that contains a frame that contains a *SetState method.

The constants described in Table 7-7 are passed for the values of the first and second parameters in the *SetState message.

Table 7-7 protoRecorderView state constants
ConstantValueDescription
kInactive1Sound channel is stopped (default state).
kRecording2Indicates recording is about to be started.
kPlaying4Indicates playing is about to be started.
kPlayPaused8Indicates playing is paused.
kRecordPaused16Indicates recording is paused.
kStopping32Indicates the sound channel is about to be stopped.
kSetupStore64Indicates recording is about to be started.

SEE ALSO

For more details on how to use this method, see "Using the protoRecorderView".


Previous Book Contents Book Index Next

© Apple Computer, Inc.
26 APR 1997



Navigation graphic, see text links

Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help