Apple Newton Utilities Guide de l'utilisateur Page 1

Naviguer en ligne ou télécharger Guide de l'utilisateur pour Logiciel Apple Newton Utilities. Apple Newton Utilities User`s guide Manuel d'utilisatio

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 942
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 0
Addison-Wesley Publishing Company
Reading, Massachusetts Menlo Park, California New York
Don Mills, Ontario Harlow, England Amsterdam Bonn
Sydney Singapore Tokyo Madrid San Juan
Paris Seoul Milan Mexico City Taipei
Newton Programmer’s Guide
For Newton 2.0
Vue de la page 0
1 2 3 4 5 6 ... 941 942

Résumé du contenu

Page 1 - Newton Programmer’s Guide

Addison-Wesley Publishing CompanyReading, Massachusetts Menlo Park, California New YorkDon Mills, Ontario Harlow, England Amsterdam BonnSydney Singapo

Page 2

xSelection Tab Protos 7-25Gauges and Slider Protos 7-25Time Protos 7-27Special View Protos 7-28View Appearance Protos 7-30Status Bar Protos 7-31Chapte

Page 3 - Table of Contents

CHAPTER 3 Views3-16 About ViewsvjParentCenterV64 The difference between the top and bottom view bounds is used as the height of the view. If you speci

Page 4 - Getting Started 2-1

CHAPTER 3ViewsAbout Views 3-171For views of the clParagraphView class, the vertical alignment constants vjTopV, vjCenterV, and vjBottomV apply only to

Page 5 - Views 3-1

CHAPTER 3 Views3-18 About ViewsFigure 3-7 View alignment effectsHorizontal alignment of view contents Vertical alignment of view contentsJustify v jFu

Page 6

CHAPTER 3ViewsAbout Views 3-19Figure 3-7 View alignment effects (continued)View Alignment effects2Figure 3-7 continuedBasic Views / Newton Programmer&

Page 7 - NewtApp Applications 4-1

CHAPTER 3 Views3-20 About ViewsviewOriginX and viewOriginY Slots 3These slots can be read but not written or set. Instead, use Setorigin to set the or

Page 8

CHAPTER 3ViewsAbout Views 3-21IMPORTANTMany views need no fill pattern, so you may be inclined to set the fill pattern to “none” when you create such a

Page 9

CHAPTER 3 Views3-22 About ViewsDrawing Transfer Mode for Views 3The viewTransferMode slot specifies the transfer mode to be used for drawing in the vie

Page 10

CHAPTER 3ViewsAbout Views 3-23Opening and Closing Animation Effects 3Another attribute of a view that you can specify is an animation that occurs when

Page 11 - Recognition 9-1

CHAPTER 3 Views3-24 About Views fxZoomCloseEffect—opposite of fxZoomOpenEffect. This value shrinks the image of the view from a point in the center u

Page 12

CHAPTER 3ViewsAbout Views 3-25_parent Contains a reference to the parent template. This slot is created when the view opens. Note that it’s best to us

Page 13

xiHandling Input Events 8-38Testing for a Selection Hit 8-38Summary of Text 8-39Text Constants and Data Structures 8-39Views 8-42Protos 8-43Text and I

Page 14

CHAPTER 3 Views3-26 About ViewsIMPORTANTRemember that the viewChildren and stepChildren arrays contain templates, not views. If you try to send a mess

Page 15

CHAPTER 3ViewsAbout Views 3-27Declaring a View 3Before diving into the discussion of view instantiation, it is important to understand the term declar

Page 16 - Drawing and Graphics 13-1

CHAPTER 3 Views3-28 About ViewsFor a more detailed technical description of the inner workings of declaring a view, see Appendix A, “The Inside Story

Page 17

CHAPTER 3ViewsAbout Views 3-295. The viewChildren and stepChildren slots are read and the child views are instantiated using this same process. As par

Page 18 - Filing 15-1

CHAPTER 3 Views3-30 About ViewsView Compatibility 3The following new functionality has been added for the 2.0 release of Newton System Software. See t

Page 19 - Find 16-1

CHAPTER 3ViewsAbout Views 3-31New Alignment Flags 3The viewJustify slot contains new constants that allow you to specify that a view is sized proporti

Page 20

CHAPTER 3 Views3-32 Using ViewsNew Warning Messages 3Warning messages are now printed to the inspector when a NewtonScript application calls a view me

Page 21 - Intelligent Assistant 18-1

CHAPTER 3ViewsUsing Views 3-33Displaying, Hiding, and Redrawing Views 3To display a view (and its visible child views), send it one of the following v

Page 22

CHAPTER 3 Views3-34 Using ViewsShowing a Hidden View 3In many cases, you might think that you need to create a view dynamically. However, if the templ

Page 23

CHAPTER 3ViewsUsing Views 3-35If at some point after the child views have been created you want to modify the contents of the stepChildren array and b

Page 24

xiiRecognizing Standard Gestures 9-25Combining View Flags 9-26Recognizing Text 9-27Recognizing Punctuation 9-28Suppressing Spaces Between Words 9-28Fo

Page 25 - Routing Interface 21-1

CHAPTER 3 Views3-36 Using ViewsTo remove a view created by AddStepView, use the RemoveStepView function. This function takes two parameters: the paren

Page 26

CHAPTER 3ViewsUsing Views 3-37needed values. Your template is only a two-slot object in RAM. The user proto resides in the package with the rest of yo

Page 27 - Transport Interface 22-1

CHAPTER 3 Views3-38 Using ViewsEach of the three return values contains three elements: Element 0: the subview that is highlighted. This subview is u

Page 28 - Endpoint Interface 23-1

CHAPTER 3ViewsUsing Views 3-39Typically, modal views are used for slips. For example, if the user was going to delete some data in your application, y

Page 29 - Modem Setup Service 25-1

CHAPTER 3 Views3-40 Using ViewsAnimating Views 3There are four view methods that perform special animation effects on views. They are summarized here:

Page 30 - Utility Functions 26-1

CHAPTER 3ViewsUsing Views 3-41 GetDropDataScript— is sent to the source view when the destination view is found. ViewDropScript— is sent to the dest

Page 31 - Index IN-1

CHAPTER 3 Views3-42 Using ViewsIn the latter kind of scrolling, the child views are moved within the parent view by changing their view bounds. Newly

Page 32

CHAPTER 3ViewsUsing Views 3-43To determine if a given view is highlighted, check the vSelected bit in the viewFlags. vSelected should not be set by yo

Page 33 - Figures and Tables

CHAPTER 3 Views3-44 Using ViewsTo lay out a view containing a vertical column of child views, send the view the messageLayoutColumn.Optimizing View Pe

Page 34 - Stationery 5-1

CHAPTER 3ViewsUsing Views 3-45views). Also, if there are multiple dirty views that are in different view hierarchies, their closest common ancestor vi

Page 35 - Controls and Other Protos 7-1

xiiiProviding the _recogPopup Slot 10-22Accessing Correction Information 10-23Using Custom Dictionaries 10-24Creating a Custom Enumerated Dictionary 1

Page 36

CHAPTER 3 Views3-46 Using Viewsview of your application, you should set to nil those slots that aren’t needed when the application is closed, since th

Page 37

CHAPTER 3ViewsSummary of Views 3-47Summary of Views 3Constants 3Class ConstantsviewFlags ConstantsConstant ValueclView74clPictureView76clEditView77clK

Page 38

CHAPTER 3 Views3-48 Summary of ViewsviewFormat ConstantsConstant ValuevfNone0vfFillWhite1vfFillLtGray2vfFillGray3vfFillDkGray4vfFillBlack5vfFillCustom

Page 39

CHAPTER 3ViewsSummary of Views 3-49viewTransferMode ConstantsviewEffect ConstantsConstant ValuemodeCopy0modeOr1modeXor2modeBic3modeNotCopy4modeNotOr5m

Page 40

CHAPTER 3 Views3-50 Summary of ViewsfxCheckerboardEffectfxColumns(8)+fxRows(8)+fxColAltVPhase+fxRowAltHPhase+fxDown155879fxZoomVerticalEffectfxColumns

Page 41

CHAPTER 3ViewsSummary of Views 3-51Functions and Methods 3Getting References to Viewsview:ChildViewFrames()view:Parent()GetRoot()GetView(symbol)Displa

Page 42

CHAPTER 3 Views3-52 Summary of Viewsview:RevealEffect(distance, bounds, sound, methodName,methodParameters)view:Delete(methodName, methodParameters)Dr

Page 43 - About This Book

