NewtCard Handbook Update Log August 9,1998 ================================================================================= This document is our internal log of corrections and additions to the NewtCard Handbook. From time to time, we update the Handbook to include the changes. To find out what's new since your book, look at the first page of your book to get the printing data, then scroll down this document to find that date. Note that page numbers may change between printings. If the changes should become significant, we'll make it possible for you to obtain a new copy. Updates to NewtCard Handbook Dated November 30, 1997 ---------------------------------------------------- Pg 58. "Places to go" changed to "Where to Go". "Things to do" changed to "What to do." Needs a new screen shot. Pg 5: Last Para: compatible _with_ Newton devices. Also, "includes", not "included" Pg 9: Icon needs to be updated Pg 10: Change references from MP2000 to MP2x00. Change "turing" to "turning" Pg 83: 20 NOTIFY(4... (delete the space after NOTIFY). Pg 139: Add WAIT to commands not supported. Pg 136: 1st sentance: "You may retrieve or set the contents of a Button or Field by supplying its full name in an expression." Pg 133: Add: "To update the listItems after you've change them in a script, use the expression _widgets.theButton:setupList()." Pg 123: The Scroller has been completely redone, so you'll need new screen shots. If "" is specified for Title, no title box is shown. If editOK is nil, the mountain icons do not appear. Pg 114: First line, second para: change "th" to "the". add: NewCard returns the ID of the new card. add: If newCard is called within a script, the new card is created and the ID is returned. The current card remains unchanged and the new card is not displayed." Pg 96: Add: To change the value of a card checkbox in a script, use the expression _widgets.myCheckBox:toggleCheck(). For a checkbox on the background, use _bgcd.background._widgets.myCheckBox:toggleCheck() Chapter 9: For WDRAW, use the field identifier in the statement: wdraw card field myDrawField, [makeoval(5,5,20,20)] To call a card Button or Field subroutine from a NewtCard script: _widgets.myCheckBox:toggleCheck() _widgets.myPicker:setupList() If the Button or Field is on the background, "add _bgcd.background." to the front of the expression: _bgcd.background._widgets.myCheckBox:toggleCheck() GetField Function GetField(card, context, field) returns value. card: either the Card ID or card name. Card name can be a string or variable. context: either 'card, 'background or 'property field: the name of the field Example: theValue=getField(2, 'background, 'myTextField) Note on 'property option: Cards have a number of properties which can be accessed. They cannot be set using setField, however: this must be done through normal stack operations. GetField can also be used to access values on background and stack entries. The card properties are: type: the record type. Could be 'card, 'bg and others nextCardBG ID of the next card of this background prevCardBG ID of the prev card of this background nextCardStack ID of the next card in the stack prevCardStack ID of the prev card in the stack name name of the card background background of the card SetField Function SetField(card, context, field, value) returns true or nil. card: either the Card ID or card name context: either 'card or 'background field: the name of the field value: the value to put into the field Example: theValue=setField(2, 'background, 'myTextField, "Hello World") Updates to NewtCard Handbook Dated February 6, 1998 ---------------------------------------------------- Backgrounds and stacks also have properties, but you don't use GetField() to access them. Use the form .. I.e. "stack.cardcount", or "cardcount of stack". Properties of backgrounds and stacks are: name markedCards stack only cardcount firstCard lastCard backgrounds stack only: a frame with the names of the backgrounds version stack only Pg. 25: 1st line, 3rd para: change "by" to "but" Pg. 36: If you're using a MessagePad, you'll get a different set of stamps. Pg. 89: DATEPCIKER is misspelled. pg 110: Change "widget" to "field" Add: "Note: This field sets the properties lastX and lastY. You can use these in a script to get the location of the x and y coordinates of the last tap." pg 124: TEXTLIST is a Field, not a Button. pg 125: The TextList field saves the value of the current selection. If you change the contents of listItems, the values will not be retained if you exit the card or background. The correct code to update the screen after changing the list items is: for a card field: _widget.theButton:setupLIst() _widget.theButton:redoChildren() for a background field: _bgcd.background._widget.theButton:setupLIst() _bgcd.background._widget.theButton:redoChildren() pg 128: Stack.markedCards is a variable you control the value of. It holds an array of card numbers. Use SET markedCards of stack to [] to clear it, and addArraySlot(stack.markedCard, cardNo) to add a card to it. Sounds: ------- Handling of sounds has been improved in buttons and in the open and close operations of stacks, backgrounds and cards. Sounds are now copied into the stack, rather that remaining in the Newton's sound registry. While your stacks will be larger as a result, the sounds will not be lost if you share the stack with someone else. It also allows you to create a stack with a library of buttons with preset sounds that you can cut and paste into your stacks. You can also use Text to Speech wherever there are sounds. At the end of the popup list of sounds, there's a new selection called Speak. If you select it, a dialog box will appear where you can type the text in to be spoken. Text to Speech can also be put into scripts, by simply putting the text you want into a playSound function, i.e. playSound("Hey, let me out of here!") To use Text to Speech, you need to install Apple's unreleased but widely available MacInTalk application. It is available at http://www.rit.edu/~nwh5408/newton/newtonpack.html