beautypg.com

Apple Newton Programmer’s Newton 2.0 (for Newton 2.0) User Manual

Page 692

background image

C H A P T E R 1 9

Built-in Applications and System Data

19-18

Dates

and a frame containing the definition of the new meeting type. This frame has the
following slots; see “RegMeetingType” (page 16-48) in Newton Programmer’s
Reference
for full details:

Slot description

item

Required. A string that is the meeting type name to appear in
the New picker.

icon

Required. The icon shown in the New picker. It should be no
larger than 24x15 pixels.

NewMeeting

Required.

Method called if the user chooses this meeting type

in the New picker.

smallIcon

Optional. The icon displayed in the meeting slip. It should be
no more than 12 pixels high. If this icon is not provided,

icon

is used, which may look ugly.

OpenMeeting

Optional. Method called when user taps an icon for a
meeting or event of this type. If this method is not provided,
Dates opens the default meeting slip.

memory

Optional. Where to store meeting titles of this type.

The

NewMeeting

method is passed in the date and time the note was created and

the

viewBounds

of the Dates application. It must create a meeting (or event)

using either

AddAppointment

(or

AddEvent

), and must add a slot to the

appointment created called

meetingType

. This slot must be set to the symbol

that identified the meeting type in the call to

RegMeetingType

. Remember to

call

EntryChange

to save this new slot.

If

NewMeeting

returns the meeting (or event) created, Dates then opens the

default meeting slip. You may also return

nil

from

NewMeeting

, in which case

you must have already opened the meeting slip from within

NewMeeting

. The

meeting slip should be opened by using the Dates method

RememberedOpen

,

which records this so that Dates can close the view, if Dates is closed. Use

RememberedClose

to close this view.

If you do define a custom meeting slip, you should also define an

OpenMeeting

method. This method is called when the user taps an icon of the type you have
created. For more information see

OpenMeeting

(page 16-50) in Newton

Programmer’s Reference.