NewtDb manual errata and late breaking news (2/4/95):NewtDb v1.20Make a Backup First ! Make a Backup First ! Make a Backup First ! Then load up the new applications. You data does NOT need to be re-entered. Everything is compatible. If you are upgrading from any prior version than 1.13, please read the v1.13 release notes below.Please report any problems to me at:CIS: 74736,172 - bestAOL: DPOMPEAinternet: dmpsyst@netacc.netVery Late News Very Late News Very Late News Very Late News Very Late News-----------------------------------------------------------------------------------Apple has just released (12/17/95) new OS updates for 100/110/120 MP's. They fix a very important bug that two NewtDb users have had. The -10606 error. This error totally messes up soups. It is a Newton OS error, not a NewtDb one. The new update should fix this. Perhaps the fix was included in a developer release a few months ago - I don't know - and that's why I could never reproduce the problem. I'm still including my own program for fixing the soup if you get this error. If you do, please let me know.So, go to eWorld, AOL or CIS, get and install the update asap. I don't see in on the Apple FTP server yet, so I'll be happy to email the file to anyone that doesn't have access to the services.V1.20 New Features:Summary---------Quick Find in List View."Keep Open" option in Quick Find. Also keeps last entered text.Calculation field. Works like a Hp RPN calculator.Short Date Auto Fill formatting so it collates: 9/1/95 is now 09/01/95.Selection of Before, Replace, After options for Popup Lists.Options for Indirect GoTo, Set Query to Match option: '=','Starts With','Contains','>=','<='."True" / "False" text for Checkbox fields for Print / Fax / Email.Graffiti button in Edit Tool bar.Passwords for screens.List Box for entering data - view another Db and select from it.Database Re-Index option.Database Delete All Records option.Database Update Meta Data option.MetaData for NCK Editing / Import / Export of Screen and Database definitions.Serial / Barcode input.New application for -10606 error.Calculate Screen Field--------------------Define a Calculate field by selecting "Calc" from the New Object button in UtilityDb when defining the objects that appear on the screen. The function works like an Hp RPN calculator. All results are kept in a 4 register stack:Temp1Temp2YXWhen you select an database field or constant, it's number goes into the X register. Before placing it there, the other registers are rolled up. Temp2->Temp1, Y->Temp1, X->Y.When you select an simple math operand, it works on the X and Y registers. The result is left in the X register and the other registers are rolled down.Before:Temp1 = 0Temp2 = 10Y = 2X = 3Operand = '+', after the calculation:Temp1 = 0Temp2 = 0Y = 10X = 6The operand / field / constant list is shown with the bottom / last entry as the first executed. An example is:*+Sales Tax rate (in %)1*QuantityPart Cost'Part Cost', 'Quantity' and 'Sales Tax rate (in %)' are fields in the database.This calculation executes in this order: Enter the Part CostEnter the QuantityMultiply themEnter constant 1Enter Sales Tax % (0.xx)Add them (1+ Sales tax %)Multiply (1.xx times (Quantity * Cost)) and leaves the result in the X register which goes into the selected field.Operands:+,-,*,/ operate on X and Y registers, leaving the result in X.X<->Y exchanges X and Y register numbersRoll Up rotates all numbers upwards. Temp1 goes into X.Roll Down opposite of Roll Up. X goes into Temp1.*-1 X is made negative1/X X is divided into 1Clear X is clearedX^Y X is raised to the Yth powerX^2 X is squaredSqrt(X) The square root of XX->Y The stack is rolled up, with a copy of X placed in Y. X remains the same.log(x) The natural log of X.e^X e is raised to the Xth powerTan,aTan,Sin,aSin - what else ?Use the Insert button to insert a term above the current selection in the list. Use the Add button to put a term at the bottom of the list. The Constant button places the number next to at the current selection. There is no set limit on the number of terms. Use Newton's scroll buttons if needed for the list.Currently, only the current screen database will accept the result of the calculation. This may change in the future. The calculation is done when the record is shown or new data is entered on the screen or mailed / faxed / printed. It is not calculated for List View.Barcode / Serial Input--------------------To use Barcode or Serial input, you need to load the DbBarCode app. It is the module that gets the actual serial input and passes it to NewtDb. This was done for a couple of reasons. First, it takes 30k of memory so if you're not using that feature, you don't need to use the memory for it. Second, parts of it (communications configuration) needs to be added to the preference roll. That uses heap. To overcome the 5k of heap needed, load the DbBarCode app to internal memory, otherwise you'll have Grip-O-Death.After loading, goto extras->preference->NewtDb Bar Code / Serial. Select the Baud rate, Parity, Data Bits, Stop Bits and Handshake for your input device. Your device must send a CR (ASCII 13, hex 0x0d) at the of the data.To activate a field for Serial input, there is a checkbox in the Db Text Field Object. Just check it.The Screen field order will determine the order of data going into multiple Serial input fields on the same screen. Use the 'Bring to Front' and 'Sent to Back' button to alter the order.Using Serial input: When data comes in, if an Edit Window is open and that field has been marked for Serial Input, the data will be placed in it and the Edit Window closed. If a Non Serial Input, Edit Window is open, the incoming data will be thrown away. If no Edit Window is open, NewtDb will scan the fields on the screen to look for the first empty Serial field and place the data in it. If all fields have entries, or no Serial fields exist, the data will be thrown away and you'll get a sound indicating it. A regular 'bell' sound will be heard for a Serial field being filled. In reality, the Edit Window will be opened just as if you clicked on it, the data placed in it and the window closed. But you won't see all that happen. You can make Serial fields Read Only if you like. That way the data will be placed in it, but the user won't be able to alter it.The Barcode app will open and close the serial port depending if the current screen has any Barcode fields in it. When ready for Serial input, there will be a Barcode Icon to the left of the 'NewtDb' title at the top of the screen. If you're switching screens between Barcode / non Barcode, don't switch too fast back to a Serial screen as the serial routines in Newton needs time to close the port before reopening it. If this gets to be a problem, I'll most likely add a option to keep the port active until NewtDb quits. You'll know it's a problem by an error message that says the Serial Port is in Use. If that happened (and the port is NOT in use by another application), it's best to quit NewtDb and restart.Quick Find---------QF can now be used on the List View screen. There is a 'Q' button on the right end of the A-Z bar. You now have an option to keep the window open after a Find. QF now remembers the text you entered. The text entry area has been expanded for better handwriting entry.Short Date Auto Fill------------------This will zero fill dates so they can be used in date sequence. It is applied when you have a database field designating it (&DS for New / Dup Inits) and for the Edit Window tool bar: Short Date.9/1/95 now becomes 09/01/95. All dates now take at least eight characters.Popup Lists----------You now can select options for Before, Replace and After to determine where that data goes in the field when there is data already there. Indirect GoTo Query options-------------------------Before, when the 'Set Query to Match' option was invoked, the Query was set to an Equals match. Now you can set it to: '=' , 'Starts With' , 'Contains' , '>=' or '<='.With the Query type set to Equals, the options functions as before. You would need an exact match between the Source field and the Match field. When set to the other options, the data search match is now a 'Starts With' type. So Source data of 'Dav' will now find 'Dave' for the match function.MetaData for NCK Editing of Screen and Database definitions------------------------------------------------------In NCK, you now are able to see the Screen and Database definitions. You can Native Import and Export them to Disk for backup, move between Card and Internal, and alter a few of the parameters. Just don't have duplicates !! Checkbox fields--------------Inplace of printing 0 and -1, you will now get text of "True" or "False" for Print / Fax / Email.Existing Db's are looked for New Db-------------------------------Now, when you select 'New Database', UtilityDb will look to see of one of the same number exists - in case something happened to the definition. If found, it will read a record to guess the number of fields in it. A message will indicate a found database. No guess is made for the index fields.New Option button for Databases------------------------------There were to many options for Databases so I moved them all into a popup list activated by the Option button.Besides the 'FM Import / Export rules' , Export New / Modified flag and the 'Export Sequence numbers' options there are three new ones that act immediately.1. You can Re-index the selected database. This will read all records and re-do the index fields.2. You can Delete All Records in the selected database. You are doubled warned for this.3. You can Update the NCK Meta Data manually. UtilityDb will warn you about needed to do this when you exit only once if needed. You need to do this if you delete or add a database, change the name of a database.New Buttons in Edit Tool Bar-------------------------If you have Graffiti, a 'G' button for activating it will be shown next to the Keyboard icon. Tap it to open or close Graffiti.You can now have a List Selection box for data entry. This will let you display two fields in a database and select something to be entered in the Edit Window. If an Edit List Box is defined for a field, you see an icon next to the revert button. Tap it to open the List. See Edit List Box for more Information.Passwords for Screens---------------------You can now specify a Password for a screen. When the screen is to show for the first time, you'll have to enter the Password or choose an different screen. Or Quit. To evoke a Password, in UtilityDb, press the 'S' ,'Screen Setup' button. Then check the 'Use Password' checkbox and enter a Password. Leading and trailing spaces of the Password are stripped. The Password will be asked for on the First invocation of the screen. If you leave the screen and later come back to it, you won't need to enter it again. Until you quit and re-start NewtDb.Edit List Box------------You can now have a List Box shown when the Edit Window is open. If one is defined, you see an icon for it, next to the 'Revert' button. Press it and a two column list, from any database, will be shown. When you tap on an item in the list, that data will be put in the Edit Window and the list will close.In the List Box, there are three buttons ( [space],0-9, A-L, M-Z) that will let you move to the starting record for the selected letter / number. Exactly like the A-Z bar in List View. You also have up and down buttons to scroll the list.If, after the 'Opening List' message, you don't get a List Box, then there is something wrong with your definition of it. Either the database or fields selected don't exist.Note: You don't have to use a separate database for each different type of information in a list. Since each database has three indexes, you can use one database for three lists. Just define 6 fields (2 for each List Box) and use one index for each. Now, this might make handling records a bit messy, but it will let you have many more lists.Defining a List:Lists can be defined for a Db Text Field object. Check the 'Allow Field List Box for Edit' checkbox and a window will open so you can select: The database for the list, the Sort field, List Field #1 and List Field #2 which will be displayed.Other items of interest---------------------Faster exit of the Database definition screen. Now I look to see if any changes have been made to a database definition. If not, then there is no need to re-save the definition. Also, Meta Data update is smart. If no changes that require the update, it is skipped. If needed, you will be prompted.Faster 1st find of a Query match if: no 2nd option, field is an index, match is a 'Starts With' or '='. I Added code to check for this type of Query when you hit the 'On' button. It will take you to the first record, or tell you that there are no matches, very quickly.Faster field edit opening when tapping on a new field when a different field was open. The data from the previous edit is saved, but the screen is not refreshed so the new edit window opens much quicker.Faster return to Detail View from List View. If this Index or Field Columns are not changed, then no saving of them takes place leading to a quicker exit back to the Detail View,New application for -10606 error------------------------------Some Newton ROMS have code in them that causes a soup corruption when deleting records. It's fixed in NOS 2.0. If you get a -10606 error, then the database indexes have been corrupted. There is no easy way to prevent this except to not delete an entry. Apple suggests moving all entries to a new soup and then renaming or deleting the old soup. I've written an application to do this. But, it's untested as I can't seem to reproduce the problem on my Newton. Soon, I'll write an app to do massive soup entry manipulations to cause this problem so I can test my fix-it app.Note: If you have the latest O/S System update, the corruption won't happen. Be sure to get the 12/95 Apple update for MP100, MP110 and MP120 /1.3 Newton's.This app should be harmless to normal soups, so don't worry if you 'fix' a good soup - but try not to. The only qualification is to have enough memory when it makes a new soup as the indexes can take up a lot of space. You should try to have at least 20% free memory all the time and more when running this app. As always, make a backup first if possible.The app works by moving records to a new, temp. soup (TempDb) and them renaming the old soup to BadSoupXX and the temp. soup to the NewtDb corrupted one. Then tries to delete the BadSoupXX soup.This app should work, but who knows if the information I got about this error had goodness ;-)If, during the execution of the app, you get a Newton Error, stop as something is wrong. You might want to Reset before running it to have the most heap space.First select the Db # and where it is: Internal / card.Press the Check Db button - if there is not a Db defined, it will tell you.It will then read all records and display a count & # it couldn't read - bad ones.Press the Check & Fix Db button.If you had not first done a Check, it will do so.Next it will read and move each record to a temp. soup.Then it will display the stats:Total entries xxxx - how many recordsBad entries xxxx - records that had problems and will be moved to the new soup.Very bad entries xxxx - records that had big problems and could not be moved to the new soup.Then some soup index removing and renaming takes place.If you don't get a "removing Indexes - OK" , that's OK, the old soup might take up some space.If you don't get a "renaming old soup - OK' or "renaming new soup to Db - OK" then the old db soup is unusable as it couldn't be renamed and the new one could not take it's place :-( You'll have to manually delete this soup and recreate the records for the Db.You next should get a "deleting old soup - OK". if not, and the Renames (above) are OK, then no matter. The old, bad soup was renamed to "BadSoup xx" and then could not be deleted because of it's problems. It should not take much space but , eventually, the card where it resides should be erased to release it's space.Release Notes: NewtDb v1.20 12/17/95Added Quick Find to List View.Added "Keep Open" option to Quick Find. Also keeps last entered text.Added Calculation field. Works like a Hp RPN calculator.Added Short Date Auto Fill formatting so it collates: 9/1/95 is now 09/01/95.Added selection of Before, Replace, After options for popup lists.Added options for Indirect GoTo, Set Query to Match option: '=','Starts With','Contains','>=','<='.Added MetaData for NCK Editing / Import / Export of Screen and Database definitions.Added "True" / "False" text for checkbox fields for Print / Fax / Email.Added looking for an existing Db when making a new one and guessing fields if one found.Added database Re-Index option.Added database Delete All Records option.Added database Update Meta Data option.Added Graffiti button in Edit Tool bar.Added Passwords for screens.Added List Box for entering data - view another Db and select from it.Added Serial / Barcode input.Added new application for -10606 error.Changed: The Fancy <-> Plain text font picker had the names reversed.Changed: Static Text is now opaque. You can use it to 'hide' fields used to establish indirect links.Changed: Screens fields are no longer reordered when screen is saved.. Static Text fields were saved first.Changed: Quick Find text HWR area is now much taller for easier data entry.Changed: MetaData now only updated on command.Changed: Moved database NCK import / export options to a picklist.Faster exit of the Database definition screen.Faster 1st find of a Query match if: no 2nd option, field is an index, match is a Starts With or '='.Faster field edit opening when tapping on a new field when a different field was open.Faster return to Detail View from List View.Speeded up Queries a bit by recodeing.Fixed bug when an Indirect field was used in a popup list and the Append option was checked.Fixed bug in UtilityDb of not being able to unselect popup list Append option.Fixed Checkbox field giving True on empty field.Fixed possible problem in saving an indirect edited item.Checked and tweaked a few items for NOS 2.0 compatibility.Fixed NOS 2.0 compatibility for DemoDb app. NewtDb v1.13 9/5/95Fixed detection of not having a database defined and having a screen try to use it at startup time. Erred only sometimes depending on which screen was to be loaded first.List View now uses less heap - noticeable with big records.Returning to Detail View now uses a changed index in List View.Indirect lookup in other Db now uses 1st index for match if the Match field is not an Index field. Before it was record order.More error checking for deleted databases. UtilityDb v1.13 9/5/95Added detection and warning of undefined (deleted) database when a screen is edited.Fixed need for two Db's to be defined if a Db was used on a screen and then the Db was deleted - you couldn't select the only valid Db.Fixed problem of field names not being displayed sometimes if Screen Db changed from 'Not Defined' to a defined Db.Sometimes an index would revert to field #0 when adding / deleting fields in UtilityDb. Depended on the highest numbered field that was used for an index. Should not have affected NewtDb operation as a slower method of indirect match would be used if a field was not an index. If this affects your Db's, use UtilityDb, go to the database screen and check / correct the Indexes. Then add and delete a field. Indexes are redone with field operations.Note: v1.11 and v1.12 were only released to some people to test the added features before general release. NewtDb v1.12 8/28/95Added Quick Find - now you can quickly go to any record via an index field.List View would sometimes error if you had a Query Set, hit a letter, and there was no record after the letter, that matched the Query.Printing sometimes showed extra field names at end of print list. UtilityDb v1.12 8/28/95NCK Database name was not updated when changed after initial creation. UtilityDb v1.11 8/21/95Added option for FileMaker multi-line imports/exports as FM uses VT not CR.NCK support was not limiting indexes to 28 characters for Import. No real Problem. Now fixed.Found broken Newton Script function of comparing one char strings - characters > 128 would sometimes match certain lower 128 characters. NewtDb v1.10 8/12/95Changed shareware release to 4 databases and 8 screens. Eliminated 8/16 version.Fixed minor heap temporary unrelease when screens were changed with a button.Added confirm for Revert in edit.Fixed some minor internal you'll-never-encounter-but-once-in-a-full-moon things.Changed initial heap check to account for 1.5k used by view system at start.v1.0 8/6/95 Initial release of everything."NewtDb" is a copyrighted name of DMP Systems."NewtDb - The Relational Database for Newton" is a service mark of DMP Systems.