CHAPTER 3ViewsSummary of Views 3-53ViewScrollUpScript()ViewOverviewScript()ViewAddChildScript(child)ViewChangedScript(slot, view)ViewDropChildScript(c

Page 45 - Sample Code 0

About the NewtApp Framework 4-1CHAPTER 4NewtApp Applications 4Figure 4-0Table 4-0NewtApp is a collection of prototypes that work together in an applic

Page 46 - Frame Code 0

xivChapter 11 Data Storage and Retrieval 11-1About Data Storage on Newton Devices 11-1Introduction to Data Storage Objects 11-2Where to Go From Here 1

Page 47

CHAPTER 4 NewtApp Applications4-2 About the NewtApp FrameworkYou can create most kinds of applications with the NewtApp framework. If your application

Page 48

CHAPTER 4NewtApp ApplicationsAbout the NewtApp Framework 4-3The parts of the NewtApp framework are designed to fit together using the two-part NewtonSc

Page 49 - Overview 1

CHAPTER 4 NewtApp Applications4-4 About the NewtApp FrameworkNoteThis drawing does not depict the protos as they would appear in a Newton Toolkit layo

Page 50 - 1-2 Operating System

CHAPTER 4NewtApp ApplicationsAbout the NewtApp Framework 4-5About newtSoup 4Application data is stored in persistent structures known as soups in any

Page 51 - Memory 1

CHAPTER 4 NewtApp Applications4-6 About the NewtApp FrameworkFigure 4-2 A roll-based application (left) versus a card-based applicationThe page-based

Page 52 - System Services 1

CHAPTER 4NewtApp ApplicationsAbout the NewtApp Framework 4-7Figure 4-3 Calls is an example of a page-based applicationThe overview protos are also lay

Page 53 - Object Storage System 1

CHAPTER 4 NewtApp Applications4-8 About the NewtApp FrameworkThe Entry View Protos 4The entry view is the focal point for operations that happen on on

Page 54 - View System 1

CHAPTER 4NewtApp ApplicationsAbout the NewtApp Framework 4-9Note that the header bar contains the Action and Filing buttons on its right side. These b

Page 55 - Text Input and Recognition 1

CHAPTER 4 NewtApp Applications4-10 About the NewtApp Frameworkdata which they format appropriately. For example, the number views (newtNumberView and

Page 56 - Intelligent Assistant 1

CHAPTER 4NewtApp ApplicationsAbout the NewtApp Framework 4-11Figure 4-6 The smart name view and system-provided people pickerStationery 4Stationery, a

Page 57 - Imaging and Printing 1

xvRetrieving Existing Soups 11-33Adding Entries to Soups 11-34Adding an Index to an Existing Soup 11-35Removing Soups 11-36Using Built-in Soups 11-36M

Page 58 - Book Reader 1

CHAPTER 4 NewtApp Applications4-12 Using NewtAppSome NewtApp protos are usable in your non-NewtApp applications. For example, there is a newtStatusBar

Page 59 - Communications Services 1

CHAPTER 4NewtApp ApplicationsUsing NewtApp 4-13responsibility for its operation is 100% yours. If you are going to redistribute it, you must make it c

Page 60 - Communications Services

CHAPTER 4 NewtApp Applications4-14 Using NewtAppOne other global, unique to this application, is set. It is the constant kAppTitle,set to the string &

Page 61 - Communications Services 1-13

CHAPTER 4NewtApp ApplicationsUsing NewtApp 4-15 Optional. Set the statusBarSlot to contain the declared name of the status bar so layouts can use it

Page 62 - Low-Level Communications 1

CHAPTER 4 NewtApp Applications4-16 Using NewtAppUse code similar to the following example to set the allSoups slot:allSoups:={ IOUSoup: {_proto: newt

Page 63 - Application Components 1

CHAPTER 4NewtApp ApplicationsUsing NewtApp 4-17where items is replaced by the value of the appObject slot set in the newtApplication base view. An exa

Page 64 - Figure 1-3 Using components

CHAPTER 4 NewtApp Applications4-18 Using NewtApp3. Set the masterSoupSlot to the symbol 'IOUSoup. This correlates to the name of the soup as it i

Page 65 - Using System Software 1

CHAPTER 4NewtApp ApplicationsUsing NewtApp 4-19menuRightButtons:=[newtActionButton,newtFilingButton,]Be sure to add the Overview Layout template file t

Page 66 - What’s New in Newton 2.0 1

CHAPTER 4 NewtApp Applications4-20 Using NewtAppFollow these steps to ready your application for the slot views:1. Drag out a newtEntryView proto on t

Page 67

CHAPTER 4NewtApp ApplicationsUsing NewtApp 4-21frame containing slots with references to all the viewDef layout templates that work with that dataDef.

Page 68 - Tex t Input 1

xviSpecial-Purpose Objects for Chapter 12 Data Storage and Retrieval 12-1About Special-Purpose Storage Objects 12-1Entry Aliases 12-1Virtual Binary Ob

Page 69 - Graphics and Drawing 1

CHAPTER 4 NewtApp Applications4-22 Using NewtAppYou should create a text file, which you save as Install&Remove.f, into which to copy the functions

Page 70 - Built-in Applications 1

CHAPTER 4NewtApp ApplicationsUsing NewtApp 4-23Certain slots must be added to these base view slots for your application to be able to utilize the fal

Page 71 - Endpoint Communication 1

CHAPTER 4 NewtApp Applications4-24 Using NewtAppomitted if your base application view’s soup slot is set to the default name dataSoup. Add a soupQuer

Page 72 - Utilities 1

CHAPTER 4NewtApp ApplicationsSummary of the NewtApp Framework 4-25Summary of the NewtApp Framework 4Required Code 4Required InstallScript 4InstallScri

Page 73 - Getting Started 2

CHAPTER 4 NewtApp Applications4-26 Summary of the NewtApp FrameworkAddEntry: //Adds the entry to the specified storefunc(entry, store) ...AdoptEntry:

Page 74 - NewtApp Framework 2

CHAPTER 4NewtApp ApplicationsSummary of the NewtApp Framework 4-27newtApplication 4myNewtAppBaseView := {_proto: newtapplication, // Application base

Page 75 - Digital Books 2

CHAPTER 4 NewtApp Applications4-28 Summary of the NewtApp FrameworkdateFindSlot: pathExpression // Enables dateFind for your// app. Path must lead to

Page 76 - Other Kinds of Software 2

CHAPTER 4NewtApp ApplicationsSummary of the NewtApp Framework 4-29Find: // Default Find method as defined in framework.func(text, results, scope, find

Page 77 - Activation 2

CHAPTER 4 NewtApp Applications4-30 Summary of the NewtApp FrameworknewtAZTabs 4myAZTab:= { // the standard A-Z tabs_proto: newtAZTabs,PickActionScrip

Page 78 - Deactivation 2

CHAPTER 4NewtApp ApplicationsSummary of the NewtApp Framework 4-31newtPrefsView 4aPrefsView:= { // The preferences view_proto: newtPrefsView } newtLa

Page 79 - Getting Started

xviiDrawing Compatibility 13-8New Functions 13-8New Style Attribute Slots 13-8Changes to Bitmaps 13-8Changes to the HitShape Method 13-8Changes to Vie

Page 80 - Using Memory 2

CHAPTER 4 NewtApp Applications4-32 Summary of the NewtApp FrameworknewtRollLayout 4myRollLayout:= { // Dynamically lays out child views_proto: newtRo

Page 81 - Localization 2

CHAPTER 4NewtApp ApplicationsSummary of the NewtApp Framework 4-33forceNewEntry: true, //Creates blank entry for layoutmenuRightButtons:[], //Replaces

Page 82 - Application Name 2

CHAPTER 4 NewtApp Applications4-34 Summary of the NewtApp FrameworkcurrentViewDef: //Set to current viewDefcurrentStatView: //Set to current context o

Page 83 - Package Name 2

CHAPTER 4NewtApp ApplicationsSummary of the NewtApp Framework 4-35newtEntryRollHeader 4aRollHeader:= { // Header/divider bar for page or // roll-styl

Page 84 - Summary 2

CHAPTER 4 NewtApp Applications4-36 Summary of the NewtApp FrameworknewtTextView 4editableTextView:= {// This is the editable text view_proto: newtText

Page 85 - About Views 3

CHAPTER 4NewtApp ApplicationsSummary of the NewtApp Framework 4-37longFormat: yearMonthDayStrSpec,// for LongDateStrshortFormat: nil, // for ShortDate

Page 86 - Tem plates 3

CHAPTER 4 NewtApp Applications4-38 Summary of the NewtApp FrameworknewtROTextPhoneView 4readOnlyTextPhoneView:= {// Displays phone numbers_proto: newt

Page 87

CHAPTER 4NewtApp ApplicationsSummary of the NewtApp Framework 4-39newtROEditView 4readOnlyEditView:= { // A text display view, which // may have scrol

Page 88 - _proto slots which

CHAPTER 4 NewtApp Applications4-40 Summary of the NewtApp FrameworknewtStationeryView 4stationeryView:= { // Used as bounding box and container// view

Page 89 - Templates

CHAPTER 4NewtApp ApplicationsSummary of the NewtApp Framework 4-41usePopup: true,// When true with labelCommands array// picker is enabledaccess: &apo

Page 90 - Coordinate System 3

xviiiChapter 14 Sound 14-1About Newton Sound 14-1Event-related Sounds 14-2Sounds in ROM 14-2Sounds for Predefined Events 14-2Sound Data Structures 14-3

Page 91 - Figure 3-5 Points and pixels

CHAPTER 4 NewtApp Applications4-42 Summary of the NewtApp FrameworknewtROLabelNumInputLine 4aDisplayLabelNumberInputLine:= {// Labelled number display

Page 92

CHAPTER 4NewtApp ApplicationsSummary of the NewtApp Framework 4-43_proto: newtLabelSimpleDateInputLine, label: "",// Text for input line lab

Page 93 - Behavior 3

CHAPTER 4 NewtApp Applications4-44 Summary of the NewtApp FrameworkUpdateText: // Used with Undo to update text to new textfunc(newText)..., // }newtN

Page 94

About Stationery 5-1CHAPTER 5Stationery 5Figure 5-0Table 5-0Stationery, which consists of new data formats and different views of your data, may be bu

Page 95 - Figure 3-6 Bounds parameters

CHAPTER 5 Stationery5-2 About StationeryA dataDef is based on the newtStationery proto and is used to create alternative data structures. The dataDef

Page 96

CHAPTER 5StationeryAbout Stationery 5-3Figure 5-1 The IOU extension in the New pickerWhen you choose IOU from the New picker, an IOU entry is displaye

Page 97 - About Views 3-13

CHAPTER 5 Stationery5-4 About StationeryFigure 5-3 The Show menu presents different views of application dataStationery Registration 5Your stationery,

Page 98 - ■ text limits

CHAPTER 5StationeryUsing Stationery 5-5Getting Information about Stationery 5By using the appropriate global function, you can get information about a

Page 99

CHAPTER 5 Stationery5-6 Using StationeryThe dataDef component of your stationery should use a FillNewEntry method to define its own discrete soup entry

Page 100 - Constant Value Description

CHAPTER 5StationeryUsing Stationery 5-7newEntry.class := kDataSymbol;newEntry.viewStationery := kDataSymbol;newEntry.(kDataSymbol).dueDate:=time();new

Page 101 - CHAPTER 3

xixCreating the labelsFilter slot 15-14Creating the storesFilter slot 15-14Adding the Filing Button 15-14Adding the Folder Tab View 15-14Customizing F

Page 102 - 3-18 About Views

CHAPTER 5 Stationery5-8 Using StationeryA call to the global function GetDefs in the NTK Inspector window returns a series of frames describing dataDe

Page 103 - About Views 3-19

CHAPTER 5StationeryUsing Stationery 5-9The following example uses the constant kSuperSymbol as the value of the superSymbol slot. It is defined as fol

Page 104 - Appearance 3

CHAPTER 5 Stationery5-10 Using Stationery// Generic entry definition:DefConst('kEntryTemplate, {class: kDataSymbol,viewStationery: kDataSymbol,//

Page 105 - About Views 3-21

CHAPTER 5StationeryUsing Stationery 5-11Here is an example:TextScript: func(item,target)beginitem.text := "IOU\n" & target.(kDataSymbol)

Page 106 - Figure 3-8 Transfer modes

CHAPTER 5 Stationery5-12 Using StationeryAdd the protos that will display the data and labels to the working application. The protos used here include

Page 107 - About Views 3-23

CHAPTER 5StationeryUsing Stationery 5-13Set the slots of the newtLabelNumInputLine as follows: Set the label slot to "How Much". Set the p

Page 108 - Inheritance Links 3

CHAPTER 5 Stationery5-14 Using StationeryUsing the MinimalBounds ViewDef Method 5The MinimalBounds method must be used in a viewDef when the size of t

Page 109 - About Views 3-25

CHAPTER 5StationeryStationery Summary 5-15Stationery Summary 5Data Structures 5ViewDef Frame 5myViewDef := {_proto: anyGenericView,type: 'editor,

Page 110 - View Instantiation 3

CHAPTER 5 Stationery5-16 Stationery SummarynewtStationeryPopupButton 5aStatPopup := { // used to construct New and Show buttons_proto: newtStationeryP

Page 111 - Declaring a View 3

CHAPTER 5StationeryStationery Summary 5-17newtRollShowStationeryButton 5aRollShowButton := { // the Show button in paper roll apps_proto: newtRollShow

Page 112 - Creating a View 3

Apple Computer, Inc.© 1996 Apple Computer, Inc.All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or tr

Page 113 - Closing a View 3

xxImplementing Find Overview Support 16-21The FindSoupExcerpt Method 16-21The ShowFoundItem Method 16-22Replacing the Built-in Find Slip 16-24Reportin

Page 115 - New Alignment Flags 3

About Pickers and Pop-up Views 6-1CHAPTER 6Pickers, Pop-up Views, and Overviews 6Figure 6-0Table 6-0This chapter describes how to use pickers and pop-

Page 116 - Using Views 3

CHAPTER 6 Pickers, Pop-up Views, and Overviews6-2 About Pickers and Pop-up ViewsMore sophisticated picker protos allow multiple selections and use a c

Page 117 - Dynamically Adding Views 3

CHAPTER 6Pickers, Pop-up Views, and OverviewsAbout Pickers and Pop-up Views 6-3 protoDateDurationTextPicker protoRepeatDateDurationTextPicker proto

Page 118 - Showing a Hidden View 3

CHAPTER 6 Pickers, Pop-up Views, and Overviews6-4 General-Purpose Pickers protoPeoplePopupThe following two protos are data types that support the pr

Page 119 - Using Views 3-35

CHAPTER 6Pickers, Pop-up Views, and OverviewsGeneral-Purpose Pickers 6-5Figure 6-1 A protoPopupButton example The protoPopInPlace picker is a text bu

Page 120 - Creating Templates 3

CHAPTER 6 Pickers, Pop-up Views, and Overviews6-6 General-Purpose PickersProgrammer’s Reference. Figure 6-4 shows the types of objects you can display

Page 121 - Making a Picker View 3

CHAPTER 6Pickers, Pop-up Views, and OverviewsGeneral-Purpose Pickers 6-7 The protoTextList picker is a scrollable list of items. The user can scroll

Page 122 - Making Modal Views 3

CHAPTER 6 Pickers, Pop-up Views, and Overviews6-8 Map PickersThe protoGeneralPopup sends a pickCancelledScript to the callbackContext specified in the

Page 123 - Finding the Bounds of Views 3

CHAPTER 6Pickers, Pop-up Views, and OverviewsMap Pickers 6-9Figure 6-8 A protoCountryPicker example The protoProvincePicker displays a map of North A

Page 124 - Dragging a View 3

xxiUsing Alerts and Alarms 17-11Using the Notify Method to Display User Alerts 17-11Creating Alarms 17-11Obtaining Information about Alarms 17-12Retri

Page 125 - Scrolling View Contents 3

CHAPTER 6 Pickers, Pop-up Views, and Overviews6-10 Tex t Pickersthe slots and methods for this picker, see “protoWorldPicker” (page 5-34) in Newton P

Page 126 - Using Views

CHAPTER 6Pickers, Pop-up Views, and OverviewsTex t Pickers 6-11 The protoDateTextPicker is a label picker with a text representation of a date. When

Page 127 - View Synchronization 3

CHAPTER 6 Pickers, Pop-up Views, and Overviews6-12 Tex t PickersFigure 6-14 A protoDateDurationTextPicker example The protoRepeatDateDurationTextPic

Page 128 - Optimizing View Performance 3

CHAPTER 6Pickers, Pop-up Views, and OverviewsTex t Pickers 6-13Figure 6-15 A protoDateNTimeTextPicker example The protoTimeTextPicker is a label pic

Page 129 - Memory Usage 3

CHAPTER 6 Pickers, Pop-up Views, and Overviews6-14 Tex t PickersFigure 6-17 A protoDurationTextPicker example The protoTimeDeltaTextPicker is a labe

Page 130 - Scrolling 3

CHAPTER 6Pickers, Pop-up Views, and OverviewsTex t Pickers 6-15Figure 6-19 A protoMapTextPicker example The protoCountryTextPicker is the same as pr

Page 131 - Summary of Views 3

CHAPTER 6 Pickers, Pop-up Views, and Overviews6-16 Tex t Pickers The protoCitiesTextPicker is a label picker with a text representation of a city. W

Page 132 - Constant Value

CHAPTER 6Pickers, Pop-up Views, and OverviewsDate, Time, and Location Pop-up Views 6-17Date, Time, and Location Pop-up Views 6You can use the protos d

Page 133 - Summary of Views 3-49

CHAPTER 6 Pickers, Pop-up Views, and Overviews6-18 Date, Time, and Location Pop-up Views The protoDateNTimePopup allows the user to choose a single d

Page 134

CHAPTER 6Pickers, Pop-up Views, and OverviewsDate, Time, and Location Pop-up Views 6-19 The protoMultiDatePopup allows the user to specify a range of

Page 135 - Functions and Methods 3

xxiiThe Task Frame 18-11The Entries Slot 18-11The Phrases Slot 18-11The OrigPhrase Slot 18-12The Value Slot 18-12Resolving Template-Matching Conflicts

Page 136

CHAPTER 6 Pickers, Pop-up Views, and Overviews6-20 Date, Time, and Location Pop-up Views The protoAnalogTimePopup allows the user to choose a time wi

Page 137 - , lastDragPt, copy)

CHAPTER 6Pickers, Pop-up Views, and OverviewsNumber Pickers 6-21Number Pickers 6This section describes the protos available to allow users to pick num

Page 138

CHAPTER 6 Pickers, Pop-up Views, and Overviews6-22 Overview ProtosOverview Protos 6You can use the protos described in this section to create overview

Page 139 - NewtApp Applications 4

CHAPTER 6Pickers, Pop-up Views, and OverviewsOverview Protos 6-23Figure 6-36 A protoSoupOverview example The protoListPicker provides a scrollable li

Page 140 - The NewtApp Protos 4

CHAPTER 6 Pickers, Pop-up Views, and Overviews6-24 Overview ProtosFigure 6-37 A protoListPicker example The protoPeoplePicker displays a list of name

Page 141 - :?) to avoid

CHAPTER 6Pickers, Pop-up Views, and OverviewsOverview Protos 6-25You also need to define the following slot in your protoOverview:cursor This should b

Page 142 - About newtApplication 4

CHAPTER 6 Pickers, Pop-up Views, and Overviews6-26 Overview Protos Move, which moves the “cursor” a given number of entries and returns that entry or

Page 143 - The Layout Protos 4

CHAPTER 6Pickers, Pop-up Views, and OverviewsOverview Protos 6-27Figure 6-39 Creating a new name entryWhen the pen comes down in any column, the row/c

Page 144 - About the NewtApp Framework

CHAPTER 6 Pickers, Pop-up Views, and Overviews6-28 Overview Protospop-up view is displayed to allow the user to select any option or enter a new one.

Page 145

CHAPTER 6Pickers, Pop-up Views, and OverviewsOverview Protos 6-29The picker definition (described in the next section) is a data definition frame that i

Page 146 - The Entry View Protos 4

xxiiiDates 19-8About the Dates Application 19-8Dates Compatibility 19-9Using the Dates Application 19-10Adding Meetings or Events 19-11Deleting Meetin

Page 147 - About the Slot View Protos 4

CHAPTER 6 Pickers, Pop-up Views, and Overviews6-30 Overview ProtosSee “Column Specifications” (page 5-3) in Newton Programmer’s Reference for details o

Page 148

CHAPTER 6Pickers, Pop-up Views, and OverviewsOverview Protos 6-31Validation and Editing in protoListPicker 6The built-in validation mechanism is not d

Page 149 - NewtApp Compatibility 4

CHAPTER 6 Pickers, Pop-up Views, and Overviews6-32 Overview Protos// NOTE: returns the edit slip that is openedGetLayout("editor.t"):new(tap

Page 150 - Using NewtApp 4

CHAPTER 6Pickers, Pop-up Views, and OverviewsOverview Protos 6-33Changing the Font of protoListPicker 6The mechanism described here will probably cha

Page 151 - Using Application Globals 4

CHAPTER 6 Pickers, Pop-up Views, and Overviews6-34 Overview Protosif x > selectIndent thenbegin // get a temporary cursor based on the cursor used

Page 152 - Using newtApplication 4

CHAPTER 6Pickers, Pop-up Views, and OverviewsRoll Protos 6-35Roll Protos 6You can use the protos described in this section to present roll views in yo

Page 153 - Using NewtApp 4-15

CHAPTER 6 Pickers, Pop-up Views, and Overviews6-36 View ClassesFigure 6-45 A protoRollBrowser exampleView Classes 6There are two view classes that you

Page 154 - Using the Layout Protos 4

CHAPTER 6Pickers, Pop-up Views, and OverviewsSpecifying the List of Items for a Popup 6-37 The clMonthView view class displays a monthly calendar. Fi

Page 155 - Overview Layout

CHAPTER 6 Pickers, Pop-up Views, and Overviews6-38 Specifying the List of Items for a PopupTable 6-2 describes the frame used to specify a string with

Page 156 - Using NewtApp

CHAPTER 6Pickers, Pop-up Views, and OverviewsSpecifying the List of Items for a Popup 6-39Table 6-3 describes the frame required to specify a two-dime

Page 157 - Using Entry Views 4

xxivFax Soup Entries 19-34About Fax Soup Entries 19-34Using Fax Soup Entries 19-34Prefs and Formulas Rolls 19-35About the Prefs and Formulas Rolls 19-

Page 158

CHAPTER 6 Pickers, Pop-up Views, and Overviews6-40 Specifying the List of Items for a PopupNotePicker items can include 1.x bitmaps but not 2.0 shapes

Page 159 - Using NewtApp 4-21

CHAPTER 6Pickers, Pop-up Views, and OverviewsSummary 6-41Summary 6The following sections summarize the reference information in this chapter.General P

Page 160 - Modifying the Base View 4

CHAPTER 6 Pickers, Pop-up Views, and Overviews6-42 SummaryiconSetup: icon frame,labelCommands: array, // items in listiconBounds: boundsFrame, // boun

Page 161 - Using a False Entry View 4

CHAPTER 6Pickers, Pop-up Views, and OverviewsSummary 6-43protoGeneralPopup 6aProtoGeneralPopup := {_proto: protoGeneralPopup,viewBounds: boundsFrame,v

Page 162

CHAPTER 6 Pickers, Pop-up Views, and Overviews6-44 SummaryviewFormat: formatFlags,def: frame, // protoTableDef table// definition framescrollAmount:

Page 163 - Protos 4

CHAPTER 6Pickers, Pop-up Views, and OverviewsSummary 6-45Map Pickers 6protoCountryPicker 6aProtoCountryPicker := {_proto: protoCountryPicker,viewBound

Page 164

CHAPTER 6 Pickers, Pop-up Views, and Overviews6-46 SummaryTex t Picker Protos 6protoTextPicker 6aProtoTextPicker := {_proto: protoTextPicker,label: st

Page 165

CHAPTER 6Pickers, Pop-up Views, and OverviewsSummary 6-47PickActionScript: function, // returns selected itemPickCancelledScript: function, // user ca

Page 166

CHAPTER 6 Pickers, Pop-up Views, and Overviews6-48 Summarytime: integer, // initial start timeformat: symbol, // format to display timeincrement: inte

Page 167

CHAPTER 6Pickers, Pop-up Views, and OverviewsSummary 6-49protoMapTextPicker 6aProtoMapTextPicker := {_proto: protoMapTextPicker,label: string, // pick

Page 168

xxvChapter 20 Localizing Newton Applications 20-1About Localization 20-1The Locale Panel and the International Frame 20-1Locale and ROM Version 20-2Ho

Page 169

CHAPTER 6 Pickers, Pop-up Views, and Overviews6-50 SummaryprotoCitiesTextPicker 6aProtoCitiesTextPicker := {_proto: protoCitiesTextPicker,label: strin

Page 170

CHAPTER 6Pickers, Pop-up Views, and OverviewsSummary 6-51protoDatePicker 6aProtoDatePicker := {_proto: protoDatePicker,selectedDates: array, // select

Page 171

CHAPTER 6 Pickers, Pop-up Views, and Overviews6-52 SummaryprotoYearPopup 6protoYearPopup := {_proto: protoYearPopup,New: function, // creates pop-up v

Page 172

CHAPTER 6Pickers, Pop-up Views, and OverviewsSummary 6-53protoTimeIntervalPopup 6protoTimeIntervalPopup := {_proto: protoTimeIntervalPopup,New: functi

Page 173

CHAPTER 6 Pickers, Pop-up Views, and Overviews6-54 SummaryOverview Protos 6protoOverview 6aProtoOverview := {_proto: protoOverview,viewBounds : bounds

Page 174

CHAPTER 6Pickers, Pop-up Views, and OverviewsSummary 6-55protoListPicker 6aProtoListPicker := {_proto: protoListPicker,declareSelf : symbol, // Set to

Page 175

CHAPTER 6 Pickers, Pop-up Views, and Overviews6-56 SummaryprotoNameRefDataDef 6aProtoNameRefDataDef := {_proto: protoNameRefDataDef,name: string, // n

Page 176

CHAPTER 6Pickers, Pop-up Views, and OverviewsSummary 6-57Validate: function, // returns array of invalid// refsModifyEntryPath: function, // entry m

Page 177

CHAPTER 6 Pickers, Pop-up Views, and Overviews6-58 SummaryallCollapsed: Boolean, // roll collapsed if non-nilindex: integer, // index of item to start

Page 178

CHAPTER 6Pickers, Pop-up Views, and OverviewsSummary 6-59browsers: array, // frame with array of outline// itemsviewFont: fontSpec,viewFlags : consta

Page 179

xxviRouting Formats 21-5Current Format 21-8Routing Compatibility 21-8Print Formats 21-8Using Routing 21-8Providing Transport-Based Routing Actions 21-

Page 181

7-1CHAPTER 7Controls and Other Protos 7Figure 7-0Table 7-0Controls are software objects that provide various user interface capabilities, including sc

Page 182

CHAPTER 7 Controls and Other Protos7-2 Scroller Protos four new date and time protos: protoDigitalClock, protoSetClock,protoNewSetClock, and protoAMP

Page 183 - Stationery 5

CHAPTER 7Controls and Other ProtosScroller Protos 7-3 The protoUpDownScroller is centered on the right side of a view and provides vertical scroll ar

Page 184 - The Stationery Buttons 5

CHAPTER 7 Controls and Other Protos7-4 Scroller ProtosviewRect, and dataRect. Each of these slots is a bounds frame with the following form:{left: 0,

Page 185 - About Stationery 5-3

CHAPTER 7Controls and Other ProtosScroller Protos 7-5Scrolling in the Dates Application 7Scrolling in the Dates application allows the user to see the

Page 186 - Stationery Registration 5

CHAPTER 7 Controls and Other Protos7-6 Button and Box ProtosKeep in mind that if you set scrollAmounts to values other than the default, your method m

Page 187 - Using Stationery 5

CHAPTER 7Controls and Other ProtosButton and Box Protos 7-7 The protoPictureButton creates a picture that is a button. For more information about the

Page 188 - Using FillNewEntry 5

CHAPTER 7 Controls and Other Protos7-8 Button and Box Protos The protoRadioButton creates a radio button child view of a radio button cluster (based

Page 189 - Using Stationery 5-7

CHAPTER 7Controls and Other ProtosButton and Box Protos 7-9 The protoLargeCloseBox creates a picture button with an “X” icon that is used to close th

Page 190 - Creating a DataDef 5

xxviiProtos 21-38Functions and Methods 21-39Application-Defined Methods 21-40Chapter 22 Transport Interface 22-1About Transports 22-1Transport Parts 22

Page 191 - Defining DataDef Methods 5

CHAPTER 7 Controls and Other Protos7-10 Button and Box ProtosImplementing a Simple Button 7To provide a simple button in your application, pick a butt

Page 192 - Using Stationery

CHAPTER 7Controls and Other ProtosSelection Tab Protos 7-11Selection Tab Protos 7You can use the protos described in this section to display alphabeti

Page 193 - Creating ViewDefs 5

CHAPTER 7 Controls and Other Protos7-12 Gauge and Slider ProtosGauge and Slider Protos 7You can use the gauge and slider protos described in this sect

Page 194

CHAPTER 7Controls and Other ProtosGauge and Slider Protos 7-13 The clGaugeView class is used to display objects that look like analog bar gauges. Alt

Page 195 - Using Stationery 5-13

CHAPTER 7 Controls and Other Protos7-14 Time ProtosChangedSlider: func()beginSetVolume(viewValue);:SysBeep();end,...}The example above initializes the

Page 196

CHAPTER 7Controls and Other ProtosTime Protos 7-15Figure 7-22 A protoNewSetClock view The protoSetClock time proto also displays an analog clock with

Page 197 - Stationery Summary 5

CHAPTER 7 Controls and Other Protos7-16 Special View Protos// initialize with current timeViewSetupFormScript: func() begintime := time();end,...};Spe

Page 198 - 5-16 Stationery Summary

CHAPTER 7Controls and Other ProtosSpecial View Protos 7-17 The protoDrawer creates a view that looks and acts like the base view of the Extras Drawer

Page 199 - Functions 5

CHAPTER 7 Controls and Other Protos7-18 View Appearance ProtosView Appearance Protos 7You can use the protos described in this section to add to the a

Page 200

CHAPTER 7Controls and Other ProtosStatus Bar Protos 7-19Status Bar Protos 7You can use the protos described in this section to display a status bar at

Page 201 - Overviews 6

xxviiiChapter 23 Endpoint Interface 23-1About the Endpoint Interface 23-1Asynchronous Operation 23-2Synchronous Operation 23-3Input 23-3Data Forms 23-

Page 202

CHAPTER 7 Controls and Other Protos7-20 SummarySummary 7Scroller Protos 7protoLeftRightScroller 7aProtoLeftRightScroller := {_proto: protoLeftRightScr

Page 203

CHAPTER 7Controls and Other ProtosSummary 7-21protoHorizontal2DScroller 7aProtoHorizontal2DScroller := {_proto: protoHorizontal2DScroller,scrollView:

Page 204 - General-Purpose Pickers 6

CHAPTER 7 Controls and Other Protos7-22 SummaryButton and Box Protos 7protoTextButton 7aProtoTextButton := {_proto: protoTextButton,viewBounds: bounds

Page 205 - CHAPTER 6

CHAPTER 7Controls and Other ProtosSummary 7-23protoOrientation 7aProtoOrientation := {_proto: protoOrientation,viewFlags: integer, // viewFlags consta

Page 206 - General-Purpose Pickers

CHAPTER 7 Controls and Other Protos7-24 SummaryviewValue: integer, // current value of radio buttonViewDrawScript:function, // to highlight button...}

Page 207 - Using protoGeneralPopup 6

CHAPTER 7Controls and Other ProtosSummary 7-25protoRCheckbox 7aProtoRCheckbox := {_proto: protoRCheckbox,viewBounds: boundsFrame,viewFormat: formatFla

Page 208 - Map Pickers 6

CHAPTER 7 Controls and Other Protos7-26 SummaryviewValue: integer, // gauge valueminValue: integer, // minimum gauge valuemaxValue: integer, // maximu

Page 209 - Map Pickers 6-9

CHAPTER 7Controls and Other ProtosSummary 7-27Time Protos 7protoDigitalClock 7aProtoDigitalClock := {_proto: protoDigitalClock,viewFlags: integer, //

Page 210 - Text Pickers 6

CHAPTER 7 Controls and Other Protos7-28 SummaryRefresh: function, // update clockTimeChanged: function, // called when time is changed...}protoAMPMClu

Page 211 - Tex t Pickers 6-11

CHAPTER 7Controls and Other ProtosSummary 7-29protoDrawer 7aProtoDrawer := {_proto: protoDrawer,viewFlags: integer, // viewFlags constantsviewBounds:

Page 212 - Tex t Pickers

xxixChapter 24 Built-in Communications Tools 24-1Serial Tool 24-1Standard Asynchronous Serial Tool 24-1Serial Tool with MNP Compression 24-4Framed Asy

Page 213 - Tex t Pickers 6-13

CHAPTER 7 Controls and Other Protos7-30 SummaryprotoGlance 7aProtoGlance := {_proto: protoGlance,viewBounds: boundsFrame,viewJustify: justificationFla

Page 214

CHAPTER 7Controls and Other ProtosSummary 7-31protoDivider 7aProtoDivider:= {_proto: protoDivider,viewBounds: boundsFrame,viewFlags: integer, // viewF

Page 216

About Text 8-1CHAPTER 8Text and Ink Input and Display 8Figure 8-0Table 8-0This chapter describes how the Newton system handles text and presents inter

Page 217

CHAPTER 8 Text and Ink Input and Display8-2 About TextWhen the user writes a line of text on the Newton screen, the Newton system software performs a

Page 218

CHAPTER 8Text and Ink Input and DisplayAbout Text 8-3Caret Insertion Writing Mode 8Caret insertion writing mode is a text input mode that the user can

Page 219

CHAPTER 8 Text and Ink Input and Display8-4 About TextThe views and protos that you use for text are listed in Table 8-1.About Keyboard Text Input 8Yo

Page 220

CHAPTER 8Text and Ink Input and DisplayAbout Text 8-5 Use one of the keyboard protos to create keyboard views in your applications. These protos incl

Page 221 - Picture Picker 6

CHAPTER 8 Text and Ink Input and Display8-6 Using TextCompatibility 8One of the significant advances in software functionality in the Newton 2.0 system

Page 222 - Overview Protos 6

CHAPTER 8Text and Ink Input and DisplayUsing Text 8-7instead, they have child views that contain the individual data items. Text items are contained i

Page 223 - Overview Protos 6-23

iiiTable of ContentsFigures and Tables xxxiiiPreface About This Book xliiiWho Should Read This Book xliiiRelated Books xliiiNewton Programmer’s Refere

Page 224 - Using protoOverview 6

xxxChapter 26 Utility Functions 26-1Compatibility 26-2New Functions 26-2New Object System Functions 26-2New String Functions 26-3New Array Functions 2

Page 225 - Overview Protos 6-25

CHAPTER 8 Text and Ink Input and Display8-8 Using TextHere is an example of a template defining a view of the clEditView class:editor := {...viewClass:

Page 226 - Using protoListPicker 6

CHAPTER 8Text and Ink Input and DisplayUsing Text 8-9Defining a Line Pattern 8You can define a custom line pattern for drawing the horizontal lines in a

Page 227 - Figure 6-41 Selected row

CHAPTER 8 Text and Ink Input and Display8-10 Using TextIMPORTANTYou store view templates (not view objects) in the viewChildren array of an edit view.

Page 228 - Overview Protos

CHAPTER 8Text and Ink Input and DisplayUsing Text 8-11// 8 chars of one font, 3 chars of another, 5 chars // of anotherstyles: [8, 18434, 3, 12290, 5,

Page 229 - Specifying Columns 6

CHAPTER 8 Text and Ink Input and Display8-12 Using TextOnce a lightweight paragraph view has been instantiated, you cannot dynamically change the view

Page 230

CHAPTER 8Text and Ink Input and DisplayUsing Text 8-13The slots of protoRichInputLine are described in “protoRichInputLine” (page 7-19) in Newton Prog

Page 231 - Overview Protos 6-31

CHAPTER 8 Text and Ink Input and Display8-14 Using TextIMPORTANTYou can programmatically access the value of the text slot for theprotoLabelInputLine

Page 232

CHAPTER 8Text and Ink Input and DisplayUsing Text 8-15Recognition menu. The view configuration is defined by the view flags and the (optional) recognitio

Page 233 - Using protoSoupOverview 6

CHAPTER 8 Text and Ink Input and Display8-16 Using TextNoteThe view flags are described in “Views” (page 3-1). The recognition view flags are described

Page 234 - 6-34 Overview Protos

CHAPTER 8Text and Ink Input and DisplayUsing Text 8-17You can modify the size at which ink words are displayed in two ways: by changing the scaling pe

Page 235 - Roll Protos 6

xxxiAppendix The Inside Story on Declare A-1Compile-Time Results A-1Run-Time Results A-2Glossary GL-1Index IN-1

Page 236 - View Classes 6

CHAPTER 8 Text and Ink Input and Display8-18 Using TextThe constants you can use in font specifications are shown in “Font Constants for Packed Font In

Page 237 - Selected day

CHAPTER 8Text and Ink Input and DisplayUsing Text 8-19NoteApple recommending using the normal, bold, and underline font styles. The other styles do no

Page 238

CHAPTER 8 Text and Ink Input and Display8-20 Using TextROM_fontsystem12underline {family:'espy, face:4, size:12}4206592ROM_fontsystem14 {family:&

Page 239

CHAPTER 8Text and Ink Input and DisplayUsing Text 8-21The integers in Table 8-5 are derived by packing font family, face, and size information into a

Page 240

CHAPTER 8 Text and Ink Input and Display8-22 Using TextNote that the “Casual” font uses the symbol 'handwriting for its font family.You can use t

Page 241 - Summary 6

CHAPTER 8Text and Ink Input and DisplayUsing Text 8-23Important Rich String Considerations 8Although the Newton system software allows you to use rich

Page 242 - 6-42 Summary

CHAPTER 8 Text and Ink Input and Display8-24 Using Textview’s 'text and 'styles slots are generated and placed in the context frame of the v

Page 243 - Summary 6-43

CHAPTER 8Text and Ink Input and DisplayUsing Text 8-25Text and Styles 8Within a paragraph view, text is represented in two slots: the 'text slot

Page 244 - 6-44 Summary

CHAPTER 8 Text and Ink Input and Display8-26 Using TextSetting the Caret Insertion Point 8When you application starts up, you might want to establish

Page 245

CHAPTER 8Text and Ink Input and DisplayUsing Text 8-27To use the numeric keyboard, which is shown in Figure 8-7, use the symbol 'numericKeyboard.

Page 247 - Summary 6-47

CHAPTER 8 Text and Ink Input and Display8-28 Using TextIf you want to open one of these keyboards programmatically, use code like the following to sen

Page 248 - 6-48 Summary

CHAPTER 8Text and Ink Input and DisplayUsing Text 8-29Figure 8-10 An example of a protoKeyboardThis proto enables the caret (if it is not already visi

Page 249 - Summary 6-49

CHAPTER 8 Text and Ink Input and Display8-30 Using TextprotoSmallKeyboardButton 8This proto is used to include a small keyboard button in a view. Tapp

Page 250 - 6-50 Summary

CHAPTER 8Text and Ink Input and DisplayUsing Text 8-31The Key Definitions Array 8Each keyboard view contains a key definitions array, which determines t

Page 251 - Summary 6-51

CHAPTER 8 Text and Ink Input and Display8-32 Using Textrow1 := [ keyVUnit, keyVUnit, "4",4, keyHUnit+keyVUnit+keyFramed+2*keyInsetUnit+keyAu

Page 252 - 6-52 Summary

CHAPTER 8Text and Ink Input and DisplayUsing Text 8-33 An array. An element of the array is selected and treated as one of the above data types. The

Page 253

CHAPTER 8 Text and Ink Input and Display8-34 Using TextFigure 8-14 Keyboard codesThe Key Descriptor 8The appearance of each key in a keyboard is deter

Page 254

CHAPTER 8Text and Ink Input and DisplayUsing Text 8-35Key Dimensions 8The width and height of keys are specified in units, not pixels. A key unit is no

Page 255 - Summary 6-55

CHAPTER 8 Text and Ink Input and Display8-36 Using TextKey dimensions are specified by summing a combination of horizontal and vertical key unit consta

Page 256 - 6-56 Summary

CHAPTER 8Text and Ink Input and DisplayUsing Text 8-37Each view path must specify the actual view that accepts the input. An example of a suitable pat

Page 257

xxxiiiFigures and TablesChapter 1Overview1-1Figure 1-1 System software overview 1-2Figure 1-2 Communications architecture 1-12Figure 1-3 Using compone

Page 258

CHAPTER 8 Text and Ink Input and Display8-38 Using Text a view descended from protoInputLine with the vApplication flag set in theviewFlags slotThe Ca

Page 259 - Functions 6

CHAPTER 8Text and Ink Input and DisplaySummary of Text 8-39Summary of Text 8Text Constants and Data Structures 8Text Flags 8vWidthIsParentWidth (1 <

Page 260

CHAPTER 8 Text and Ink Input and Display8-40 Summary of TextROM_fontsystem10underline 4204544ROM_fontsystem12 12288ROM_fontsystem12bold 1060864ROM_fon

Page 261 - Controls and Other Protos 7

CHAPTER 8Text and Ink Input and DisplaySummary of Text 8-41Font Face Constants for Packed Integer Font Specifications 8tsPlain 0tsBold 1048576tsItalic

Page 262 - Scroller Protos 7

CHAPTER 8 Text and Ink Input and Display8-42 Summary of TextKeyboard Modifier Keys 8kIsSoftKeyboard (1 << 24)kCommandModifier (1 << 25)kShi

Page 263 - Automatic Arrow Feedback 7

CHAPTER 8Text and Ink Input and DisplaySummary of Text 8-43clKeyboardView 8aClEditView:= {_noRepeat: constant,viewBounds: boundsFrame,keyDefinitions:

Page 264 - Scrolling Examples 7

CHAPTER 8 Text and Ink Input and Display8-44 Summary of Texttext: string,viewFont: constant,viewJustify: constant,viewFormat: constant,viewTransferMod

Page 265 - Scroll Amounts 7

CHAPTER 8Text and Ink Input and DisplaySummary of Text 8-45labelFont: constant,labelCommands: array, // strings for listcurLabelCommand: integer,inden

Page 266 - Button and Box Protos 7

CHAPTER 8 Text and Ink Input and Display8-46 Summary of TextprotoKeyboardButton 8aprotoKeyboardButton:= {_proto : protoKeyboardButton,viewFlags: const

Page 267 - Button and Box Protos 7-7

CHAPTER 8Text and Ink Input and DisplaySummary of Text 8-47protoPhoneKeyboard 8aprotoPhoneKeyboard:= {_proto : protoPhoneKeyboard,viewBounds: boundsFr

Page 268 - Button and Box Protos

xxxivChapter 5 Stationery 5-1Figure 5-1 The IOU extension in the New picker 5-3Figure 5-2 The IOU extension to the Notes application 5-3Figure 5-3 The

Page 269 - Large Close Box

CHAPTER 8 Text and Ink Input and Display8-48 Summary of TextFont Attribute Functions and Methods 8FontAscent(fontSpec)FontDescent(fontSpec)FontHeight(

Page 270

CHAPTER 8Text and Ink Input and DisplaySummary of Text 8-49Keyboard Functions and Methods 8This section summarizes the functions and methods that you

Page 271 - Selection Tab Protos 7

CHAPTER 8 Text and Ink Input and Display8-50 Summary of TextInput Event Functions and Methods 8This section summarizes the functions and methods that

Page 272 - Gauge and Slider Protos 7

About the Recognition System 9-1CHAPTER 9Recognition 9Figure 9-0Listing 1-0Table 9-0This chapter and Chapter 10, “Recognition: Advanced Topics,” descr

Page 273 - Gauge and Slider Protos 7-13

CHAPTER 9 Recognition9-2 About the Recognition SystemAlthough no recognizers are associated with clicks and strokes, they do pass through the recognit

Page 274 - Time Protos 7

CHAPTER 9RecognitionAbout the Recognition System 9-3Classifying Strokes 9Recognition is an iterative process that compares raw input strokes with vari

Page 275 - Time Protos 7-15

CHAPTER 9 Recognition9-4 About the Recognition Systemmultiple stroke units into meaningful groups. For example, certain letters (such as an uppercase

Page 276 - Special View Protos 7

CHAPTER 9RecognitionAbout the Recognition System 9-5Figure 9-1 Recognizers create units from input strokesShapes 9When the recognition system returns

Page 277 - Special View Protos 7-17

CHAPTER 9 Recognition9-6 About the Recognition SystemText 9When the recognition system returns a word unit to a view based on the clParagraphView or c

Page 278 - View Appearance Protos 7

CHAPTER 9RecognitionAbout the Recognition System 9-7recognizer’s letter-by-letter option may produce different results than using the printed recogniz

Page 279 - Status Bar Protos 7

xxxvFigure 6-35 A protoOverview example 6-22Figure 6-36 A protoSoupOverview example 6-23Figure 6-37 A protoListPicker example 6-24Figure 6-38 A ProtoL

Page 280 - Summary 7

CHAPTER 9 Recognition9-8 About the Recognition SystemclParagraphView view child. Ink text automatically wraps to the paragraph boundaries, just as rec

Page 281 - Summary 7-21

CHAPTER 9RecognitionAbout the Recognition System 9-9Figure 9-2 Recognition-related view flagsView Flags 9The system supplies a number of constants, cal

Page 282

CHAPTER 9 Recognition9-10 About the Recognition Systemmultiple bits in the input mask to produce a particular behavior. You can use a recConfig frame

Page 283 - Summary 7-23

CHAPTER 9RecognitionAbout the Recognition System 9-11Recognition Failure 9Recognition may fail when the handwritten input is too sloppy for the system

Page 284 - 7-24 Summary

CHAPTER 9 Recognition9-12 About the Recognition SystemIMPORTANTAn excessively large user dictionary can slow the system when performing searches that

Page 285 - Gauges and Slider Protos 7

CHAPTER 9RecognitionAbout the Recognition System 9-13user to make individual decisions about each word in the list, this slip does not permit selectio

Page 286 - 7-26 Summary

CHAPTER 9 Recognition9-14 About the Recognition System the expansions of words that match entries in the expansion dictionary. a graphical represent

Page 287

CHAPTER 9RecognitionAbout the Recognition System 9-15This section describes only those user preferences for which the system provides a NewtonScript i

Page 288

CHAPTER 9 Recognition9-16 About the Recognition SystemFigure 9-4 Handwriting Recognition preferencesChecking the “Configure for guest user” checkbox ca

Page 289 - Summary 7-29

CHAPTER 9RecognitionAbout the Recognition System 9-17can always add new words to the user dictionary programmatically, regardless of which recognizer

Page 290

xxxviFigure 7-23 A protoAMPMCluster view 7-15Figure 7-24 A protoDragger view 7-16Figure 7-25 A protoDragNGo view 7-16Figure 7-26 A protoGlance view 7-

Page 291

CHAPTER 9 Recognition9-18 About the Recognition SystemFigure 9-7 Handwriting Settings slipWhen the “Learn my handwriting” checkbox is selected, the sy

Page 292

CHAPTER 9RecognitionAbout the Recognition System 9-19displays a picker from which the user can choose recognition behaviors that you specify. When thi

Page 293 - About Text 8

CHAPTER 9 Recognition9-20 About the Recognition Systemrecognition takes place. The Entry Flags area of the NTK screen specifies the view flags for this

Page 294 - Written Input Formats 8

CHAPTER 9RecognitionUsing the Recognition System 9-21cursive letter styles in the system’s handwriting model are enabled, and the system disables unus

Page 295 - About Text Views and Protos 8

CHAPTER 9 Recognition9-22 Using the Recognition Systemrecognition behavior by setting view flags or providing a recConfig frame. Specifically, clEditVie

Page 296 - About Keyboard Text Input 8

CHAPTER 9RecognitionUsing the Recognition System 9-23Obtaining Optimum Recognition Performance 9To obtain the most accurate results from the recogniti

Page 297 - The Punctuation Pop-up Menu 8

CHAPTER 9 Recognition9-24 Using the Recognition Systemthis regard. If necessary, you can provide a ViewWordScript or ViewChangedScript method that val

Page 298 - Using Text 8

CHAPTER 9RecognitionUsing the Recognition System 9-25You can solve this problem by setting the top view’s vClickable flag without providing a ViewClick

Page 299 - Using Text 8-7

CHAPTER 9 Recognition9-26 Using the Recognition SystemDouble Taps” beginning on page 10-41. See also “ViewGestureScript” (page 8-71) in Newton Program

Page 300 - Using Text

CHAPTER 9RecognitionUsing the Recognition System 9-27When troubleshooting recognition errors, remember that view flags may enable multiple dictionaries

Page 301 - CHAPTER 8

xxxviiChapter 9 Recognition 9-1Figure 9-1 Recognizers create units from input strokes 9-5Figure 9-2 Recognition-related view flags 9-9Figure 9-3 Tex t-

Page 302 - Paragraph Views 8

CHAPTER 9 Recognition9-28 Using the Recognition Systemthe cursive recognizer’s letter-by-letter option may be different from those returned by the pri

Page 303 - Lightweight Paragraph Views 8

CHAPTER 9RecognitionUsing the Recognition System 9-29The vNoSpaces flag must appear in an evaluate slot named textFlags that you create in the view. Th

Page 304 - Using Input Line Protos 8

CHAPTER 9 Recognition9-30 Using the Recognition Systemor typing them. To prevent invalid input by these means, you can implement a ViewChangedScript m

Page 305 - Using Text 8-13

CHAPTER 9RecognitionSummary 9-31Summary 9Constants 9Text Recognition View Flags 9Constant Value DescriptionvCharsAllowed 1 << 12or0x01000Enables

Page 306 - Displaying Text and Ink 8

CHAPTER 9 Recognition9-32 SummaryNon-Text Recognition View Flags 9Constant Value DescriptionvNothingAllowed 0x00000000or0x0000The view accepts no hand

Page 307 - Using Text 8-15

CHAPTER 9RecognitionSummary 9-33View Flags Enabling Lexical Dictionaries 9Data Structures 9Recognition-Related User Configuration Slots 9Use the GetUse

Page 308

CHAPTER 9 Recognition9-34 SummarydoTextRecognition true enables text recognition unconditionally.doShapeRecognition true enables shape recognition unc

Page 309 - Using Text 8-17

About Advanced Topics in Recognition 10-1CHAPTER 10Recognition:Advanced Topics 10Figure 10-0Listing 2-0Table 10-0This chapter describes advanced uses

Page 310

CHAPTER 10 Recognition: Advanced Topics10-2 About Advanced Topics in Recognitionapplications to change these system-wide settings. Instead, individual

Page 311 - Using Text 8-19

CHAPTER 10Recognition: Advanced TopicsAbout Advanced Topics in Recognition 10-3On the other hand, if the view does not supply a recConfig frame, the r

Page 312

xxxviiiChapter 12 Special-Purpose Objects for Data Storage and Retrieval 12-1Table 12-1 Parts and type identifiers 12-4Chapter 13 Drawing and Graphics

Page 313

CHAPTER 10 Recognition: Advanced Topics10-4 About Advanced Topics in Recognition values specified by an optional recConfig frame, which may override v

Page 314 - Rich Strings 8

CHAPTER 10Recognition: Advanced TopicsAbout Advanced Topics in Recognition 10-5A formatted comb view utilizes a template you define which specifies char

Page 315 - Using Text 8-23

CHAPTER 10 Recognition: Advanced Topics10-6 About Advanced Topics in RecognitionThe user can enter unrecognized ink by enabling ink text or sketch ink

Page 316

CHAPTER 10Recognition: Advanced TopicsUsing Advanced Topics in Recognition 10-7Compatibility Information 10The ReadDomainOptions function is obsolete.

Page 317 - Text and Styles 8

CHAPTER 10 Recognition: Advanced Topics10-8 Using Advanced Topics in Recognition using protoRecToggle views to specify recognition behavior defining

Page 318 - Using Keyboards 8

CHAPTER 10Recognition: Advanced TopicsUsing Advanced Topics in Recognition 10-9Creating a recConfig Frame 10For any view that is to use a recConfig fra

Page 319 - 'dateKeyboard

CHAPTER 10 Recognition: Advanced Topics10-10 Using Advanced Topics in Recognitionexact complement of slots and values required is determined by the re

Page 320 - Using Keyboard Protos 8

CHAPTER 10Recognition: Advanced TopicsUsing Advanced Topics in Recognition 10-11Sketch ink, like shapes, is displayed only in views based on the clEdi

Page 321 - Using Text 8-29

CHAPTER 10 Recognition: Advanced Topics10-12 Using Advanced Topics in RecognitionAs an alternative to using a recConfig frame to provide support for i

Page 322

CHAPTER 10Recognition: Advanced TopicsUsing Advanced Topics in Recognition 10-13Manipulating Dictionaries 10You can control the view’s use of dictiona

Page 323 - Using Text 8-31

xxxixFigure 16-9 The ShowFoundItem method displays the view of an overview item 16-9Figure 16-10 Typical status message 16-24Table 16-1 Overview of RO

Page 324

CHAPTER 10 Recognition: Advanced Topics10-14 Using Advanced Topics in RecognitionTo obtain the best performance and to conserve available memory, crea

Page 325 - Using Text 8-33

CHAPTER 10Recognition: Advanced TopicsUsing Advanced Topics in Recognition 10-15If you provide a grid in which the user is to write characters or word

Page 326 - 8-34 Using Text

CHAPTER 10 Recognition: Advanced Topics10-16 Using Advanced Topics in Recognition// indent from left of view to first letterconstant kBoxIndent := 4;/

Page 327 - Using Text 8-35

CHAPTER 10Recognition: Advanced TopicsUsing Advanced Topics in Recognition 10-17The PurgeAreaCache function causes the recognition system to adopt the

Page 328 - Defining Tabbing Orders 8

CHAPTER 10 Recognition: Advanced Topics10-18 Using Advanced Topics in Recognition▲ W ARNINGThe SetValue function may not be appropriate for setting th

Page 329 - Using Text 8-37

CHAPTER 10Recognition: Advanced TopicsUsing Advanced Topics in Recognition 10-19Using protoRecToggle Views 10A protoRecToggle view changes the recogni

Page 330 - Handling Input Events 8

CHAPTER 10 Recognition: Advanced Topics10-20 Using Advanced Topics in RecognitionConfiguring Recognizers and Dictionaries for recToggle Views 10Regardl

Page 331 - Summary of Text 8

CHAPTER 10Recognition: Advanced TopicsUsing Advanced Topics in Recognition 10-21Figure 10-5 One recToggle controls all viewsFigure 10-6 Each recToggle

Page 332 - 8-40 Summary of Text

CHAPTER 10 Recognition: Advanced Topics10-22 Using Advanced Topics in RecognitionWhen the view receives input, it uses parent inheritance to find config

Page 333 - Key Descriptor Constants 8

CHAPTER 10Recognition: Advanced TopicsUsing Advanced Topics in Recognition 10-23Avoid including inappropriate items in the recToggle popup, such as an

Page 334 - Keyboard Modifier Keys 8

ivCommunications Services 1-11NewtonScript Application Communications 1-13Routing Through the In/Out Box 1-13Endpoint Interface 1-14Low-Level Communic

Page 335 - Protos 8

xlChapter 20 Localizing Newton Applications 20-1Figure 20-1 The Locale settings in Preferences 20-2Table 20-1 Using the kIncludeAllElements constant 2

Page 336 - 8-44 Summary of Text

CHAPTER 10 Recognition: Advanced Topics10-24 Using Advanced Topics in RecognitionThe wordInfo frame provides methods that you can use to manipulate it

Page 337 - Summary of Text 8-45

CHAPTER 10Recognition: Advanced TopicsUsing Advanced Topics in Recognition 10-25application’s NTK project; they might be supplied by the user in an in

Page 338 - 8-46 Summary of Text

CHAPTER 10 Recognition: Advanced Topics10-26 Using Advanced Topics in Recognitionsymbol 'custom as its argument, which specifies that the new dict

Page 339 - Summary of Text 8-47

CHAPTER 10Recognition: Advanced TopicsUsing Advanced Topics in Recognition 10-27This approach works well for small dictionaries; for most large dictio

Page 340 - (richString, replaceString)

CHAPTER 10 Recognition: Advanced Topics10-28 Using Advanced Topics in Recognition// store the dictionary datadictData := {data:theObj};mySoup:AddXmit(

Page 341 - Summary of Text 8-49

CHAPTER 10Recognition: Advanced TopicsUsing Advanced Topics in Recognition 10-29In addition to setting the view’s vCustomDictionaries flag, you need to

Page 342 - 8-50 Summary of Text

CHAPTER 10 Recognition: Advanced Topics10-30 Using Advanced Topics in RecognitionRemoving Your RAM-Based Custom Dictionary 10It is recommended that yo

Page 343 - Recognition 9

CHAPTER 10Recognition: Advanced TopicsUsing Advanced Topics in Recognition 10-31Do not use the global functions AddWordToDictionary and RemoveWordFrom

Page 344 - About the Recognition System

CHAPTER 10 Recognition: Advanced Topics10-32 Using Advanced Topics in RecognitionNoteFuture versions of the system are not guaranteed to have the auto

Page 345 - Classifying Strokes 9

CHAPTER 10Recognition: Advanced TopicsUsing Advanced Topics in Recognition 10-33The RemoveWord method returns true if the word was removed successfull

Page 346 - Gestures 9

xliChapter 24 Built-in Communications Tools 24-1Figure 24-1 Default serial framing 24-5Figure 24-2 NetChooser view while searching 24-14Figure 24-3 Ne

Page 347 - Shapes 9

CHAPTER 10 Recognition: Advanced Topics10-34 Using Advanced Topics in RecognitionRemoving Words From the Expand Dictionary 10Normally, words are added

Page 348

CHAPTER 10Recognition: Advanced TopicsUsing Advanced Topics in Recognition 10-35Usually, you do not need to load the auto-add dictionary into RAM your

Page 349 - Unrecognized Strokes 9

CHAPTER 10 Recognition: Advanced Topics10-36 Using Advanced Topics in RecognitionRemoving Words From the Auto-Add Dictionary 10The RemoveAutoAdd funct

Page 350 - Enabling Recognizers 9

CHAPTER 10Recognition: Advanced TopicsUsing Advanced Topics in Recognition 10-37Manipulating Text in protoCharEdit Views 10The default view provided b

Page 351 - View Flags 9

CHAPTER 10 Recognition: Advanced Topics10-38 Using Advanced Topics in RecognitionYou may also need to know the boundaries of the word in the text slot

Page 352 - Where to Go From Here 9

CHAPTER 10Recognition: Advanced TopicsUsing Advanced Topics in Recognition 10-39The cells in this example template use filters defined by the format and

Page 353 - System Dictionaries 9

CHAPTER 10 Recognition: Advanced Topics10-40 Using Advanced Topics in RecognitionCustomized Processing of Input Strokes 10Setting the vStrokesAllowed

Page 354

CHAPTER 10Recognition: Advanced TopicsUsing Advanced Topics in Recognition 10-41Customized Processing of Double Taps 10To process double taps reliably

Page 355 - Correction and Learning 9

CHAPTER 10 Recognition: Advanced Topics10-42 Using Advanced Topics in RecognitionNoteNormally, slot values in the system’s user configuration data are

Page 356

CHAPTER 10Recognition: Advanced TopicsUsing Advanced Topics in Recognition 10-43GetKeyView().viewInkWordScript := func(strokeBundle) begin // convert

Page 358

CHAPTER 10 Recognition: Advanced Topics10-44 Summary of Advanced Topics in RecognitionSummary of Advanced Topics in Recognition 10See also “Summary” b

Page 359

CHAPTER 10Recognition: Advanced TopicsSummary of Advanced Topics in Recognition 10-45Lexical Dictionaries 10System-Supplied RecConfig Frames 10Data Str

Page 360 - RecToggle Views 9

CHAPTER 10 Recognition: Advanced Topics10-46 Summary of Advanced Topics in RecognitionSystem-Supplied RecConfig Frames 10// recognize ink or textROM_rc

Page 361 - Flag-Naming Conventions 9

CHAPTER 10Recognition: Advanced TopicsSummary of Advanced Topics in Recognition 10-47// use custom dictionaries onlyinputMask: vCustomDictionaries, //

Page 362 - Recognition Compatibility 9

CHAPTER 10 Recognition: Advanced Topics10-48 Summary of Advanced Topics in Recognition// Positive offset (in pixels) from base // to the top of an upp

Page 363 - Types of Views 9

CHAPTER 10Recognition: Advanced TopicsSummary of Advanced Topics in Recognition 10-49System-Supplied ProtoCharEdit Templates 10GetLocale().phoneFilter

Page 364 - Using the Recognition System

CHAPTER 10 Recognition: Advanced Topics10-50 Summary of Advanced Topics in Recognition// dictionaries to use when vCustomDictionaries is set// single

Page 365

CHAPTER 10Recognition: Advanced TopicsSummary of Advanced Topics in Recognition 10-51// height of cells in pixelscellHeight: int, // system-provided d

Page 366 - Accepting Pen Input 9

CHAPTER 10 Recognition: Advanced Topics10-52 Summary of Advanced Topics in RecognitionprotoCharEdit Templates 10ROM_numberFilter // general-purpose nu

Page 367 - Recognizing Shapes 9

CHAPTER 10Recognition: Advanced TopicsSummary of Advanced Topics in Recognition 10-53ProtoWordInfo 10aWordInfoFrame := {// ID of view that owns this d

Page 368 - Combining View Flags 9

xliiiPREFACEAbout This BookThis book, Newton Programmer’s Guide, is the definitive guide to Newton programming, providing conceptual information and in

Page 369 - Recognizing Text 9

CHAPTER 10 Recognition: Advanced Topics10-54 Summary of Advanced Topics in RecognitionAdditional Recognition Functions and Methods 10Dictionary Functi

Page 370 - Recognizing Punctuation 9

CHAPTER 10Recognition: Advanced TopicsSummary of Advanced Topics in Recognition 10-55Deferred Recognition Functions 10Recognize(strokes, config, doGro

Page 372

About Data Storage on Newton Devices 11-1CHAPTER 11Data Storage and Retrieval 11Figure 11-0Table 11-0The Newton operating system supplies a suite of o

Page 373 - Summary 9

CHAPTER 11 Data Storage and Retrieval11-2 About Data Storage on Newton DevicesIntroduction to Data Storage Objects 11Newton devices represent data as

Page 374 - CHAPTER 9

CHAPTER 11Data Storage and RetrievalAbout Data Storage on Newton Devices 11-3lookup, message-passing, and inheritance in NewtonScript, see The NewtonS

Page 375 - Data Structures 9

CHAPTER 11 Data Storage and Retrieval11-4 About Data Storage on Newton Devicesdifferent from soups that are not part of a union. Unless specifically no

Page 376 - 9-34 Summary

CHAPTER 11Data Storage and RetrievalAbout Data Storage on Newton Devices 11-5the query specification or query spec. The query spec describes the kind o

Page 377 - Advanced Topics 10

CHAPTER 11 Data Storage and Retrieval11-6 About Data Storage on Newton Devicesapplications might require notification include creating soups; deleting

Page 378 - Recognition: Advanced Topics

CHAPTER 11Data Storage and RetrievalAbout Data Storage on Newton Devices 11-7For information on using store objects, see “Using Stores” beginning on p

Page 379

xlivPREFACE The NewtonScript Programming Language. This book comes with the Newton Toolkit development environment. It describes the NewtonScript pro

Page 380 - ProtoCharEdit Views 10

CHAPTER 11 Data Storage and Retrieval11-8 About Data Storage on Newton DevicesThe soup definition frame specifies a name that identifies the soup to the

Page 381 - Deferred Recognition 10

CHAPTER 11Data Storage and RetrievalAbout Data Storage on Newton Devices 11-9You can create your own specialized indexes for any soup. You need to cre

Page 382

CHAPTER 11 Data Storage and Retrieval11-10 About Data Storage on Newton Devicesdata from a different locale. To take advantage of this behavior, the a

Page 383 - Compatibility Information 10

CHAPTER 11Data Storage and RetrievalAbout Data Storage on Newton Devices 11-11Querying for Indexed Values 11Queries can retrieve items according to th

Page 384 - Using recConfig Frames 10

CHAPTER 11 Data Storage and Retrieval11-12 About Data Storage on Newton DevicesIndexes sort key values in ascending order unless the index spec frame

Page 385 - Creating a recConfig Frame 10

CHAPTER 11Data Storage and RetrievalAbout Data Storage on Newton Devices 11-13exclusive forms of the same endrange selector; for example, a single que

Page 386

CHAPTER 11 Data Storage and Retrieval11-14 About Data Storage on Newton Devicescursor is positioned on the next valid entry in index key order. Simila

Page 387

CHAPTER 11Data Storage and RetrievalAbout Data Storage on Newton Devices 11-15key values, indexValidTest functions are fast and efficient because index

Page 388 - Recognizer enabled

CHAPTER 11 Data Storage and Retrieval11-16 About Data Storage on Newton Devicesunless this behavior is requested explicitly, the words "blackSmit

Page 389 - Manipulating Dictionaries 10

CHAPTER 11Data Storage and RetrievalAbout Data Storage on Newton Devices 11-17Figure 11-5 Cursor presents discontiguous index key values contiguouslyE

Page 390

xlvPREFACESample Code 0The Newton Toolkit development environment, from Apple Computer, includes many sample code projects. You can examine these samp

Page 391

CHAPTER 11 Data Storage and Retrieval11-18 About Data Storage on Newton DevicesAll frames are compressed automatically when they are stored as soup en

Page 392

CHAPTER 11Data Storage and RetrievalAbout Data Storage on Newton Devices 11-19The most important factor to consider with respect to the kind of data i

Page 393

CHAPTER 11 Data Storage and Retrieval11-20 About Data Storage on Newton Devices Although the user might enter data dynamically, there might be a larg

Page 394

CHAPTER 11Data Storage and RetrievalAbout Data Storage on Newton Devices 11-21Soup Compatibility Information 11This section contains compatibility inf

Page 395 - Using protoRecToggle Views 10

CHAPTER 11 Data Storage and Retrieval11-22 About Data Storage on Newton DevicesThe following soup methods and functions are obsolete:SetupCardSoups()

Page 396

CHAPTER 11Data Storage and RetrievalAbout Data Storage on Newton Devices 11-23Null Union Soups 11Under unusual circumstances a 1.x application may enc

Page 397 - CHAPTER 10

CHAPTER 11 Data Storage and Retrieval11-24 About Data Storage on Newton DevicesQuery Global Function Is Obsolete 11Queries are now performed by the Qu

Page 398

CHAPTER 11Data Storage and RetrievalUsing Newton Data Storage Objects 11-25Heap Space Requirements of Words and Text Queries 11On systems prior to ver

Page 399

CHAPTER 11 Data Storage and Retrieval11-26 Using Newton Data Storage ObjectsThis section presumes understanding of the material in “About Data Storage

Page 400 - Using Custom Dictionaries 10

CHAPTER 11Data Storage and RetrievalUsing Newton Data Storage Objects 11-27When creating soups from within your application (form) part’s InstallScrip

Page 401

xlviPREFACE Italic typeface. Italic typeface is used in code to indicate replace-able items, such as the names of function parameters, which you must

Page 402

CHAPTER 11 Data Storage and Retrieval11-28 Using Newton Data Storage Objects// get from myUSoup all entries having an aSlot slotlocal myCursor := myUS

Page 403

CHAPTER 11Data Storage and RetrievalUsing Newton Data Storage Objects 11-29You can use the EntryUndoChangesXmit function to undo the changes to the so

Page 404

CHAPTER 11 Data Storage and Retrieval11-30 Using Newton Data Storage ObjectsReferencing Stores 11The GetStores global function returns an array of ref

Page 405

CHAPTER 11Data Storage and RetrievalUsing Newton Data Storage Objects 11-31for such stores. Do not use the global function IsReadOnly to test store ob

Page 406

CHAPTER 11 Data Storage and Retrieval11-32 Using Newton Data Storage Objectsmethod retrieves the value of a specified slot in the store information fra

Page 407

CHAPTER 11Data Storage and RetrievalUsing Newton Data Storage Objects 11-33Registering and Unregistering Soup Definitions 11The RegUnionSoup global fun

Page 408

CHAPTER 11 Data Storage and Retrieval11-34 Using Newton Data Storage Objectsindexes: [{structure: 'slot, path: 'aSlot, type: 'string}]}

Page 409

CHAPTER 11Data Storage and RetrievalUsing Newton Data Storage Objects 11-35Adding Entries to Soups 11This section describes how to add a frame to a un

Page 410 - Retrieving Word Expansions 10

CHAPTER 11 Data Storage and Retrieval11-36 Using Newton Data Storage ObjectsAfter creating the new soup entry, these methods transmit a soup change no

Page 411

CHAPTER 11Data Storage and RetrievalUsing Newton Data Storage Objects 11-37▲ W ARNINGEach soup has only one tags index; if you add a tags index to a s

Page 412 - Using protoCharEdit Views 10

xlviiPREFACE2. Edit the viewBounds slot to match the values shown in the book.3. Add each of the other slots you see listed in the frame, setting thei

Page 413

CHAPTER 11 Data Storage and Retrieval11-38 Using Newton Data Storage ObjectsThis approach provides the following benefits: It prevents your applicati

Page 414

CHAPTER 11Data Storage and RetrievalUsing Newton Data Storage Objects 11-39 the use of internationalized sorting order queries on multiple-slot inde

Page 415

CHAPTER 11 Data Storage and Retrieval11-40 Using Newton Data Storage Objectsparticular slot, the soup must be indexed on that slot. For example, the f

Page 416

CHAPTER 11Data Storage and RetrievalUsing Newton Data Storage Objects 11-41at or before the position that would be occupied by 27 in the index is the

Page 417

CHAPTER 11 Data Storage and Retrieval11-42 Using Newton Data Storage ObjectsThe query passes the entire entry to the validTest method, rather than jus

Page 418 - Using Stroke Bundles 10

CHAPTER 11Data Storage and RetrievalUsing Newton Data Storage Objects 11-43set operator to select entries marked with only the 'flower and '

Page 419

CHAPTER 11 Data Storage and Retrieval11-44 Using Newton Data Storage ObjectsThis query finds entries containing the words "Bob", "Bobby&

Page 420 - Constants 10

CHAPTER 11Data Storage and RetrievalUsing Newton Data Storage Objects 11-45following code fragment illustrates a query that returns entries having str

Page 421 - Data Structures 10

CHAPTER 11 Data Storage and Retrieval11-46 Using Newton Data Storage Objectsinternationalized index: cursor methods such as Next and Prev return entri

Page 422

CHAPTER 11Data Storage and RetrievalUsing Newton Data Storage Objects 11-47Sending the Reset message to the cursor positions it at the first valid entr

Page 423

xlviiiPREFACEUndocumented System Software Objects 0When browsing in the NTK Inspector window, you may see functions, methods, and data objects that ar

Page 424 - ProtoCharEdit Template 10

CHAPTER 11 Data Storage and Retrieval11-48 Using Newton Data Storage ObjectsA multiple-slot query can be performed only on a soup that has a multiple-

Page 425 - Stroke Bundle Frame 10

CHAPTER 11Data Storage and RetrievalUsing Newton Data Storage Objects 11-49A multiple-slot index solves this problem by sorting entries according to m

Page 426

CHAPTER 11 Data Storage and Retrieval11-50 Using Newton Data Storage ObjectsInstead of using single values for the indexPath, beginKey, beginExclKey,e

Page 427

CHAPTER 11Data Storage and RetrievalUsing Newton Data Storage Objects 11-51This time around, the query again skips over the "Bates" entry in

Page 428 - // creating one if none found

CHAPTER 11 Data Storage and Retrieval11-52 Using Newton Data Storage Objects▲ W ARNINGIndex keys are limited to a total of 39 unicode characters (80 b

Page 429 - Stop: int

CHAPTER 11Data Storage and RetrievalUsing Newton Data Storage Objects 11-53mySoup:MakeKey(["12345678901234567890", 3,"ABCDEFGHIJKLMNOPQ

Page 430 - Recognition Functions 10

CHAPTER 11 Data Storage and Retrieval11-54 Using Newton Data Storage Objects getting the number of entries in cursor data getting an index key from

Page 431 - Inker Functions 10

CHAPTER 11Data Storage and RetrievalUsing Newton Data Storage Objects 11-55Moving the Cursor 11This section describes various ways to position the cur

Page 432

CHAPTER 11 Data Storage and Retrieval11-56 Using Newton Data Storage ObjectsYou can use the Move method to move the cursor multiple positions. For exa

Page 433 - Data Storage and Retrieval 11

CHAPTER 11Data Storage and RetrievalUsing Newton Data Storage Objects 11-57Note that if the query used to generate the cursor specifies a beginKey valu

Page 434 - Data Storage and Retrieval

Operating System 1-1CHAPTER 1Overview 1Figure 1-0Table 1-0This chapter describes the general architecture of the Newton system software, which is divi

Page 435 - Programming Language

CHAPTER 11 Data Storage and Retrieval11-58 Using Newton Data Storage ObjectsSaving Frames as Soup Entries 11To save a frame as a soup entry, pass the

Page 436

CHAPTER 11Data Storage and RetrievalUsing Newton Data Storage Objects 11-59No more than 32 KB of text (total of all strings, keeping in mind that one

Page 437

CHAPTER 11 Data Storage and Retrieval11-60 Using Newton Data Storage ObjectsWhen the frame is constructed from the entry, it is cached in memory. At t

Page 438 - Stores 11

CHAPTER 11Data Storage and RetrievalUsing Newton Data Storage Objects 11-61Copying Entries 11The EntryCopyXmit global function and the CopyEntriesXmit

Page 439 - Soups 11

CHAPTER 11 Data Storage and Retrieval11-62 Using Newton Data Storage ObjectsNoteThe EntryCopyXmit method copies the cached entry—not the original soup

Page 440 - Indexes 11

CHAPTER 11Data Storage and RetrievalUsing Newton Data Storage Objects 11-63In contrast, the EntryUndoChanges function clears the entry cache without w

Page 441

CHAPTER 11 Data Storage and Retrieval11-64 Using Newton Data Storage Objects control how and when notifications are sentThe first part of this section

Page 442 - Queries 11

CHAPTER 11Data Storage and RetrievalUsing Newton Data Storage Objects 11-65▲ W ARNINGAny callback function registered by the RegSoupChangefunction mus

Page 443 - CHAPTER 11

CHAPTER 11 Data Storage and Retrieval11-66 Using Newton Data Storage ObjectsYour callback function must take any action that is appropriate to respond

Page 444 - Begin Keys and End Keys 11

CHAPTER 11Data Storage and RetrievalUsing Newton Data Storage Objects 11-67changeSym parameter, the change notification is not sent, but the function

Page 445

vEffects of System Resets on Application Data 2-7Flow of Control 2-8Using Memory 2-8Localization 2-9Developer Signature Guidelines 2-9Signature 2-9How

Page 446 - Customized Tests 11

CHAPTER 1 Overview1-2 Operating SystemFigure 1-1 System software overviewNewton HardwareOperating SystemOperatingSystemSystem ServicesFindFilingSoundB

Page 447 - Text Queries 11

CHAPTER 11 Data Storage and Retrieval11-68 Summary of Data StorageSummary of Data Storage 11This section summarizes data structures, functions, object

Page 448 - Cursors 11

CHAPTER 11Data Storage and RetrievalSummary of Data Storage 11-69Multiple-Slot Index Specification Frame 11{// index keys may be multiple slot valuesst

Page 449 - Entries 11

CHAPTER 11 Data Storage and Retrieval11-70Summary of Data Storage// maximum index key value examined by this query// for all entries, (entry.indexPath

Page 450 - Query message to the soup or

CHAPTER 11Data Storage and RetrievalSummary of Data Storage 11-71// optional tags query spec frame; see page 11-71tagSpec: {equal:[t1, t2, …tN], all:[

Page 451 - Static Data 11

CHAPTER 11 Data Storage and Retrieval11-72 Summary of Data Storagestore:IsValid()SetDefaultStore(newDefaultStore)store:SetInfo(slotSymbol,value)store:

Page 452 - Compatibility Information 11

CHAPTER 11Data Storage and RetrievalSummary of Data Storage 11-73soupOrUsoup:GetSize()uSoup:GetSoupList()soup:GetStore()GetUnionSoupAlways(soupNameStr

Page 453

CHAPTER 11 Data Storage and Retrieval11-74 Summary of Data StorageEntryIsResident(entry)EntryModTime(entry)EntryMoveXmit(entry, newSoup, changeSym)Ent

Page 454

About Special-Purpose Storage Objects 12-1CHAPTER 12Special-Purpose Objects for Data Storage and Retrieval 12Figure 12-0Table 12-0This chapter describ

Page 455

CHAPTER 12 Special-Purpose Objects for Data Storage and Retrieval12-2 About Special-Purpose Storage ObjectsVirtual Binary Objects 12The size of any Ne

Page 456

CHAPTER 12Special-Purpose Objects for Data Storage and RetrievalAbout Special-Purpose Storage Objects 12-3Normal binary objects encapsulate their data

Page 457 - Programmer’s Overview 11

CHAPTER 1OverviewOperating System 1-3Another operating system task of interest is the Inker. The Inker task is responsible for gathering and displayin

Page 458

CHAPTER 12 Special-Purpose Objects for Data Storage and Retrieval12-4 About Special-Purpose Storage ObjectsExcept for soup parts, all the parts listed

Page 459

CHAPTER 12Special-Purpose Objects for Data Storage and RetrievalAbout Special-Purpose Storage Objects 12-5in a local soup. Your mock entry could resid

Page 460

CHAPTER 12 Special-Purpose Objects for Data Storage and Retrieval12-6 About Special-Purpose Storage Objects// create new mock entry w/ no cached frame

Page 461 - Using Stores 11

CHAPTER 12Special-Purpose Objects for Data Storage and RetrievalUsing Special-Purpose Data Storage Objects 12-7Using Special-Purpose Data Storage Obje

Page 462 - Referencing Stores 11

CHAPTER 12 Special-Purpose Objects for Data Storage and Retrieval12-8 Using Special-Purpose Data Storage ObjectsYou can use the IsSameEntry function t

Page 463

CHAPTER 12Special-Purpose Objects for Data Storage and RetrievalUsing Special-Purpose Data Storage Objects 12-9The NewVBO and NewCompressedVBO store m

Page 464 - Using Soups 11

CHAPTER 12 Special-Purpose Objects for Data Storage and Retrieval12-10 Using Special-Purpose Data Storage ObjectsA VBO becomes permanent only when it

Page 465

CHAPTER 12Special-Purpose Objects for Data Storage and RetrievalUsing Special-Purpose Data Storage Objects 12-11The following code fragment adds sound

Page 466 - Retrieving Existing Soups 11

CHAPTER 12 Special-Purpose Objects for Data Storage and Retrieval12-12 Using Special-Purpose Data Storage Objects// decide to go back to the originalE

Page 467 - Adding Entries to Soups 11

CHAPTER 12Special-Purpose Objects for Data Storage and RetrievalUsing Special-Purpose Data Storage Objects 12-13Creating a Store Part 12To create a st

Page 468

CHAPTER 1 Overview1-4 System ServicesThe system performs automatic memory management of the NewtonScript heap. You don’t need to worry about memory al

Page 469 - Using Built-in Soups 11

CHAPTER 12 Special-Purpose Objects for Data Storage and Retrieval12-14 Using Special-Purpose Data Storage ObjectsGetting the Store Part 12Store parts

Page 470 - Using Queries 11

CHAPTER 12Special-Purpose Objects for Data Storage and RetrievalUsing Special-Purpose Data Storage Objects 12-15Implementing the EntryAccess Method 12

Page 471 - Querying Multiple Soups 11

CHAPTER 12 Special-Purpose Objects for Data Storage and Retrieval12-16 Using Special-Purpose Data Storage ObjectsTesting the Validity of a Mock Entry

Page 472

CHAPTER 12Special-Purpose Objects for Data Storage and RetrievalSummary of Special-Purpose Data Storage Objects 12-17Summary of Special-Purpose Data S

Page 473

CHAPTER 12 Special-Purpose Objects for Data Storage and Retrieval12-18 Summary of Special-Purpose Data Storage ObjectsSafeFreezePackage(pkgRef)SafeMov

Page 474 - Querying for Tags 11

CHAPTER 12Special-Purpose Objects for Data Storage and RetrievalSummary of Special-Purpose Data Storage Objects 12-19Application-Defined Mock Entry Han

Page 476

About Drawing 13-1CHAPTER 13Drawing and Graphics 13Figure 13-0Table 13-0This chapter describes how to draw graphical objects such as lines and rectang

Page 477

CHAPTER 13 Drawing and Graphics13-2 About DrawingNote that for all of the functions described in this chapter: The coordinates you specify are interp

Page 478

CHAPTER 13Drawing and GraphicsAbout Drawing 13-3Figure 13-1 A line drawn with different bit patterns and pen sizesA rectangle can be defined by two poi

Page 479

CHAPTER 1OverviewSystem Services 1-5Object Storage System 1This system is key to the Newton information architecture. The object storage system provid

Page 480

CHAPTER 13 Drawing and Graphics13-4 About DrawingDrawing also provides functions that allow you to perform a variety of mathematical calculations on r

Page 481

CHAPTER 13Drawing and GraphicsAbout Drawing 13-5A rounded rectangle is a rectangle with rounded corners. The figure is defined by the rectangle itself,

Page 482

CHAPTER 13 Drawing and Graphics13-6 About DrawingFigure 13-6 A polygonA region is an arbitrary area or set of areas, the outline of which is one or mo

Page 483

CHAPTER 13Drawing and GraphicsAbout Drawing 13-7can draw something that was defined in another program, with great flexibility and without having to kno

Page 484 - Limitations of Index Keys 11

CHAPTER 13 Drawing and Graphics13-8 About DrawingDrawing Compatibility 13The following new functionality has been added for Newton OS 2.0. For complet

Page 485 - Using Cursors 11

CHAPTER 13Drawing and GraphicsUsing the Drawing Interface 13-9Changes to View Classes 13The icon slot of a view of the clPictureView class can now con

Page 486 - Getting a Cursor 11

CHAPTER 13 Drawing and Graphics13-10 Using the Drawing InterfaceIf you want to redraw a view explicitly at any particular time, you need to send it th

Page 487 - Moving the Cursor 11

CHAPTER 13Drawing and GraphicsUsing the Drawing Interface 13-11For example, you might nest arrays to create the hierarchy of shapes and styles depicte

Page 488

CHAPTER 13 Drawing and Graphics13-12 Using the Drawing InterfaceDefault Transfer Mode 13The default transfer mode is actually a split state: bitmaps a

Page 489 - Using Entries 11

CHAPTER 13Drawing and GraphicsUsing the Drawing Interface 13-13If the style frame includes a clipping slot, the drawing of all shapes affected by this

Page 490

CHAPTER 1 Overview1-6 System ServicesThe object storage system is optimized for small chunks of data and is designed to operate in tight memory constr

Page 491 - Modifying Entries 11

CHAPTER 13 Drawing and Graphics13-14 Using the Drawing InterfaceUsing Drawing View Classes and Protos 13Four view classes and three protos, which you

Page 492 - Moving Entries 11

CHAPTER 13Drawing and GraphicsUsing the Drawing Interface 13-15Displaying Bitmaps, Pictures, and Graphics Shapes 13You can use a view of the clPicture

Page 493 - Copying Entries 11

CHAPTER 13 Drawing and Graphics13-16 Using the Drawing InterfaceviewFormat: nil,ViewSetupFormScript: func()begin// aView is the view to be scaledself.

Page 494 - Sharing Entry Data 11

CHAPTER 13Drawing and GraphicsUsing the Drawing Interface 13-17Using Bitmaps 13You can dynamically create and destroy bitmaps, draw into them, and per

Page 495

CHAPTER 13 Drawing and Graphics13-18 Using the Drawing InterfaceMaking CopyBits Scale Its Output Bitmap 13CopyBits uses the bounds of the bitmap passe

Page 496

CHAPTER 13Drawing and GraphicsUsing the Drawing Interface 13-19Figure 13-10 Example of ViewIntoBitmap method Rotating or Flipping a Bitmap 13Use the M

Page 497 - Responding to Notifications 11

CHAPTER 13 Drawing and Graphics13-20 Using the Drawing InterfaceImporting Macintosh PICT Resources 13The following information applies to the Mac OS v

Page 498 - Sending Notifications 11

CHAPTER 13Drawing and GraphicsUsing the Drawing Interface 13-21You can also use MakePict:myText := MakePict([{penpattern: 0, font: ...}, rect, {font:

Page 499

CHAPTER 13 Drawing and Graphics13-22 Using the Drawing InterfaceNotice that there are two types of pictures: bitmaps (a frame with bits, a bounds, and

Page 500 - Summary of Data Storage 11

CHAPTER 13Drawing and GraphicsSummary of Drawing 13-23Summary of Drawing 13Data Structure 13Style Frame 13aStyle := {transferMode : constant, // trans

Page 501 - Query Specification Frame 11

CHAPTER 1OverviewSystem Services 1-7Text Input and Recognition 1The Newton recognition system uses a sophisticated multiple-recognizer architecture. T

Page 502 - Summary of Data Storage

CHAPTER 13 Drawing and Graphics13-24 Summary of DrawingclRemoteView 13clRemoteView := {stepChildren : int, // specifies a single viewviewBounds: int,

Page 503

CHAPTER 13Drawing and GraphicsSummary of Drawing 13-25myImageView:ScrollBy : function, // scrolls an imagemyImageView:ZoomBy : function, // makes an i

Page 504

CHAPTER 13 Drawing and Graphics13-26 Summary of DrawingtrackWhileScrolling : integer, // tracks the grey box...}Functions and Methods 13Bitmap Functio

Page 505

CHAPTER 13Drawing and GraphicsSummary of Drawing 13-27IsPtInRect(x, y, bounds)FitToBox(sourceBox, boundingBox, justify)OffsetRect(rect, deltaX, deltaY

Page 507 - Storage and Retrieval 12

About Newton Sound 14-1CHAPTER 14Sound 14Figure 14-0Table 14-0This chapter describes how to use sound in your application and how to manipulate Newton

Page 508 - Virtual Binary Objects 12

CHAPTER 14 Sound14-2 About Newton SoundAll operations on sound frames are created by sending messages to a sound channel that encapsulates the sound f

Page 509 - Parts 12

CHAPTER 14SoundAbout Newton Sound 14-3For example, to play a sound in ROM when the view opens, place its name in the view’s showSound slot. In fact, a

Page 510 - Mock Entries 12

CHAPTER 14 Sound14-4 Using SoundUsing Sound 14This section describes how to use sound to perform specific tasks. See NewtonToolkit User’s Guide for des

Page 511 - CHAPTER 12

CHAPTER 14SoundUsing Sound 14-5Creating Sound Frames Procedurally 14To create a sound frame, you usually need to create a copy of the sound frame you

Page 512 - ■ ClassOf(m) is 'frame

CHAPTER 1 Overview1-8 System ServicesStationery 1Stationery is a capability of the system that allows applications to be extended by other developers.

Page 513 - Using Entry Aliases 12

CHAPTER 14 Sound14-6 Using SoundCreating a Sound Channel for Playback 14You create a sound channel by sending it the Open function.The code that creat

Page 514 - ■ undoing changes to VBO data

CHAPTER 14SoundUsing Sound 14-7Synchronous and Asynchronous Sound 14When a sound is played asynchronously, the playback can be intermixed with other t

Page 515 - Programmer’s Reference

CHAPTER 14 Sound14-8 Using Soundclipped off with each new call to the PlaySoundSync function. In fact, it’s likely that you won’t hear twenty sounds i

Page 516 - Modifying VBO Data 12

CHAPTER 14SoundUsing Sound 14-9Pitch Shifting 14In general, you can set the value of a sound frame’s samplingRate slot to any float value less than tha

Page 517

CHAPTER 14 Sound14-10 Using SoundFor an example that uses output from a view based on the protoKeypadprototype, see the Newton DTS sample code on this

Page 518 - Using Store Parts 12

CHAPTER 14SoundSummary of Sound 14-11Summary of Sound 14Data Structures 14SndFrame Structure 14mySndFrame := {_proto: mySndFrame,sndFrameType : symbo

Page 519 - Creating a Store Part 12

CHAPTER 14 Sound14-12 Summary of SoundFunctions and Methods 14view:Dial(numberString,where)GetVolume()PlaySoundSync(soundFrameRef)RawDial(number, whe

Page 520 - Using Mock Entries 12

About Filing 15-1CHAPTER 15Filing 15Figure 15-0Table 15-0This chapter describes how your application can support the Filing service. This service allo

Page 521 - Creating a New Mock Entry 12

CHAPTER 15 Filing15-2 About FilingYour application must provide a target view that can manipulate the target. The target view is usually the same view

Page 522 - Getting Mock Entry Data 12

CHAPTER 15FilingAbout Filing 15-3When the user taps the protoFilingButton view, it displays the Filing slip shown in Figure 15-2.Figure 15-2 Filing sl

Page 523 - Functions and Methods 12

CHAPTER 1OverviewSystem Services 1-9Imaging and Printing 1At the operating system level, the Newton imaging and printing software is based on an objec

Page 524

CHAPTER 15 Filing15-4 About FilingFiling and other system services display user messages containing a string that is the user-visible name of your app

Page 525

CHAPTER 15FilingAbout Filing 15-5When no external store is available or the value of the doCardRouting slot isnil, the system displays the simplified v

Page 526

CHAPTER 15 Filing15-6 About FilingWhen the user taps the File button, the system invokes the GetTargetInfo method to discover the target and the targ

Page 527 - Drawing and Graphics 13

CHAPTER 15FilingAbout Filing 15-7The protoClockFolderTab is a variation on protoNewFolderTabthat displays the current time as its title text. Do not a

Page 528 - Shape-Based Graphics 13

CHAPTER 15 Filing15-8 About Filingon the internal store, the external store or both; that is, the user can specify a stores filter in addition to a lab

Page 529 - Figure 13-2 A rectangle

CHAPTER 15FilingAbout Filing 15-9Filing Compatibility Information 15Version 2.0 of the Newton operating system supports earlier versions of the Filing

Page 530 - Figure 13-3 An oval

CHAPTER 15 Filing15-10 Using the Filing ServiceThe new slots appObjectFileThisIn and appObjectFileThisOn support localization of your application’s Fi

Page 531 - About Drawing 13-5

CHAPTER 15FilingUsing the Filing Service 15-11 Create a storesFilter slot in your application’s target view Implement the FileThis and NewFilingFilt

Page 532 - Figure 13-7 A region

CHAPTER 15 Filing15-12 Using the Filing ServiceCreating the appAll Slot 15You must create in your application’s base view an appAll slot containing a

Page 533 - The Style Frame 13

CHAPTER 15FilingUsing the Filing Service 15-13Specifying the Target 15The GetTargetInfo method identifies the current target and target view to the sys

Page 534 - Drawing Compatibility 13

CHAPTER 1 Overview1-10 System ServicesBesides the sounds that are built into the system ROM, you can import external sound resources into an applicati

Page 535 - How to Draw 13

CHAPTER 15 Filing15-14 Using the Filing ServiceCreating the labelsFilter slot 15Your application’s target view must supply a labelsFilter slot. This s

Page 536 - Drawing Immediately 13

CHAPTER 15FilingUsing the Filing Service 15-15declare your folder tab view to the application’s base view. The system sets the folder tab view’s bound

Page 537 - Shape Style

CHAPTER 15 Filing15-16 Using the Filing ServiceThe arguments to the FileThis method supply all the information necessary to file a soup entry, includin

Page 538 - Controlling Clipping 13

CHAPTER 15FilingUsing the Filing Service 15-17perform any other actions that are appropriate, such as redrawing views affected by the change in filing

Page 539 - Tran sforming a Shape 13

CHAPTER 15 Filing15-18 Using the Filing Service// now redraw views affected by the change// NOTE: You could keep track of the original// labelsFilter

Page 540 - Using the Drawing Interface

CHAPTER 15FilingUsing the Filing Service 15-19Using Local or Global Folders Only 15To suppress the display of either local or global folders in the Fi

Page 541

CHAPTER 15 Filing15-20 SummarySummary 15This section summarizes the data structures, protos, functions, and methods used by the Filing service.Data St

Page 542 - Tran sl ating Data Shapes 13

CHAPTER 15FilingSummary 15-21Filing Protos 15protoFilingButton 15myFilingButtonView := // do not override ViewClickScript; use ButtonClickScript inste

Page 543 - Using Bitmaps 13

CHAPTER 15 Filing15-22 SummaryprotoClockFolderTab 15myClockFolderTabView := {{_parent: myAppBaseView, // see page 15-20_proto: { protoClockFolderTab,

Page 544

About the Find Service 16-1CHAPTER 16Find 16Figure 16-0Table 16-0This chapter describes how your application can support finding text, dates, or your o

Page 545 - (10, 10)

CHAPTER 1OverviewCommunications Services 1-11If you want to allow the user to search for data stored by your application, you need to implement certai

Page 546 - Drawing Non-Default Fonts 13

CHAPTER 16 Find16-2 About the Find ServiceFigure 16-1 The system-supplied Find slipThe system-supplied Find slip contains an input line that specifies

Page 547

CHAPTER 16FindAbout the Find Service 16-3Searching for data in the current application only is called a Local find operation. Figure 16-3 depicts a Loc

Page 548

CHAPTER 16 Find16-4 About the Find ServiceIn addition, an application can support searches of multiple data sets. For example, a personal finance progr

Page 549 - Summary of Drawing 13

CHAPTER 16FindAbout the Find Service 16-5Figure 16-6 The Find overview The user can tap items in the Find overview to display them. As items are displ

Page 550 - Protos 13

CHAPTER 16 Find16-6 Using the Find ServiceCompatibility Information 16The current version of the Find service opens in the text or date find mode last

Page 551 - Summary of Drawing 13-25

CHAPTER 16FindUsing the Find Service 16-7The only significant difference between a date find and a text find is that a different search method locates th

Page 552 - Functions and Methods 13

CHAPTER 16 Find16-8 Using the Find ServiceROM_CompatibleFinder proto, the string to display for each found item is contained in the title slot of each

Page 553 - Utility Functions 13

CHAPTER 16FindUsing the Find Service 16-9Figure 16-9 The ShowFoundItem method displays the view of an overview item The Find overview provides Routing

Page 554

CHAPTER 16 Find16-10 Using the Find ServiceThe most important difference between Local finds and other kinds of find operations is that when the system

Page 555 - Sound 14

CHAPTER 16FindUsing the Find Service 16-11 Employ multiple data sets from one application in a Selected find by adding the method AppFindTargets, and

Page 556 - Event-related Sounds 14

viChanges to Existing Functions and Methods 3-31New Warning Messages 3-32Obsolete Functions and Methods 3-32Using Views 3-32Getting References to View

Page 557 - Compatibility 14

CHAPTER 1 Overview1-12 Communications ServicesThe communication architecture is flexible, supporting complex communication needs. The architecture is a

Page 558 - Using Sound 14

CHAPTER 16 Find16-12 Using the Find ServiceThe full complement of slots in the finder frame resulting from your searches varies according to the finder

Page 559 - Playing Sound 14

CHAPTER 16FindUsing the Find Service 16-13NoteThe ROM_SoupFinder and ROM_CompatibleFindermethodsMakeFoundItem and AddFoundItem are internal methods, w

Page 560 - Using Sound

CHAPTER 16 Find16-14 Using the Find ServiceIf your application does not store data as soup entries, you can use the ROM_CompatibleFinder proto as the

Page 561 - Using Sound 14-7

CHAPTER 16FindUsing the Find Service 16-15Although the implementation of a search method is for the most part application specific, some general requir

Page 562 - Advanced Sound Techniques 14

CHAPTER 16 Find16-16 Using the Find ServiceUsing Your Own Text-Searching Method 16The following code example illustrates the kinds of tasks you must p

Page 563 - Pitch Shifting 14

CHAPTER 16FindUsing the Find Service 16-17Finding Text With a ROM_CompatibleFinder 16The following example shows how to use the ROM_CompatibleFinder p

Page 564 - Manipulating Sample Data 14

CHAPTER 16 Find16-18 Using the Find Service// We may also add slots here...};// Append myFinder frame to system’s results arrayAddArraySlot(results, m

Page 565 - Summary of Sound 14

CHAPTER 16FindUsing the Find Service 16-19querySpecFrame := {dateBefore : {indexPath : 'timeStamp, endKey: findTime,},dateAfter : {indexPath : &a

Page 566 - Sound Resources 14

CHAPTER 16 Find16-20 Using the Find Servicelimit a Find operation to certain data sets of an application. For example, a personal finance program may h

Page 567 - Filing 15

CHAPTER 16FindUsing the Find Service 16-21NoteApplications implementing these methods must also implement the usual Find and DateFind methods since a

Page 568 - About Filing

CHAPTER 1OverviewCommunications Services 1-13 transport interface communication tool interfaceThe first two, routing and endpoint interfaces, are ava

Page 569 - RegFolderChanged global

CHAPTER 16 Find16-22 Using the Find ServiceYour FindSoupExcerpt method may also extract extra information if the finder frame has been set up to hold a

Page 570

CHAPTER 16FindUsing the Find Service 16-23In the body of this method, you need to do whatever is necessary to display the soup entry myEntry. Typicall

Page 571 - CHAPTER 15

CHAPTER 16 Find16-24 Using the Find ServicebeginmyApp:Open();myApp:ShowFoundItem (items[index], self);end;end,...}Replacing the Built-in Find Slip 16

Page 572

CHAPTER 16FindUsing the Find Service 16-25The following code fragment shows how to use the statusView parameter to display a progress message to the u

Page 573 - About Filing 15-7

CHAPTER 16 Find16-26 SummarySummary 16Finder Protos 16mySoupFinder:= { // Use to find soup entries._proto: ROM_SoupFinder,owner:self, // View that get

Page 574

CHAPTER 16FindSummary 16-27myCompatibleFinder:= {// Use to find data stored in // non-soup data structures. //Override most to fit your data. _proto:

Page 575 - About Filing 15-9

CHAPTER 16 Find16-28 SummaryFunctions and Methods 16RegFindApps(appSymbol) //registers app. for global & //selected findsUnRegFindApps(appSymbol)

Page 576 - Using the Filing Service 15

About Additional System Services 17-1CHAPTER 17Additional System Services 17Figure 17-0Table 17-0This chapter discusses system services not covered el

Page 577 - Creating the appName Slot 15

CHAPTER 17 Additional System Services17-2 About Additional System Servicesa function object to redo the original function or method. Thus tapping the

Page 578 - Creating the appAll Slot 15

CHAPTER 17Additional System ServicesAbout Additional System Services 17-3Online Help 17Your application can provide a protoInfoButton view that displa

Page 579 - Specifying the Target 15

CHAPTER 1 Overview1-14 Communications Servicesinterface. You need to use the transport or endpoint interfaces only when writing custom communication t

Page 580 - Adding the Filing Button 15

CHAPTER 17 Additional System Services17-4 About Additional System ServicesFigure 17-2 Alarm slip with Snooze buttonPeriodic Alarms 17The periodic alar

Page 581 - W ARNING

CHAPTER 17Additional System ServicesAbout Additional System Services 17-5Alarms Compatibility 17All alarm information described here is new to the New

Page 582 - Using the Filing Service

CHAPTER 17 Additional System Services17-6 About Additional System ServicesStatus Slips With Progress Indicators 17For complex operations requiring mor

Page 583

CHAPTER 17Additional System ServicesUsing Additional System Services 17-7Power Registry 17The Power Registry implements a cooperative model for poweri

Page 584

CHAPTER 17 Additional System Services17-8 Using Additional System ServicesUsing Undo Actions 17The following code example shows how to provide undo ca

Page 585

CHAPTER 17Additional System ServicesUsing Additional System Services 17-9Avoiding Undo-Related “Bad Package” Errors 17The AddUndoAction method saves t

Page 586 - Summary 15

CHAPTER 17 Additional System Services17-10 Using Additional System ServicesNoteDo not install idler objects having idle time intervals of less than 10

Page 587 - Filing Protos 15

CHAPTER 17Additional System ServicesUsing Additional System Services 17-11Using Alerts and Alarms 17This section describes the use of functions and me

Page 588 - 15-22 Summary

CHAPTER 17 Additional System Services17-12 Using Additional System ServicesThe following code example adds an alarm set to execute in five minutes:AddA

Page 589 - About the Find Service 16

CHAPTER 17Additional System ServicesUsing Additional System Services 17-13The following code example removes all alarms an application has scheduled f

Page 590 - About the Find Service

CHAPTER 1OverviewApplication Components 1-15Communication Tool Interface 1Underlying the NewtonScript interface is the low-level communications system

Page 591 - Daphne" in the Notes

CHAPTER 17 Additional System Services17-14 Using Additional System ServicesIn any case, debugging your callback function is difficult because any excep

Page 592 - Daphne"

CHAPTER 17Additional System ServicesUsing Additional System Services 17-152. Define another method in your application’s base view named PeriodicAlarm.

Page 593 - About the Find Service 16-5

CHAPTER 17 Additional System Services17-16 Using Additional System ServicesTo add an action to the notify icon and display it, call the AddAction meth

Page 594 - Using the Find Service 16

CHAPTER 17Additional System ServicesUsing Additional System Services 17-17performing the myFunc function, pass it as the value of the workFunc paramet

Page 595 - Using the Find Service 16-7

CHAPTER 17 Additional System Services17-18 Using Additional System ServicesThe code above shows the two ways in which your code can respond when the u

Page 596 - Using the Find Service

CHAPTER 17Additional System ServicesUsing Additional System Services 17-192. Open the status slip. There are three parts to this process: Instantiate

Page 597 - Global and Selected Finds 16

CHAPTER 17 Additional System Services17-20 Using Additional System ServicesFigure 17-8 Built-in status view configurations If you want to use a system-

Page 598

CHAPTER 17Additional System ServicesUsing Additional System Services 17-21includes an InitialSetup frame initializes this view automatically before it

Page 599 - Using the Finder Protos 16

CHAPTER 17 Additional System Services17-22 Using Additional System ServicesinitialSetup: // used to initialize view automatically{name: 'vMyBarbe

Page 600

CHAPTER 17Additional System ServicesUsing Additional System Services 17-23And be sure to include this in your application’s ViewQuitScript to get rid

Page 601 - Method Description Override?

CHAPTER 1 Overview1-16 Application Componentsapplication using these components, Newton applications tend to be much smaller in size than similar appl

Page 602

CHAPTER 17 Additional System Services17-24 Using Additional System ServicesBecause the ViewSet method rebuilds and updates all the status slip’s child

Page 603 - Using the Find Service 16-15

CHAPTER 17Additional System ServicesUsing Additional System Services 17-25Registering Login Screen Functions 17If you want a power-on function that br

Page 604

CHAPTER 17 Additional System Services17-26 Using Additional System Servicescommunications endpoint, it can return the 'holdYourHorses symbol to d

Page 605 - Using the Find Service 16-17

CHAPTER 17Additional System ServicesSummary of Additional System Services 17-27Summary of Additional System Services 17This section summarizes the ser

Page 606

CHAPTER 17 Additional System Services17-28 Summary of Additional System ServicesFunctions and Methods 17myApp:AlarmsEnabled() //call PeriodicAlarms?my

Page 607 - Using the Find Service 16-19

CHAPTER 17Additional System ServicesSummary of Additional System Services 17-29Power Registry 17Functions and Methods 17BatteryCount() //returns batte

Page 609 - The FindSoupExcerpt Method 16

About the Assistant 18-1CHAPTER 18Intelligent Assistant 18Figure 18-0Table 18-0The Intelligent Assistant is a system service that attempts to complete

Page 610 - The ShowFoundItem Method 16

CHAPTER 18 Intelligent Assistant18-2 About the Assistanttemplates may be supplied by the system or by your application. Some system-supplied templates

Page 611 - Using the Find Service 16-23

CHAPTER 18Intelligent AssistantAbout the Assistant 18-3Figure 18-1 Assist slipWhen prompted by the Assist slip, the user must provide additional infor

Page 612

CHAPTER 1OverviewUsing System Software 1-17The NewtApp framework consists of a special collection of protos that are designed to be used together in a

Page 613 - Registering for Finds 16

CHAPTER 18 Intelligent Assistant18-4 About the AssistantTo allow the user to repeat recent actions easily, the bottom portion of the Please picker dis

Page 614 - Summary 16

CHAPTER 18Intelligent AssistantAbout the Assistant 18-5Programmer’s Overview 18This section describes how the templates, frames and methods used by th

Page 615 - Summary 16-27

CHAPTER 18 Intelligent Assistant18-6 About the AssistantYour task template designates one action template as its primary action. The primary action is

Page 616 - Functions and Methods 16

CHAPTER 18Intelligent AssistantAbout the Assistant 18-7Figure 18-4 Simplified overview of the Assistant’s matching processAction Templatecall_act := {

Page 617 - Additional System Services 17

CHAPTER 18 Intelligent Assistant18-8 About the AssistantYou define the PostParse method in your task template. Your PostParsemethod must perform any ac

Page 618 - Change Notifications 17

CHAPTER 18Intelligent AssistantAbout the Assistant 18-9"555-1234" as having the format of a telephone number. Based on that information, the

Page 619 - Alerts and Alarms 17

CHAPTER 18 Intelligent Assistant18-10 About the AssistantThe Signature and PreConditions Slots 18Your task template must define two slots, called signa

Page 620 - Periodic Alarms 17

CHAPTER 18Intelligent AssistantAbout the Assistant 18-11The Assistant creates a slot in the task frame only when a template is matched. For example, i

Page 621 - Progress Indicators 17

CHAPTER 18 Intelligent Assistant18-12 About the Assistantvalue "Bob Anderson", that element of the phrases array stores the entire string&qu

Page 622 - DoProgress

CHAPTER 18Intelligent AssistantAbout the Assistant 18-13Resolving Template-Matching Conflicts 18Template matching conflicts may arise when a template’s

Page 623 - Power Registry 17

CHAPTER 1 Overview1-18 The NewtonScript LanguageThe NewtonScript Language 1You write Newton applications in NewtonScript, a dynamic object-oriented la

Page 624 - Using Undo Actions 17

CHAPTER 18 Intelligent Assistant18-14 About the AssistantIf you specify the 'dyna_user_action symbol as the first element of your task template’s

Page 625 - Using Idler Objects 17

CHAPTER 18Intelligent AssistantUsing the Assistant 18-15Using the Assistant 18This section describes how to make an application behavior available thr

Page 626 - Using Online Help 17

CHAPTER 18 Intelligent Assistant18-16 Using the Assistant5. Define the words or phrases this template is to match as an array of strings in its lexicon

Page 627 - Using Alerts and Alarms 17

CHAPTER 18Intelligent AssistantUsing the Assistant 18-17Based on the definition above, you can derive a my_other_action template that holds the value &

Page 628 - Retrieving Alarm Keys 17

CHAPTER 18 Intelligent Assistant18-18 Using the AssistantSample PostParse Method 18The following code fragment is an example of a PostParse method tha

Page 629 - Removing Installed Alarms 17

CHAPTER 18Intelligent AssistantUsing the Assistant 18-19preConditions array is related to the first element of the signature array, the second element

Page 630 - Additional System Services

CHAPTER 18 Intelligent Assistant18-20 Using the Assistant2. Define an action template for opening the appropriate help book. The global functions ShowM

Page 631 - Using Progress Indicators 17

CHAPTER 18Intelligent AssistantSummary 18-21Summary 18Data Structures 18Task Frame 18// Returned by ParseUtter function{// original user input phraseo

Page 632

CHAPTER 18 Intelligent Assistant18-22 Summary// Optional. View template that defines task sliptaskslip : myTaskSlipView,// internal use only - always

Page 633

CHAPTER 18Intelligent AssistantSummary 18-23System-Supplied Action Templates 18// base your action templates on this generic actiondyna_user_action:=

Page 634

CHAPTER 1OverviewWhat’s New in Newton 2.0 1-19The NewtApp framework is not suited for all Newton applications. If your application stores data as indi

Page 635

CHAPTER 18 Intelligent Assistant18-24 Summary// Action template for creating To Do itemsremind_act := {lexicon: ["remember", "remind&qu

Page 636

CHAPTER 18Intelligent AssistantSummary 18-25// Action template for scheduling lunch in Dates applunch_act := {isa: 'meal_act,usualTime:"12:0

Page 637

CHAPTER 18 Intelligent Assistant18-26 SummarySystem-Supplied Target Templates 18Places 18// list of system-supplied where_obj target templates// syste

Page 638

CHAPTER 18Intelligent AssistantSummary 18-27People 18person := { // generic person templateisa: 'who_obj,value: nil // system use only…}title :=

Page 639

CHAPTER 18 Intelligent Assistant18-28 SummaryDeveloper-Supplied Functions and Methods 18taskFrame:PostParse() // called after input is parsedApplicati

Page 640 - Using the Power Registry 17

19-1CHAPTER 19Built-in Applications and System Data 19Figure 19-0Table 19-0This chapter describes the interfaces to the built-in applications. It also

Page 641

CHAPTER 19 Built-in Applications and System Data19-2 NamesIMPORTANTSoup formats are subject to change. Applications that rely on soup formats risk inc

Page 642

CHAPTER 19Built-in Applications and System DataNames 19-3Figure 19-1 Names application Card and All Info views Names Compatibility 19All the Names met

Page 643 - Notification and Alarms 17

CHAPTER 19 Built-in Applications and System Data19-4 NamesUsing the Names Application 19This section describes adding a new type of card to the Names

Page 644 - Reporting Progress 17

CHAPTER 19Built-in Applications and System DataNames 19-5Here is an example of an infoFrame for a Names viewDef defining a view that has two fields, Mak

Page 645

CHAPTER 1 Overview1-20 What’s New in Newton 2.0Protos 1There are many new protos supplied in the new system ROM. There are new pop-up button pickers,

Page 646

CHAPTER 19 Built-in Applications and System Data19-6 NamesThe bizCardIcon slot contains an icon representing the new layout, to be shown in the Card S

Page 647 - Intelligent Assistant 18

CHAPTER 19Built-in Applications and System DataNames 19-7 get information from Names soup entries for credit/phone card information (BcCreditCards) f

Page 648 - No Verb in Input String 18

CHAPTER 19 Built-in Applications and System Data19-8 DatesThe diamond appears only if there is more than one owner card; otherwise you see just a name

Page 649 - "call"

CHAPTER 19Built-in Applications and System DataDates 19-9Figure 19-2 Dates application Day and Day’s Agenda views Meetings and events can repeat. That

Page 650 - The Task Slip 18

CHAPTER 19 Built-in Applications and System Data19-10 Dates In addition to changes in the programmatic interface, the 2.0 version has extensive chang

Page 651 - Programmer’s Overview 18

CHAPTER 19Built-in Applications and System DataDates 19-11Adding Meetings or Events 19You can programmatically add meetings and events by using the Ad

Page 652 - About the Assistant

CHAPTER 19 Built-in Applications and System Data19-12 DatesDeleting Meetings and Events 19The Dates application provides three methods for deleting me

Page 653 - About the Assistant 18-7

CHAPTER 19Built-in Applications and System DataDates 19-13 To delete a single instance of the repeating event created in “Adding Meetings or Events”:

Page 654

CHAPTER 19 Built-in Applications and System Data19-14 Dates[StringToDate("6/1/95 12:00am"), StringToDate ("6/30/95 11:59pm")], nil

Page 655 - About the Assistant 18-9

CHAPTER 19Built-in Applications and System DataDates 19-15 To move a meeting half an hour earlier and give it a different (90 minute) duration:GetRoo

Page 656

CHAPTER 1OverviewWhat’s New in Newton 2.0 1-21clParagraphView now support ink text. There are several new functions that allow you to manipulate and c

Page 657 - The Task Frame 18

CHAPTER 19 Built-in Applications and System Data19-16 Dates Get or set the meeting icon type with GetMeetingIconType and SetMeetingIconType.The remai

Page 658 - The Value Slot 18

CHAPTER 19Built-in Applications and System DataDates 19-17// get the notes of the last meeting. If there are no // meeting notes, GetMeetingNotes retu

Page 659 - About the Assistant 18-13

CHAPTER 19 Built-in Applications and System Data19-18 Datesand a frame containing the definition of the new meeting type. This frame has the following

Page 660 - Compatibility Information 18

CHAPTER 19Built-in Applications and System DataDates 19-19Examples of Creating New Meeting Types 19The following example code registers a new meeting

Page 661 - Using the Assistant 18

CHAPTER 19 Built-in Applications and System Data19-20 Dateslocal slip :=BuildContext({_proto: protoFloaterviewFlags:vClickable + vFloating +vApplicati

Page 662 - Using the Assistant

CHAPTER 19Built-in Applications and System DataDates 19-21 OpenMeetingSlip opens the meeting slip for a specific meeting or event. RegInfoItem adds

Page 663 - Using the Assistant 18-17

CHAPTER 19 Built-in Applications and System Data19-22 To Do ListUsing the Dates Soups 19The Dates application stores meeting and event information an

Page 664 - Defining the Task Template 18

CHAPTER 19Built-in Applications and System DataTo Do List 19-23Figure 19-3 The To Do List application To Do List Compatibility 19Version 2.0 reads and

Page 665 - Using the Assistant 18-19

CHAPTER 19 Built-in Applications and System Data19-24 To Do ListAlso, note that some of these methods only work when the To Do List is open. You can

Page 666

CHAPTER 19Built-in Applications and System DataTo Do List 19-25GetToDoItemsForThisDate returns an array of tasks. Tasks are elements of the array stor

Page 667 - Summary 18

viiChapter 4 NewtApp Applications 4-1About the NewtApp Framework 4-1The NewtApp Protos 4-2About newtApplication 4-4About newtSoup 4-5The Layout Protos

Page 668 - Target Template 18

CHAPTER 1 Overview1-22 What’s New in Newton 2.0The implementation of undo has changed to an undo/redo model instead of two levels of undo, so applicat

Page 669 - Summary 18-23

CHAPTER 19 Built-in Applications and System Data19-26 To Do ListbegintheTask := todaysTasksArray[i];theIndex := i;end;//and mark it as doneGetRoot().

Page 670 - 18-24 Summary

CHAPTER 19Built-in Applications and System DataTime Zones 19-27of slots in a soup entry. If you don’t use these functions to get and set entry slots i

Page 671 - Summary 18-25

CHAPTER 19 Built-in Applications and System Data19-28 Time ZonesUsing the Time Zone Application 19The application program interface provides functions

Page 672 - 18-26 Summary

CHAPTER 19Built-in Applications and System DataTime Zones 19-29though that the list of cities and countries is not necessarily the same on your Newton

Page 673 - Summary 18-27

CHAPTER 19 Built-in Applications and System Data19-30 NotesareaCode: "503",region:"OR",airport:"PDX"}Using Longitude and

Page 674 - 18-28 Summary

CHAPTER 19Built-in Applications and System DataNotes 19-31Figure 19-6 Notes note and Checklist views About the Notes Application 19Notes is a simple a

Page 675 - System Data 19

CHAPTER 19 Built-in Applications and System Data19-32 NotesUsing the Notes Application 19This section describes the methods that add new notes, and th

Page 676 - Names 19

CHAPTER 19Built-in Applications and System DataNotes 19-33 points :ArrayToPoints ([11, // a rectangle5, //how many points 0,0, //first point0,25, //

Page 677 - Names Compatibility 19

CHAPTER 19 Built-in Applications and System Data19-34 Fax Soup EntriesDetailed information on the data structures that support these stationeries is p

Page 678 - Adding a New Data Item 19

CHAPTER 19Built-in Applications and System DataPrefs and Formulas Rolls 19-35body within the In/Out Box soup entry, where a user can view it. Applicat

Page 679 - Names 19-5

CHAPTER 1OverviewWhat’s New in Newton 2.0 1-23The Dates application includes a comprehensive interface that gives you the ability to add, find, move, a

Page 680

CHAPTER 19 Built-in Applications and System Data19-36 Auxiliary ButtonsPrefs and Formulas Compatibility 19The functions RegPrefs, UnRegPrefs, RegFormu

Page 681 - Using the Names Protos 19

CHAPTER 19Built-in Applications and System DataAuxiliary Buttons 19-37Figure 19-9 The Notes application with and without an auxiliary button Using Aux

Page 682 - Dates 19

CHAPTER 19 Built-in Applications and System Data19-38 Icons and the Extras DrawerAny application that adds buttons to another application should provi

Page 683 - Dates Compatibility 19

CHAPTER 19Built-in Applications and System DataIcons and the Extras Drawer 19-39This section also covers creating a cursor that iterates over icons in

Page 684 - GetRoot().calendar;

CHAPTER 19 Built-in Applications and System Data19-40 Icons and the Extras DrawerUsing Extras Drawer Cursors 19The Extras Drawer method GetPartCursor

Page 685 - Adding Meetings or Events 19

CHAPTER 19Built-in Applications and System DataIcons and the Extras Drawer 19-41InstallScript := func (partFrame)beginlocal ed := GetRoot().extrasDra

Page 686 - CHAPTER 19

CHAPTER 19 Built-in Applications and System Data19-42 Icons and the Extras DrawerCreating a Script Icon 19Installation of a script icon is basically t

Page 687 - Finding Meetings or Events 19

CHAPTER 19Built-in Applications and System DataIcons and the Extras Drawer 19-43InstallScript := func(partFrame, removeFrame)beginlocal mySlip := GetL

Page 688 - Moving Meetings and Events 19

CHAPTER 19 Built-in Applications and System Data19-44 System Data2. Add a frame called soupervisor to your application’s base view. Note that this mea

Page 689 - Dates 19-15

CHAPTER 19Built-in Applications and System DataSystem Data 19-45Functions for Accessing User Configuration Data 19The global functions GetUserConfig an

Page 690

CHAPTER 1 Overview1-24 What’s New in Newton 2.0There have been significant changes in the handling of binary (raw) data. For input, you can now target

Page 691 - Dates 19-17

CHAPTER 19 Built-in Applications and System Data19-46 SummarySummary 19Constants and Variables 19Names Card Layouts 19Dates Variables 19firstDayOfWee

Page 692 - Slot description

CHAPTER 19Built-in Applications and System DataSummary 19-47Dates Constants for repeatType 19Other Date Constants 19Dates Constants for the Weeks in a

Page 693 - Dates 19-19

CHAPTER 19 Built-in Applications and System Data19-48 SummarycurrentCountrycurrentEmporiumcurrentPersonacurrentPrinterdialingPrefixdoAutoAdddoInkWordR

Page 694 - Miscellaneous Operations 19

CHAPTER 19Built-in Applications and System DataSummary 19-49protoEmporiumPopup 19myEmporiumPopup := {_proto: protoEmporiumPopup, SetUpText: function,/

Page 695 - Dates 19-21

CHAPTER 19 Built-in Applications and System Data19-50 SummarycardType: integer,name: frame,names: array,company: stringOrRichString,title: stringOrRic

Page 696 - To Do List 19

CHAPTER 19Built-in Applications and System DataSummary 19-51phones: array,email: stringOrRichString,emailAddrs: array,emailPassword: string,pagers: ar

Page 697 - To Do List Compatibility 19

CHAPTER 19 Built-in Applications and System Data19-52 Summaryemail: stringOrRichString,emailAddrs: array,notes: array,sorton: string,...}Worksite Entr

Page 698 - Accessing Tasks 19

CHAPTER 19Built-in Applications and System DataSummary 19-53version: integer,viewBounds: frame,exceptions: array,...}Notes Frames 19aNotesFrame := {no

Page 699 - Checking-Off a Task 19

CHAPTER 19 Built-in Applications and System Data19-54 Summarycardfile:BcCreditCards(inEntry, inWhich) // returns the// credit card informationcardfile

Page 700 - Using the To Do List Soup 19

CHAPTER 19Built-in Applications and System DataSummary 19-55calendar:GetMeetingIconType(mtgTextOFrame, mtgStartDate)// returns the type of icon of a m

Page 701 - Time Zones 19

Choosing an Application Structure 2-1CHAPTER 2Getting Started 2Figure 2-0Table 2-0This chapter describes where to begin when you’re thinking about dev

Page 702 - GetRoot().worldClock

CHAPTER 19 Built-in Applications and System Data19-56 Summarycalendar:SetMeetingNotes(mtgText, mtgStartDate, notes)// sets notes for specified meeting

Page 703 - Slot descriptions

CHAPTER 19Built-in Applications and System DataSummary 19-57Time Zone Functions 19GetCityEntry(name) // returns information about the // specified cit

Page 704 - Notes 19

CHAPTER 19 Built-in Applications and System Data19-58 SummaryExtras Drawer Functions and Methods 19extrasDrawer:AddExtraIcon(iconType, paramFrame, pkg

Page 705 - Notes Compatibility 19

About Localization 20-1CHAPTER 20Localizing Newton Applications 20Figure 20-0Table 20-0This chapter discusses how to support multiple languages and us

Page 706 - Creating New Notes 19

CHAPTER 20 Localizing Newton Applications20-2 About LocalizationFigure 20-1 The Locale settings in PreferencesThe most important of these settings is

Page 707 - Using the Notes Soup 19

CHAPTER 20Localizing Newton ApplicationsUsing the Localization Features of the Newton 20-3 Displaying the text. This uses the date, time, and number

Page 708 - Fax Soup Entries 19

CHAPTER 20 Localizing Newton Applications20-4 Using the Localization Features of the NewtonDefining a Localization Frame 20You define the alternative la

Page 709 - Prefs and Formulas Rolls 19

CHAPTER 20Localizing Newton ApplicationsUsing the Localization Features of the Newton 20-5 A frames path the compiler uses to find the alternative obj

Page 710 - Auxiliary Buttons 19

CHAPTER 20 Localizing Newton Applications20-6 Using the Localization Features of the NewtonMeasuring String Widths at Compile Time 20When the size of

Page 711 - Using Auxiliary Buttons 19

CHAPTER 20Localizing Newton ApplicationsUsing the Localization Features of the Newton 20-7For example:activeLocale:=GetLocale();Once you’ve obtained a

Page 712 - Icons and the Extras Drawer

CHAPTER 2 Getting Started2-2 Choosing an Application Structuredon’t follow the “classic” form-based model. For example, some types of applications tha

Page 713 - GetRoot().extrasDrawer

CHAPTER 20 Localizing Newton Applications20-8 Using the Localization Features of the NewtonIn the preceding code example the myLocaleBundle frame is b

Page 714 - Adding a Soup Icon 19

CHAPTER 20Localizing Newton ApplicationsUsing the Localization Features of the Newton 20-9The RemoveLocale function accepts as its argument a symbol s

Page 715 - Removing a Soup Icon 19

CHAPTER 20 Localizing Newton Applications20-10 Using the Localization Features of the Newton//save the current locale settingpreviousLocale:=GetLocale

Page 716 - Creating a Script Icon 19

CHAPTER 20Localizing Newton ApplicationsUsing the Localization Features of the Newton 20-11Functions that Use the Locale Setting To Determine Format 2

Page 717

CHAPTER 20 Localizing Newton Applications20-12 Using the Localization Features of the NewtonTo use one of these values, access the appropriate slot by

Page 718

CHAPTER 20Localizing Newton ApplicationsUsing the Localization Features of the Newton 20-13// get the current timetheTime:= Time();// pass the time an

Page 719 - System Data 19-45

CHAPTER 20 Localizing Newton Applications20-14 Summary of Localization FunctionsSummary of Localization Functions 20This section categorizes the date,

Page 720 - Summary 19

CHAPTER 20Localizing Newton ApplicationsSummary of Localization Functions 20-15StringToTime(timeString)TimeStr(time, timeStrSpec)Date Frame Functions

Page 722 - Protos 19

About Routing 21-1CHAPTER 21Routing Interface 21Figure 21-0Table 21-0This chapter describes the Routing interface in Newton system software. The Routi

Page 723 - Soup Formats 19

CHAPTER 2Getting StartedChoosing an Application Structure 2-3automatically manage many routine programming tasks. For example, some of the tasks the p

Page 724 - 19-50 Summary

CHAPTER 21 Routing Interface21-2 About Routinguser can switch between the In Box and the Out Box by tapping radio buttons in the application.When open

Page 725 - Summary 19-51

CHAPTER 21Routing InterfaceAbout Routing 21-3In Box receives such an item, it is automatically transferred from the In Box to the application, without

Page 726 - Dates Soups 19

CHAPTER 21 Routing Interface21-4 About RoutingIn the user interface of your application, the Action button should be positioned differently, depending

Page 727 - Functions and Methods 19

CHAPTER 21Routing InterfaceAbout Routing 21-53. Using the list of formats, the system builds a list of transports that can handle at least one of the

Page 728 - Dates Application Methods 19

CHAPTER 21 Routing Interface21-6 About Routingwhich transports show up in the Action picker. The system builds a list of all routing formats registere

Page 729 - Summary 19-55

CHAPTER 21Routing InterfaceAbout Routing 21-7Figure 21-4 Format picker in routing slipThe built-in applications and transports support routing of the

Page 730 - , width, font) // Returns

CHAPTER 21 Routing Interface21-8 Using RoutingYou must register all routing formats that you define with the system, usually in your application part I

Page 731 - Auxiliary Button Functions 19

CHAPTER 21Routing InterfaceUsing Routing 21-9 send items programmatically receive items allow items to be viewed in the In/Out BoxProviding Transpo

Page 732 - 19-58 Summary

CHAPTER 21 Routing Interface21-10 Using RoutingGetting and Verifying the Target Object 21When the user first taps the Action button, but before a choic

Page 733 - Applications 20

CHAPTER 21Routing InterfaceUsing Routing 21-11The VerifyRoutingInfo method is passed two parameters, the target information frame obtained by GetTarge

Page 734 - Locale and ROM Version 20

CHAPTER 2 Getting Started2-4 Package Loading, Activation, and DeactivationOther Kinds of Software 2There are other kinds of software you can develop f

Page 735 - CHAPTER 20

CHAPTER 21 Routing Interface21-12 Using RoutingIf your application does not have a lastFormats slot, or if a matching format is not found (the format

Page 736

CHAPTER 21Routing InterfaceUsing Routing 21-13Storing an Alias to the Target Object 21When there is a single target object, if there is not enough sto

Page 737

CHAPTER 21 Routing Interface21-14 Using Routingoverride the routing format methods that handle the alias operations: TargetSize,MakeBodyAlias, and Res

Page 738

CHAPTER 21Routing InterfaceUsing Routing 21-15If your GetTargetInfo method returns a multiple-item target object by using the functionCreateTargetCurs

Page 739 - Changing Locale Settings 20

CHAPTER 21 Routing Interface21-16 Using RoutingIf you need to read the body slot within the fields frame, note that it might contain an alias. In orde

Page 740 - Removing a Locale Bundle 20

CHAPTER 21Routing InterfaceUsing Routing 21-17RegisterViewDef. Nor should you use DefConst, or any other method that directly references the routing f

Page 741 - Changing the Active Locale 20

CHAPTER 21 Routing Interface21-18 Using RoutingCreating a Print Format 21You create a print format by using protoPrintFormat. This proto is required f

Page 742 - Localized Output 20

CHAPTER 21Routing InterfaceUsing Routing 21-19in portrait mode ('portrait) or horizontally in landscape mode ('landscape).The default value

Page 743

CHAPTER 21 Routing Interface21-20 Using RoutingThen the print format view is closed. Note that the ViewShowScript and ViewDrawScript messages are not

Page 744

CHAPTER 21Routing InterfaceUsing Routing 21-21The PrintNextPageScript method should construct the view for the next page of data so that the message s

Page 745 - Currency Values 20

CHAPTER 2Getting StartedPackage Loading, Activation, and Deactivation 2-5when it is moved to another store (it is deactivated then reactivated), or wh

Page 746 - Date and Time Functions 20

CHAPTER 21 Routing Interface21-22 Using Routing// which takes targetInfoFrame.target and makes an // alias, if appropriateend,TextScript: func(item,ta

Page 747 - Utility Functions 20

CHAPTER 21Routing InterfaceUsing Routing 21-23Your application can provide internal application-defined actions, such as deleting and duplicating, that

Page 748

CHAPTER 21 Routing Interface21-24 Using RoutingPerforming the Routing Action 21The important slot in each frame in the routeScripts array is the Route

Page 749 - Routing Interface 21

CHAPTER 21Routing InterfaceUsing Routing 21-25cursors, refer to Chapter 11, “Data Storage and Retrieval.” Note that only these three cursor methods ar

Page 750 - The In Box 21

CHAPTER 21 Routing Interface21-26 Using RoutingSending Items Programmatically 21Your application can send an item programmatically, using a specific tr

Page 751 - Action Picker 21

CHAPTER 21Routing InterfaceUsing Routing 21-27The following frame shows a summary of the slots you can include in the item frame. Note that some of th

Page 752 - GetTargetInfo message to the

CHAPTER 21 Routing Interface21-28 Using Routingentry and even some of the slots from the soup entry. Note that you must use name references; you canno

Page 753 - Routing Formats 21

CHAPTER 21Routing InterfaceUsing Routing 21-29data. That variable holds the printer selected by the user as the current printer. You can use this func

Page 754 - About Routing

CHAPTER 21 Routing Interface21-30 Using Routing// get an entry from the Names soup to use for the recipientcurs:=GetUnionSoupAlways(ROM_CardfileSoupNa

Page 755 - Format Picker

CHAPTER 21Routing InterfaceUsing Routing 21-31Receiving Data 21Incoming data arrives first as an entry in the In Box. If there is a public view definiti

Page 756 - Using Routing 21

CHAPTER 2 Getting Started2-6 Package Loading, Activation, and DeactivationIMPORTANTAny changes that you make to the system in the InstallScript functi

Page 757 - Using Routing 21-9

CHAPTER 21 Routing Interface21-32 Using RoutingData” (page 21-34). If a matching application is found in the registry, the appSymbol slot of the item

Page 758 - Using Routing

CHAPTER 21Routing InterfaceUsing Routing 21-33Manually Putting Away Items 21If an item is not put away automatically, it resides in the In Box until t

Page 759 - Using Routing 21-11

CHAPTER 21 Routing Interface21-34 Using RoutingRegistering to Receive Foreign Data 21To receive data from a different application or from a non-Newton

Page 760

CHAPTER 21Routing InterfaceUsing Routing 21-35not provide a view definition, and there are no other view definitions available for that data class, the

Page 761 - Using Routing 21-13

CHAPTER 21 Routing Interface21-36 Using Routingaccess addressing or other information in the entry besides the actual data being routed, look at the f

Page 762 - Storing Multiple Items 21

CHAPTER 21Routing InterfaceSummary of the Routing Interface 21-37Summary of the Routing Interface 21Constants 21ROM_RouteDeleteIcon // bitmap for dele

Page 763 - Using Routing 21-15

CHAPTER 21 Routing Interface21-38 Summary of the Routing InterfaceRouteScripts Array Element 21RouteScriptsArrayElement := {title: string, // string n

Page 764

CHAPTER 21Routing InterfaceSummary of the Routing Interface 21-39TextScript: function, // gets text dataTargetSize: function, // determines target si

Page 765 - Using Routing 21-17

CHAPTER 21 Routing Interface21-40 Summary of the Routing InterfaceGetItemTransport(item)view:GetRouteScripts(targetInfoFrame)RegAppClasses(appSymbol,

Page 766 - Creating a Print Format 21

About Transports 22-1CHAPTER 22Transport Interface 22Figure 22-0Table 22-0This chapter describes the Transport interface in Newton system software. Th

Page 767 - Printing and Faxing 21

CHAPTER 2Getting StartedEffects of System Resets on Application Data 2-7Effects of System Resets on Application Data 2Two kinds of reset operations—ha

Page 768

CHAPTER 22 Transport Interface22-2 About Transportstransports that might be installed in the system at any time. An application need not know anything

Page 769 - Creating a Frame Format 21

CHAPTER 22Transport InterfaceAbout Transports 22-3destAppSymbol Optional. A symbol identifying the application to receive the item, if it is different

Page 770

CHAPTER 22 Transport Interface22-4 About TransportscompletionScriptA Boolean; if true, the transport sends the ItemCompletionScript message to the app

Page 771 - Using Routing 21-23

CHAPTER 22Transport InterfaceUsing the Transport Interface 22-5Using the Transport Interface 22This section describes how to use the Transport interfa

Page 772 - Handling Multiple Items 21

CHAPTER 22 Transport Interface22-6 Using the Transport InterfaceHere is an example of installing a transport in the part InstallScript function:Instal

Page 773 - Handling No Target Item 21

CHAPTER 22Transport InterfaceUsing the Transport Interface 22-7The default setting of the addressingClass slot is the symbol '|nameRef.email|For

Page 774

CHAPTER 22 Transport Interface22-8 Using the Transport Interfacethe routing slip is not closed. If TransportChanged returns nil, then the transport is

Page 775 - Creating a Name Reference 21

CHAPTER 22Transport InterfaceUsing the Transport Interface 22-9After sending an item (successfully or unsuccessfully), you must call ItemCompleted to

Page 776 - Specifying a Printer 21

CHAPTER 22 Transport Interface22-10 Using the Transport InterfaceSome transports may ignore the ReceiveRequest message, since they receive data contin

Page 777 - Using Routing 21-29

CHAPTER 22Transport InterfaceUsing the Transport Interface 22-11After downloading all the remote data, you must refresh the In Box view, so the items

Page 778

viiiCreating a DataDef 5-8Defining DataDef Methods 5-9Creating ViewDefs 5-11Registering Stationery for an Auto Part 5-13Using the MinimalBounds ViewDef

Page 779 - Receiving Data 21

CHAPTER 2 Getting Started2-8 Flow of ControlWhen the operating system cannot obtain enough memory to complete a requested operation, it may display a

Page 780

CHAPTER 22 Transport Interface22-12 Using the Transport InterfaceHandling Requests When the Transport Is Active 22While the transport is actively send

Page 781 - Using Routing 21-33

CHAPTER 22Transport InterfaceUsing the Transport Interface 22-13// SendRequest methodfunc (newRequest)beginif status <> 'idle then // check

Page 782

CHAPTER 22 Transport Interface22-14 Using the Transport Interfacefor the item. This allows the transport an opportunity to add its own slots to the it

Page 783 - View Definition Slots 21

CHAPTER 22Transport InterfaceUsing the Transport Interface 22-15e-mail address to the sender’s internet address. Here’s an example of code that sets t

Page 784 - Advanced Alias Handling 21

CHAPTER 22 Transport Interface22-16 Using the Transport Interfaceif dataDef then beginitem.fromRef := dataDef:MakeNameRef(persona, addressingClass);//

Page 785 - Data Structures 21

CHAPTER 22Transport InterfaceUsing the Transport Interface 22-17Storing Transport Preferences and Configuration Information 22Transports can store user

Page 786 - Protos 21

CHAPTER 22 Transport Interface22-18 Using the Transport Interfaceto the Action picker in an application. Here is an example of a return value that add

Page 787 - Functions and Methods 21

CHAPTER 22Transport InterfaceUsing the Transport Interface 22-19Application Messages 22Applications can send messages directly to a single transport o

Page 788 - Application-Defined Methods 21

CHAPTER 22 Transport Interface22-20 Using the Transport InterfaceError Handling 22The default exception handling method implemented by protoTransport

Page 789 - Transport Interface 22

CHAPTER 22Transport InterfaceUsing the Transport Interface 22-21Providing a Status Template 22A status template for a transport is based on the proto

Page 790 - Item Frame 22

CHAPTER 2Getting StartedLocalization 2-9IMPORTANTIf you don't remove references to unused soups, entries, cursors, and other objects, the objects

Page 791 - About Transports 22-3

CHAPTER 22 Transport Interface22-22 Using the Transport InterfaceFigure 22-1 Status view subtypesEach child view included in a subtype has one importa

Page 792 - About Transports

CHAPTER 22Transport InterfaceUsing the Transport Interface 22-23Using this set of predefined status templates gives all transports a similar user inter

Page 793 - Installing the Transport 22

CHAPTER 22 Transport Interface22-24 Using the Transport Interface// vStatus subtype:SetStatusDialog('Connecting, 'vStatus, "Looking for

Page 794 - Setting the Address Class 22

CHAPTER 22Transport InterfaceUsing the Transport Interface 22-25The vBarber subtype shows a barber pole-like image, but it doesn’t animate automatical

Page 795 - Grouping Transports 22

CHAPTER 22 Transport Interface22-26 Using the Transport InterfaceFigure 22-2 Routing information viewIn your transport object, store a reference to yo

Page 796 - Sending Data 22

CHAPTER 22Transport InterfaceUsing the Transport Interface 22-27Store a reference to your routing slip template in the routingSlip slot in your transp

Page 797 - Receiving Data 22

CHAPTER 22 Transport Interface22-28 Using the Transport Interfacethe item is updated. The format picker also sends the SetupItem message to the format

Page 798 - Using the Transport Interface

CHAPTER 22Transport InterfaceUsing the Transport Interface 22-29The name of the current transport appears in the upper-right corner of the protoFullRo

Page 799

CHAPTER 22 Transport Interface22-30 Using the Transport InterfacePositioning Elements in the Lower Portion of the Routing Slip 22The height of the low

Page 800

CHAPTER 22Transport InterfaceUsing the Transport Interface 22-31information at that time. For example, if a user queued several fax items from home bu

Page 801 - Obtaining an Item Frame 22

CHAPTER 2 Getting Started2-10 Developer Signature GuidelinesExamples of valid signatures includeNEWTONDTSJoe’s Cool Apps1NEWTON2DTSWhat the #$*? SWHow

Page 802

CHAPTER 22 Transport Interface22-32 Using the Transport InterfaceFigure 22-6 Address picker with remembered namesThe Intelligent Assistant also intera

Page 803

CHAPTER 22Transport InterfaceUsing the Transport Interface 22-33Most transports can use the built-in name reference data and view definitions to handle

Page 804 - Completion and Logging 22

CHAPTER 22 Transport Interface22-34 Using the Transport Interface default folders for new and read or sent items show/hide status and progress dialo

Page 805

CHAPTER 22Transport InterfaceUsing the Transport Interface 22-35For example, the built-in Print transport uses the protoTransportPrefs proto for its p

Page 806

CHAPTER 22 Transport Interface22-36 Summary of the Transport InterfaceSummary of the Transport Interface 22Constants 22ROM_RouteMailIcon // bitmap for

Page 807 - Application Messages 22

CHAPTER 22Transport InterfaceSummary of the Transport Interface 22-37AppInFront: function, // notifies transport of change in app frontmost statusAppO

Page 808 - Power-Off Handling 22

CHAPTER 22 Transport Interface22-38 Summary of the Transport InterfaceTranslateError: function, // returns a string translationVerifyRoutingInfo: func

Page 809

CHAPTER 22Transport InterfaceSummary of the Transport Interface 22-39protoAddressPicker 22anAddressPicker := {_proto: protoAddressPicker, // address p

Page 811

About the Endpoint Interface 23-1CHAPTER 23Endpoint Interface 23Figure 23-0Table 23-0This chapter describes the basic Endpoint interface in Newton sys

Page 812

CHAPTER 2Getting StartedDeveloper Signature Guidelines 2-11Examples of valid application names includeLlamaGood Form2 Fun 4 UChessNoteIt’s recommended

Page 813

CHAPTER 23 Endpoint Interface23-2 About the Endpoint InterfaceThe endpoint object created from this proto encapsulates and maintains the details of th

Page 814

CHAPTER 23Endpoint InterfaceAbout the Endpoint Interface 23-3This kind of asynchronous operation lends itself nicely to creating state-machine based c

Page 815 - Using protoFullRouteSlip 22

CHAPTER 23 Endpoint Interface23-4 About the Endpoint InterfaceIf the input operation terminates normally—that is, the InputScript method is called—the

Page 816

CHAPTER 23Endpoint InterfaceAbout the Endpoint Interface 23-5The different types of data forms and the defaults are described in more detail in “Data

Page 817

CHAPTER 23 Endpoint Interface23-6 About the Endpoint Interfaceplaceholder or default values, which the system fills in when the data is received. For m

Page 818

CHAPTER 23Endpoint InterfaceAbout the Endpoint Interface 23-7Endpoint Options 23You configure the communication tool underlying an endpoint object by s

Page 819 - Using protoAddressPicker 22

CHAPTER 23 Endpoint Interface23-8 Using the Endpoint Interface Multiple communication sessions. The system now supports multiple simultaneous communi

Page 820

CHAPTER 23Endpoint InterfaceUsing the Endpoint Interface 23-9All option data you set gets packed together into one block of data. Each option within t

Page 821

CHAPTER 23 Endpoint Interface23-10 Using the Endpoint Interface'long,'long]}};When you set endpoint options, the cloned option frame is retu

Page 822

CHAPTER 23Endpoint InterfaceUsing the Endpoint Interface 23-11When you are finished with an endpoint, you must unbind it using the UnBindmethod, then d

Page 823

CHAPTER 2 Getting Started2-12 SummarySummary 2View Classes and Protos 2clView 2aView := {viewClass: clView, // base view classviewBounds: boundsFrame,

Page 824 - Protos 22

CHAPTER 23 Endpoint Interface23-12 Using the Endpoint InterfaceReceiving Data Using Input Specs 23The most common way to receive data is to use input

Page 825

CHAPTER 23Endpoint InterfaceUsing the Endpoint Interface 23-13The following sections describe how to set the various slots in the input spec to accomp

Page 826

CHAPTER 23 Endpoint Interface23-14 Using the Endpoint InterfaceIf you specify the form 'template or 'binary, you also must specify a targets

Page 827 - Functions and Methods 22

CHAPTER 23Endpoint InterfaceUsing the Endpoint Interface 23-15termination sequence, or an array of items, any one of which will cause the input to ter

Page 828

CHAPTER 23 Endpoint Interface23-16 Using the Endpoint InterfaceSpecifying Flags for Receiving 23For certain communication tools, it may be necessary t

Page 829 - Endpoint Interface 23

CHAPTER 23Endpoint InterfaceUsing the Endpoint Interface 23-17slot in the input spec. The filter slot is a frame containing two slots, byteProxyandsev

Page 830 - Asynchronous Operation 23

CHAPTER 23 Endpoint Interface23-18 Using the Endpoint InterfaceHandling Normal Termination of Input 23The InputScript message is sent to the input spe

Page 831 - Input 23

CHAPTER 23Endpoint InterfaceUsing the Endpoint Interface 23-19Handling Unexpected Completion 23The CompletionScript message is sent to the input spec

Page 832 - Data Forms 23

CHAPTER 23 Endpoint Interface23-20 Using the Endpoint InterfaceIMPORTANTDo not call the Input or Partial methods in a polling loop to look for incomin

Page 833 - Template Data Form 23

CHAPTER 23Endpoint InterfaceUsing the Endpoint Interface 23-21within the binary object at which to stream data. For more information on receiving bina

Page 834 - About the Endpoint Interface

About Views 3-1CHAPTER 3Views 3Figure 3-0Table 3-0This chapter provides the basic information you need to know about views and how to use them in your

Page 835 - Compatibility 23

CHAPTER 23 Endpoint Interface23-22 Using the Endpoint InterfaceThe cancellation itself can be invoked asynchronously or synchronously, and is handled

Page 836 - Setting Endpoint Options 23

CHAPTER 23Endpoint InterfaceUsing the Endpoint Interface 23-23Next, the Cancel (or Disconnect) method returns, and any pending synchronous request is

Page 837

CHAPTER 23 Endpoint Interface23-24 Using the Endpoint Interfacean option succeeds without errors, the result slot is set to nil. For more general info

Page 838 - Using the Endpoint Interface

CHAPTER 23Endpoint InterfaceSummary of the Endpoint Interface 23-25Summary of the Endpoint Interface 23Constants and Symbols 23Data Form Symbols 23&ap

Page 839 - Sending Data 23

CHAPTER 23 Endpoint Interface23-26 Summary of the Endpoint InterfaceEndpoint State Constants 23Other Endpoint Constants 23Data Structures 23Option Fra

Page 840

CHAPTER 23Endpoint InterfaceSummary of the Endpoint Interface 23-27Callback Spec Frame 23myCallbackSpec := {async: Boolean, // asynch request?reqTimeo

Page 841 - InputScript method

CHAPTER 23 Endpoint Interface23-28 Summary of the Endpoint Interfacefilter: { // used to filter incoming databyteProxy: [{ // an array of framesbyte:

Page 842 - slot to the byte offset at

CHAPTER 23Endpoint InterfaceSummary of the Endpoint Interface 23-29Input: // returns data from input buffer and clears itfunc() ...,Partial: // return

Page 843

CHAPTER 23 Endpoint Interface23-30 Summary of the Endpoint InterfaceFunctions and Methods 23Utility Functions 23MakeAppleTalkOption(NBPaddressString)M

Page 844

Serial Tool 24-1CHAPTER 24Built-in Communications Tools24Figure 24-0Table 24-0This chapter describes the built-in communications tools provided in New

Page 845 - Specifying Receive Options 23

CHAPTER 3 Views3-2 About ViewsThis section provides detailed conceptual information on views and other items related to views. Specifically, it covers

Page 846

CHAPTER 24 Built-in Communications Tools24-2 Serial ToolThe following is an example of how to create an endpoint that uses the standard asynchronous s

Page 847 - Special Considerations 23

CHAPTER 24Built-in Communications ToolsSerial Tool 24-3You can get or set most of the standard serial options in the endpoint method that established

Page 848 - Working With Binary Data 23

CHAPTER 24 Built-in Communications Tools24-4 Serial ToolSerial Tool with MNP Compression 24The asynchronous serial communications tool with MNP compre

Page 849 - Canceling Operations 23

CHAPTER 24Built-in Communications ToolsSerial Tool 24-5An endpoint can include kPacket, kEOP, and kMore flags to control the sending and receiving of f

Page 850 - Synchronous Cancellation 23

CHAPTER 24 Built-in Communications Tools24-6 Modem Toolboth that character and an additional DLE character are sent; conversely, two consecutive DLE c

Page 851 - Error Handling 23

CHAPTER 24Built-in Communications ToolsModem Tool 24-7Table 24-4 Summary of modem options Label Value Use When DescriptionkCMOModemPrefs"mpre&quo

Page 852 - Power-Off Handling 23

CHAPTER 24 Built-in Communications Tools24-8 Infrared ToolInfrared Tool 24You use the infrared (IR) communications tool to perform half-duplex infrare

Page 853 - Constants and Symbols 23

CHAPTER 24Built-in Communications ToolsAppleTalk Tool 24-9The infrared tool uses the Sharp Infrared protocol. Because of the characteristics of this p

Page 854 - Data Structures 23

CHAPTER 24 Built-in Communications Tools24-10 Resource Arbitration Options }} ];results := myATalkEP:Instantiate(myATalkEP, myOptions);The AppleTalk t

Page 855 - Input Spec Frame 23

CHAPTER 24Built-in Communications ToolsResource Arbitration Options 24-11claiming its resources passively and will allow another tool to claim it. If

Page 856 - Protos 23

CHAPTER 3ViewsAbout Views 3-3Figure 3-1 shows a collection of template frames that might make up an application. The frame at the top represents the h

Page 857

CHAPTER 24 Built-in Communications Tools24-12 AppleTalk FunctionsThe following example shows how to instruct a communications tool to allow its resour

Page 858 - Functions and Methods 23

CHAPTER 24Built-in Communications ToolsAppleTalk Functions 24-13The Net Chooser 24The Newton system provides a NetChooser as part of the root view. Th

Page 859 - Serial Tool 24

CHAPTER 24 Built-in Communications Tools24-14 AppleTalk FunctionsFigure 24-2 NetChooser view while searchingWhen the search has been completed, the Ne

Page 860 - Serial Tool

CHAPTER 24Built-in Communications ToolsAppleTalk Functions 24-15The following is an example that shows the use of this function: ChooserSample := {//

Page 861 - Serial Tool 24-3

CHAPTER 24 Built-in Communications Tools24-16 SummarySummary 24Built-in Communications Tool Service Option Labels 24kCMSAsyncSerial "aser"kC

Page 862

CHAPTER 24Built-in Communications ToolsSummary 24-17Framed Serial Tool Options 24kCMOFramingParms "fram"kCMOFramedAsyncStats "frst"

Page 863 - Serial Tool 24-5

CHAPTER 24 Built-in Communications Tools24-18 SummaryConstants 24Serial Chip Location Option Constants 24kHWLocExternalSerial "extr"kHWLocBu

Page 864 - Modem Tool 24

CHAPTER 24Built-in Communications ToolsSummary 24-19Serial Circuit Control Option Constants 24kSerOutDTR 0x01kSerOutRTS 0x02kSerInDSR 0x02kSerInDCD 0x

Page 865 - Modem Tool 24-7

CHAPTER 24 Built-in Communications Tools24-20 SummarySerial Event Configuration Option Constants 24kSerialEventBreakStartedMask 0x00000001kSerialEventB

Page 866 - Infrared Tool 24

CHAPTER 24Built-in Communications ToolsSummary 24-21kV17_12Mod 0x00000200kV17st_12Mod 0x00000400kV17_14Mod 0x00000800kV17st_14Mod 0x00001000MNP Compre

Page 867 - AppleTalk Tool 24

CHAPTER 3 Views3-4 About ViewsViews 3A template is a data description of an object. A view is the visual representation of the object that is created

Page 868 - Resource Arbitration Options

CHAPTER 24 Built-in Communications Tools24-22 SummaryNetChooser Function 24NetChooser:OpenNetChooser(zone, lookupName, startSelection,who, connText, h

Page 869

About the Modem Setup Service 25-1CHAPTER 25Modem Setup Service 25Figure 25-0Table 25-0This chapter contains information about the modem setup capabil

Page 870 - AppleTalk Functions 24

CHAPTER 25 Modem Setup Service25-2 About the Modem Setup ServiceModem setup packages can be supplied by modem manufacturers, or can be created by othe

Page 871 - The Net Chooser 24

CHAPTER 25Modem Setup ServiceAbout the Modem Setup Service 25-3Figure 25-1 Modem preferences viewThe Modem Setup Process 25All communication applicati

Page 872 - AppleTalk Functions

CHAPTER 25 Modem Setup Service25-4 About the Modem Setup Service4. The modem endpoint is reconfigured with pass-through mode disabled, and control is r

Page 873 - AppleTalk Functions 24-15

CHAPTER 25Modem Setup ServiceDefining a Modem Setup 25-5NoteThe modem tool has been upgraded to support the Class 2 and Class 2.0 FAX protocols in rele

Page 874 - Summary 24

CHAPTER 25 Modem Setup Service25-6 Defining a Modem Setupabout the modem preferences option, see “Modem Preferences Option” (page 21-34) in Newton Prog

Page 875 - AppleTalk Tool Options 24

CHAPTER 25Modem Setup ServiceDefining a Modem Setup 25-7Setting the Fax Profile Option 25The fax profile option describes the fax characteristics to be u

Page 876 - Constants 24

CHAPTER 25 Modem Setup Service25-8 Defining a Modem SetupNoteYou can only set the service class (use the kServiceClassconstant) for versions of the sof

Page 877 - Summary 24-19

CHAPTER 25Modem Setup ServiceSummary of the Modem Setup Service 25-9Summary of the Modem Setup Service 25Constants 25Constants for Modem Setup General

Page 878 - 24-20 Summary

CHAPTER 3ViewsAbout Views 3-5application base view. (Think of the view hierarchy as a tree structure in which the tree is turned upside down with its

Page 879 - Functions and Methods 24

CHAPTER 25 Modem Setup Service25-10 Summary of the Modem Setup ServiceFax Speed Constants 25kV21Ch2Modkv27Ter24ModkV27Ter48ModkV29_72ModkV17_72ModkV17

Page 880 - NetChooser Function 24

26-1CHAPTER 26Utility Functions 26Figure 26-0Table 26-0This chapter provides a listing of a number of utility functions documented in the “Utility Fun

Page 881 - Modem Setup Service 25

CHAPTER 26 Utility Functions26-2 CompatibilityCompatibility 26This section describes the changes to the utility functions for Newton System Software 2

Page 882 - About the Modem Setup Service

CHAPTER 26Utility FunctionsCompatibility 26-3New String Functions 26The following new string functions have been added.CharPos

Page 883 - The Modem Setup Process 25

CHAPTER 26 Utility Functions26-4 CompatibilityNew Integer Math Functions 26The following new functions related to integer math have been added.GetRand

Page 884

CHAPTER 26Utility FunctionsCompatibility 26-5New Data Stuffing Functions 26The following new data stuffing functions have been added.StuffCStringStuffPS

Page 885 - Defining a Modem Setup 25

CHAPTER 26 Utility Functions26-6 CompatibilityGetMemorySlotMakePhoneMakeDisplayPhoneParsePhonePowerOffTranslateEnhanced Functions 26The following stri

Page 886 - Defining a Modem Setup

CHAPTER 26Utility FunctionsSummary of Functions and Methods 26-7Summary of Functions and Methods 26Object System Functions 26ClassOf(object)Clone(obje

Page 887 - Configuration string When used

CHAPTER 26 Utility Functions26-8 Summary of Functions and MethodsString Functions 26BeginsWith( string, substr )Capitalize( string )CapitalizeWords( s

Page 888

CHAPTER 26Utility FunctionsSummary of Functions and Methods 26-9Bitwise Functions 26Band(a, b)Bor(a, b)Bxor(a, b)Bnot(a)Array Functions 26AddArraySlot

Page 889 - Constants 25

ixSpecifying the List of Items for a Popup 6-37Summary 6-41General Picker Protos 6-41Map Pickers 6-45Text Picker Protos 6-46Date, Time, and Location P

Page 890

CHAPTER 3 Views3-6 About ViewsFigure 3-3 shows an example of what this view hierarchy might represent on the screen.Figure 3-3 Screen representation o

Page 891 - Utility Functions 26

CHAPTER 26 Utility Functions26-10 Summary of Functions and MethodsBMerge(array1, array2, test, key, uniqueOnly)BSearchLeft(array, item, test, key)BSea

Page 892 - Compatibility 26

CHAPTER 26Utility FunctionsSummary of Functions and Methods 26-11IsFinite(x)IsNaN(x)IsNormal(x)LessEqualOrGreater(x, y)LessOrGreater(x, y)LGamma(x)Log

Page 893 - New Sorted Array Functions 26

CHAPTER 26 Utility Functions26-12 Summary of Functions and MethodsFeTestExcept(excepts)FeUpdateEnv(envObj)Financial Functions 26Annuity(r, n)Compound(

Page 894 - New Financial Functions 26

CHAPTER 26Utility FunctionsSummary of Functions and Methods 26-13Data Extraction Functions 26ExtractByte(data, offset)ExtractBytes(data, offset, lengt

Page 895 - New Debugging Functions 26

CHAPTER 26 Utility Functions26-14 Summary of Functions and MethodsStats()StrHexDump(object, spaceInterval)TrueSize(object, filter)ViewAutopsy(function

Page 896 - Obsolete Functions 26

Compile-Time Results A-1APPENDIXThe Inside Story on Declare AThis appendix describes the technical details of the declare mechanism. Knowing these tec

Page 897 - Object System Functions 26

APPENDIXA-2 Run-Time ResultsNoteProtos built into the system use an analogous slot called allocateContext, that holds the same thing as stepAllocateCo

Page 898 - String Functions 26

APPENDIXRun-Time Results A-3Figure A-1 Declare example CalculatorDisplayDisplay{preallocatedContext: 'Display..}CalculatorAs a result of the decl

Page 900 - Integer Math Functions 26

GL-1GlossaryAction button The small envelope button used in applications to invoke routing functions. When tapped, it displays a picker listing routin

Page 901 - Utility Functions

CHAPTER 3ViewsAbout Views 3-7Figure 3-4 View system coordinate planeFigure 3-5 Points and pixels–6654321–1–2–3–4–5–6654321–5–4–3–2–1hvGrid linesPointP

Page 902 - Message Sending Functions 26

GLOSSARYGL-2cursor An object returned by the Querymethod. The cursor contains methods that iterate over a set of soup entries meeting the criteria spe

Page 903 - Debugging Functions 26

GLOSSARYGL-3flag A value that is set either on or off to enable a feature. Typically, flag values are single bits, though they can be groups of bits or

Page 904 - Miscellaneous Functions 26

GLOSSARYGL-4item frame The frame that encapsulates a routed (sent or received) object and that is stored in the In/Out Box soup.lexical dictionary A l

Page 905 - The Inside Story on Declare A

GLOSSARYGL-5part A unit of software—either code or data—held in a part frame. The format of the part is identified by a four-character identifier called

Page 906 - Run-Time Results 26

GLOSSARYGL-6template slot. For example, a field for entering phone numbers might restrict acceptable user input to numerals. rich string A string objec

Page 907 - APPENDIX

GLOSSARYGL-7target The object being acted upon. Sometimes the target consists of multiple items, for example, when multiple items are selected from an

Page 909 - Glossary

IN-1IndexAaccessing query results 11-16accessing tasks in the To Do List application 19-24Action button 21-3accessing routing actions from 21-3adding

Page 910 - GLOSSARY

INDEXIN-2application componentsoverview 1-15application data class registry 21-33application-defined routing actions 21-23application extensions 5-1app

Page 911

INDEXIN-3Ccalendarversus the term Dates 19-9Calendar Notes soup 19-22Calendar soup 19-22callback functions 15-3registering 15-11registering for folder

Page 912

CHAPTER 3 Views3-8 About ViewsAs the grid lines are infinitely thin, so a point is infinitely small. Pixels, by contrast, lie between the lines of the c

Page 913

INDEXIN-4completionCompletionScript 23-18handling unexpected in endpoints 23-18compressed imagesstoring 13-18configuration string usage 25-7confirm 18-4

Page 914

INDEXIN-5dateKeyboard 8-27Datescompatibility information 19-9versus the term calendar 19-9Dates application 19-8adding meetings or events 19-11control

Page 915

INDEXIN-6endpoint (continued)input form 23-13input spec 23-12input target 23-13input time-out 23-16instantiating 23-10linking to application 23-24prot

Page 916

INDEXIN-7filter options 23-16use of byteProxy slot with 23-16use of filter slot with 23-16Findglobal 16-3local 16-3overview 1-10Find, targeted 16-19Find

Page 917

INDEXIN-8fonts (continued)specifying for a view 3-24style numbers 8-18font spec 8-3, GL-3font specification 8-17packed integer format 8-19font styles 8

Page 918

INDEXIN-9functions and methods (continued)ItemCompleted 22-16KillAction 17-16LastVisibleTopic, To Do List method 19-26LaunchPartEntry, Extras Drawer m

Page 919

INDEXIN-10GetCityEntry 19-28GetCountryEntry 19-28GetDefaultFormat 21-11GetDefs 5-8GetExtraIcons, Extras Drawer method 19-41GetMeetingIconType, Dates m

Page 920

INDEXIN-11In/Out Box 1-13, GL-3extending the user interface 22-17inputtermination of in endpoints 23-17use of InputScript message for 23-17input buffe

Page 921

INDEXIN-12keysalarm 17-12KillAction 17-16LlabelsChanged parameter 15-16labels filter 15-8labelsFilter slot 15-8, 15-10creating 15-14labels slot 15-1, 1

Page 922

INDEXIN-13modem setup (continued)process 25-3profile constants 25-9profile option 25-6, 25-7user interface 25-2modem setup package 25-1modem setup servi

Page 923

CHAPTER 3ViewsAbout Views 3-9Opening and closing animation effectsTheviewEffect slot defines an animation to be performed when the view is displayed or

Page 924

INDEXIN-14Notes application (continued)list of methods 19-57soup 19-33soup format 19-53versus term paperroll 19-31Notes stationery 19-30, 19-33notifica

Page 925

INDEXIN-15periodic alarms 17-4, 17-14persistent storage 1-3persona GL-5persona popup proto 19-7phone, user configuration variable 19-48phoneKeyboard 8-

Page 926

INDEXIN-16protoFolderTab proto 15-9protoFrameFormat 21-21protoFullRouteSlip 22-27protoInputLine 8-12, 8-13, 8-14protoKeyboard 8-28protoKeyboardButton

Page 927

INDEXIN-17receiving large objects 23-20recognition flagsvAddressField 9-31vAnythingAllowed 9-32vCapsRequired 9-31vClickable 9-32vCustomDictionaries 9-3

Page 928

INDEXIN-18RouteScript 21-24example of 21-25routeScripts slot 21-22, 21-23, 21-24defining a method identified by 21-24routingabout 21-1application-specifi

Page 929

INDEXIN-19scrollingcontrolling in In/Out Box view def 21-36speeding up 3-46scrollRect 7-3scrollUpSound 14-2search method 16-7search methods 16-6, 16-1

Page 930

INDEXIN-20sound (continued)synchronous 14-7waiting for completion 14-7sound channelcharacteristics of 14-2creating for playback 14-6deleting 14-6using

Page 931

INDEXIN-21synonyms 18-3system data 19-44list of functions 19-58system messagesin automatic views 8-8system resets 2-7system services 16-1, 17-1alarms

Page 932

INDEXIN-22Time Zones application 19-27adding a city 19-29compatibility information 19-27getting a refernce to 19-28list of functions and methods 19-57

Page 933

INDEXIN-23UnRegFolderChanged function 15-3, 15-10, 15-18UnRegFormulas 19-36UnRegInboxApp 21-34UnRegInfoItem, Dates method 19-21unregistering the task

Page 934

CHAPTER 3 Views3-10 About ViewsHandling Pen Input 3The use of the vClickable viewFlags constant to control pen input is important to understand, so it

Page 935

INDEXIN-24view (continued)creating 3-28custom fill pattern 3-21custom frame pattern 3-21declareSelf slot 3-24declaring 3-27defining characteristics of 3

Page 936

INDEXIN-25viewFlags (continued)vApplication 3-47vCalculateBounds 3-47vCapsRequired 9-31vClickable 3-47, 9-32vClipping 3-47vCustomDictionaries 9-31vDat

Page 937

THE APPLE PUBLISHING SYSTEMThis Apple manual was written, edited, and composed on a desktop publishing system using Apple Macintosh computers and Fram

Page 938

CHAPTER 3ViewsAbout Views 3-11leftValue The distance from the left origin of the parent view to the left edge of the view.topValue The distance from t

Page 939

CHAPTER 3 Views3-12 About ViewsView Size Relative to Parent Size 3A view is normally entirely enclosed by its parent view. You shouldn’t create a view

Page 940

CHAPTER 3ViewsAbout Views 3-13viewSetupFormScript: func()beginlocal b := GetAppParams();self.viewbounds := RelBounds(b.appAreaLeft,b.appAreaTop,min(20

Page 941 - W, X, Y, Z

CHAPTER 3 Views3-14 About Views horizontal alignment of the view relative to its parent or sibling view vertical alignment of the view relative to i

Page 942 - THE APPLE PUBLISHING SYSTEM

CHAPTER 3ViewsAbout Views 3-15vjParentCenterH16 The difference between the left and right view bounds is used as the width of the view. If you specify

Commentaires sur ces manuels

Pas de commentaire