Reporting progress 17 – Apple Newton Programmer’s Newton 2.0 (for Newton 2.0) User Manual

Page 644

Advertising
background image

C H A P T E R 1 7

Additional System Services

17-28

Summary of Additional System Services

Functions and Methods

17

myApp

:AlarmsEnabled() //call PeriodicAlarms?

myApp

:PeriodicAlarms(

alarm

) //called when periodic alarm

//triggers

AddAlarm(

alarmKey

,

time

,

argsArray

,

callBackFn

,

callBackParams

) //adds

//an alarm

AlarmUser(

title

,

message

) //brings up slip

RemoveAlarm(

alarmKey

) //removes alarms

GetAlarm(

alarmKey

) //gets an alarm

GetAppAlarmKeys(

alarmKeySuffix

) //gets an app’s alarm keys

RemoveAppAlarms(

alarmKeySuffix

) //removes an app’s alarms

view

:Notify(

level

,

headerStr

,

messageStr

) //brings up slip

Reporting Progress

17

Proto

17

aProtoStatusTemplate := { // report asynch task progress

_proto: protoStatusTemplate,

viewBounds :

boundsFrame

,

//bounds of slip

initialSetup:

frame

,

// initial setup values frame

ViewSet: func(

setup

),

// update the view

UpdateIndicator: func(

setup

), // change progress indicator

CancelRequest: func(

why

),

// called on cancel

...

}

Functions and Methods

17

contextView

:SetMessage(

msgText

)// for user msgs in find slip

DoProgress(

kind

,

options

,

workFunc

) // for synchronous tasks

notifyIcon

:AddAction(

title

,

cbFn

,

args

) //adds action to notify

//icon

notifyIcon

:KillAction(

obj

) //removes action from notify icon

ShowBusyBox(

showIt

) //shows/hides busy box - Platform file

//function

Advertising