background image
C H A P T E R 2 4
Built-in Communications Tools
Resource Arbitration Options
24-11
claiming its resources passively and will allow another tool to claim it. If this
value is
nil
, the communications tool is claiming its resources actively and will
not allow another tool to claim it.
The resource-passive state option (
kCMOPassiveState
) has a Boolean value
that specifies whether or not the current state of the communications tool
supports releasing resources. If this value is set, and
kCMOPassiveClaim
is
true
, your communications tool is willing to relinquish use of its passively
claimed resources. If this value is
nil
, the communications tool is not willing to
relinquish use of its passively claimed resources.
Table 24-7 shows the resource arbitration options. These options are described in
detail in "Options for Resource Arbitration" (page 21-82) in Newton Programmer's
Reference
.
The following example demonstrates how to instruct a communications tool to
claim its resources passively. You must do this before binding the tool. By default
all tools are claimed actively.
{
label: kCMOPassiveClaim,
type: 'option,
opCode: opSetRequired,
data: {
arglist: [
true, // passively claim modem
],
typelist: [
kStruct,
kBoolean,
]
}
}
Table 24-7
Resource arbitration options
Label
Value
Use when
Description
kCMOPassiveClaim
"cpcm"
Before bind
Specifies whether your tool claims
resources actively or passively
kCMOPassiveState
"cpst"
Typically
on listen
Specifies whether your tool releases
resources
© 2007-2017, o7 studio » при воспроизведении материала сайта ссылка обязательна