6   Who's in charge of my data? — a digression.

When Tonto2 starts, it restores its display to the way it was when it quit ... mostly. The recs selections are not saved or restored, but the open tabs, their order on the page, and the selected tab are. (Did you guess that you can select and drag the open tabs into whatever sequence you prefer?)

Tonto2 is meant to run continuously while you are seated at your computer so that you have access to your lists, and you are expected to close it at the end of the day, at the end of your session, or whenever you come to a jumping-off point.

To recover Tonto2's previous state means that Tonto2 must open and read into memory all the recs in the files behind all the open tabs. It's a big job. The saving grace is that it's not that big.

(Almost all) further file activity is then deferred until Tonto2 quits again. It doesn't do anything (much) while it's running. In particular it does not lock any of the files it has read against changes by other programs. If anything happens to those files, Tonto2 won't be aware of it. This can be a bad thing if you're manipulating the files outside Tonto2, but obviously that's something you're doing that you'd be aware that you're doing. Right?

When Tonto2 quits, it will write out any changes that it remembers, obliterating the contents that are there. This can be a good thing. Tonto2's view of the changed data does prevail.

It can be a bad thing, if Tonto2 doesn't think the data changed, but it did. In that case the changes persist.

A manual Checkpoint will force a rewrite of a tab that has been changed, but it will not force a rewrite of a tab that has not been changed. Get the difference?

It can be a bad thing if Tonto2 crashes before it quits or if your computer crashes. Then you lose any changes that Tonto2 has made to the data it controls because those changes were never written back to the files they belong in. It's not as bad as it seems. Usually the changes you're making with Tonto2 are small and easily recreated, and, anyway, it hasn't left any of its files partially written. You just hope that Tonto2 never crashes in the middle of quitting, but that's what backups are for.

Also, this means that, if you're trying to use the files that Tonto2 controls in other applications, those apps won't see the most recent changes if Tonto2 is still running. This can be a bad thing, but, still, you'd realize what's going on. When you conceive a need for a file outside of Tonto2, that conception represents a jumping-off point and a convenient opportunity to quit Tonto2 for awhile or at least Close the Tab that represents the file you need.

And you can have multiple instances of Tonto2 running at the same time. Nothing prevents this even though it's not a great idea! The instance that quits last with updated data is the one whose view of the data prevails. Tonto2 will checkpoint only those tabs that it believes have been changed. It's worth checking whether multiple instances exist if you're ever in doubt. Duplicate instances are difficult to tell apart. Been there; done that! Don't say I didn't warn you.

Tonto2's philosophy is that whatever you say goes. It doesn't second-guess you. If you want to delete a bunch of recs all at once forever, that's fine with Tonto2. It's not going to bug you to ask, "Are you sure?" Thus, though powerful and quick, Tonto2 can be a little dangerous, too. It really is up to you to realize what you're doing with it.

7   What are all these menus?

Menus are the means whereby you elicit behaviors from Tonto2's repertoire.

7.1   File

7.1.1   File: New

This shows a dialog to create a new tab with an empty rel.

7.1.2   File: Open

This re-opens a tab that was once open but has been Closed. It shows a file dialog. Once you tell Tonto2 the name of the *.dd file where the tab was stored, it recreates the old tab.

7.1.3   File: Close

You have to select an open tab first.

Clicking here Checkpoints the recs back to the rel's csv file and closes the tab.

7.1.4   File: Checkpoint

You have to select an open tab first.

Menus for most file-editing software have a save option. Checkpoint is Tonto2's save option. Tonto2 is meant to stay open for long periods of time. When you reach a jumping-off point, you may feel the need to save your changes. Checkpoint does that without having to Close the tab or Quit Tonto2 altogether. You do it to force your changes from memory into the csv file. You have to do it if you want to use the changed file in some other application.

7.1.5   File: Revert

You have to select an open tab first.

Revert discards the recs in memory and re-reads an old copy of them from the csv file. Typically you use this immediately after you've made some regrettable changes. This gets rid of the changes and does not save them, but you can use it to bring changes into memory that another app has made while Tonto2 was running.

NOTE: This destroys changes made with Tonto2. And REMEMBER: Tonto2 will never bug you to ask, "Are you sure?"

7.1.6   File: Extend

You have to select an open tab first.

Extend reads new recs from a foreign csv file. You can think of it as merging two csv files, but it doesn't combine recs. Instead it appends new recs to the tab. It shows you a file dialog where you choose that foreign csv file.

The foreign csv file may have tags that are not on the tab. Text flds are created for those tags, and blank values for those flds are added to the old recs. The new recs from the foreign csv file may not have flds that are in the old recs. Blank values for those flds are added to the new recs.

I always wind up with a lot of unexpected tags in the tab so I check for similar tag names. If I find any, I Revert the tab, edit the foreign csv file to make its tags consistent with the tab, and retry the Extend.

7.1.7   File: Add, Change, Remove Fields

You have to select an open tab first.

Here, at last, is how you change an old rel into a new one by fiddling with its flds. This shows the Field-Change Dialog.

7.1.7.1   Field-Change Dialog

Field-Change Dialog.

Fig. X — Field-Change Dialog

The Field-Change Dialog is all about the buttons.

7.1.7.1.1   Chg: Insert Before

Insert Before creates a new text fld named "«new_0»" in front of the selected tag. Fig. X shows the result.

7.1.7.1.2   Chg: Insert After

Insert After creates a new text fld after the selected tag. ... not shown.

7.1.7.1.3   Chg: Remove

Remove yanks the selected tag. REMEMBER: Tonto2 will never bug you to ask, "Are you sure?"

7.1.7.1.4   Chg: Change Kind

Change Kind changes the fld type of the selected tag. You can choose a new type from a list of predefined types:

Flds of some of the following types marked with an asterisk (*) are used in Tonto2's predefined rels.


7.1.7.1.4.1   Fld: Text

Text* is a single-line entry. It is the most basic kind of fld and, in fact, is the parent of the other kinds.

7.1.7.1.4.2   Fld: Markup

Markup is a multi-line entry. It accepts a few hypertext tags. When its value is displayed, it is rendered as hypertext much like what you would see in a browser. The recognized HTML markup is defined by Qt.

7.1.7.1.4.3   Fld: Markdown

Markdown is a kind of Markup that implements rich text in terse format. Some recognized markdown symbology is defined by CommonMark. In reality, Markup and Markdown are the same kind of fld (for now), but I wouldn't try to mix syntax in the same entry.

7.1.7.1.4.4   Fld: Log

Log* is a kind of Markdown that brings along a Now button for the ride. The Now button causes a time stamp to appear at the insertion cursor on the entry box. Thus, you can easily add a time-stamped entry to the bottom (or the top) of the box to keep track of recent activity.

7.1.7.1.4.5   Fld: Title Case

Title Case* is a Text fld that brings along a Caps button. When the Caps button is clicked, the text is capitalized conventionally as if it were a book title in English. NOTE: Not all other languages have such conventions apparently.

7.1.7.1.4.6   Fld: Code Table

Code Table* has a limited number of distinct values with specific meanings. These code sets must be chosen from the tables that are configured for Tonto2. The most common is YES_NO_MAYBE although TRUE_FALSE_DONT_CARE and others may appear.

7.1.7.1.4.7   Fld: Selection

Selection* is a Code Table that allows ad hoc values beside those configured. The table for PHONE_TYPE, for example, allows Work, Home, and Cell, but FAX could be used, too.

7.1.7.1.4.8   Fld: Integer

Integer* is a numeric fld holding whole numbers. You can specify minimum and maximum values for an Integer and its descendants.

7.1.7.1.4.9   Fld: Float

Float* is an extension of Integer that holds numbers with decimal fractions.

7.1.7.1.4.10   Fld: Currency

Currency is an extension of Float that is displayed with a currency symbol. The symbology for Integer, Float, and Currency is regulated by the locale of your computer's operating system.

7.1.7.1.4.11   Fld: DateTime

DateTime* holds a time stamp. It brings along a Now button. DateTime is edited as an ISO 8601 formatted string. On display, the month and weekday abbreviations are regulated by the locale of your computer's operating system. DateTime flds may have a UTC time-zone offset.

7.1.7.1.4.12   Fld: Date

Date* is an extension to DateTime that has no time. It has a Today button.

7.1.7.1.4.13   Fld: Time

Time is an extension to DateTime that has no date.

7.1.7.1.4.14   Fld: Time Offset

Time Offset is a Text fld of the form hours:minutes.

7.1.7.1.4.15   Fld: Local File

Local File is a file name. It brings along a Search button that opens a file dialog.

7.1.7.1.4.16   Fld: Sound File

Sound File* is a Local File fld. It brings along a Play button, too.

7.1.7.1.4.17   Fld: URI

URI* is a Web address link. It brings along an Open button that opens the link in your browser.

7.1.7.1.4.18   Fld: Image

Image is a URI fld. It is displayed as a graphic.

7.1.7.1.4.19   Fld: QR Code

QR Code is a Text fld. If a quick-response code generator is configured, this kind of fld is displayed as a graphic.

7.1.7.1.4.20   Fld: UPCA

UPCA is a Text fld, which is displayed as a Universal Product Code barcode. This requires a special font.

7.1.7.1.4.21   Fld: EAN13

EAN13 is a Text fld, which is displayed as a European Article Number barcode. This requires a special font.

7.1.7.1.4.22   Fld: Code39

Code39, Code39X, and Code128 are Text flds, which are displayed as barcodes. They handle alphanumeric content and require special fonts. (UPCA and EAN13 are good only for numeric retail product-identification codes.) Although these text flds can display characters other than digits, they suffer restrictions on the characters that can be rendered because most scanners won't pick up anything more than alphanumerics and a handful of punctuation. Code39, for example, handles only ASCII uppercase. Don't go hog wild with Code128, either. While it handles upper and lowercase ASCII and can be more compact than Code39X when rendering strings of digits, both are much, much too wide to be used for long strings of text because they can exceed the viewport of your display device or your scanner. Consider QR Code, instead.

7.1.7.1.4.23   Fld: UID

UID has a default value that is a unique identifier. Add one of these flds to a rel to make sure every rec in the rel is unique.


7.1.7.1.5   Chg: Edit Field

Edit Field allows you to change the name of the tag among other things. It shows the Field-Edit Dialog.

7.1.7.1.6   Chg: Sep Before and Sep After

Sep Before and Sep After insert separators into the tag list. These become the page breaks in the Field Entry Dialog.

7.1.7.1.7   Chg: Move Up and Move Dn

Move Up and Move Dn change the position of the selected tag in the tag list.


7.1.7.2   Field-Edit Dialog

Field-Edit Dialog.

Fig. Y — Field-Edit Dialog

The Field-Edit Dialog allows you to manipulate some characteristics of a fld. Different kinds of flds expose some different characteristics but all have at least those shown here for a Text fld. For instance, Code Table flds have the name of the table. Numeric flds can have maximum and minimum values.

  • You can change the Tag name here.

  • You can give the fld a Long Description if you want, which pops up as a tool tip on the Field Entry Dialog.

  • Default is usually #N/A. This is the value used when no other value is provided.

  • Edit Enabled indicates, when checked, that the user can edit the fld on the Field Entry Dialog. Otherwise the fld value is displayed as a label that cannot be changed by the user.

  • Can Modify indicates, when checked, that you can apply this dialog (the Field-Edit Dialog) to this fld. Otherwise, the fld characterstics are locked against changes. Can Modify is False for a few flds on pre-defined rels that are meant to hold computed values such as _UpdateDate and some that have peculiar functions such as _URI. The leading underscore in the tag name is meant to indicate that Can Modify is False for this fld, and it usually does mean that.

    NOTE: There are bunches of flds on the Address List rel that are locked against modification. This is so that the csv file header remains stable for any export/import and mail-merge applications you may encounter.

    Obviously, you don't want to uncheck Can Modify, and it is grayed out so that you can't. If you really want to, you can use a text-file editor manually to alter the *.dd file for the tab to allow or disallow modifications to a fld.

  • All flds start out Locale Formatted, which is a bit silly because Text flds, the bulk of fld types, have no formatting at all. However, this makes a difference for the DateTime and numeric flds. These are displayed differently in different locales.

  • Country Locale Currency Date
    Mexico es_MX.utf8 $1,234.56 24/07/23
    Spain es_ES.utf8 1.234,56 € 24/07/23
    Germany de_DE.utf8 1.234,56 € 24.07.2023
    Great Britain en_GB.utf8 £1,234.56 24/07/23
    United States en_US.utf8 $1,234.56 07/24/2023
  • Should you desire to provide your own formats, you must uncheck Locale Formatted. Then you can specify Display Format and Edit Format. These are Python format strings. See Python Format Specification Mini-Language.


7.1.8   File: Rename

You have to select an open tab first.

This allows you to Rename the selected tab.

7.1.9   File: Choose Display Columns

You have to select an open tab first.

This shows the Choose Display Tags Dialog, which allows you to change which tags show on the grid. In the dialog, select a "Displayed Tag." Select a "Hidden Tag." Click the Insert Before or the Insert After button to make the "Hidden Tag" a "Displayed Tag."

7.1.10   File: Quit

This Checkpoints the open tags, saves the state of the Tonto2 window, and stops Tonto2.

7.2   Edit

7.2.1   Edit: Search/Replace

Search/Replace Dialog.

Fig. Z — Search/Replace Dialog

You have to select an open tab first.

This opens the Search/Replace Dialog to find recs. Place your search term in the Target and click Mark All. That marks all the recs on the current tab where the search term is found. In this case, it found two recs. The last one is selected. See the mark to the left of the rec?

You are looking for text as it is displayed on the tab or on the View as Text Dialog, not necessarily as you edit it on the Field Entry Dialog or as it is stored in the csv files. For some kinds of flds (notably the DateTime flds) these are different things.

If you wish to visit the recs one-at-a-time, click Next instead of Mark All. If the Target is found, the Toggle, Mark → Go, and Skip Field buttons will light up.

Clicking Toggle remains on the last rec found but bumps that rec's mark from blank to √ to X.

Clicking Mark → Go bumps the rec's mark and moves the selection to the next rec.

Recs are visited in rec-within-tag (column) order beginning among the left-most tags because these are usually the more significant. You may skip any more matches on a tag and search the next fld on the next rec by clicking Skip Field.

If you have provided a Replacement term (You must do this in advance of moving the selection.) the form of the fld with the replacement term will show in Preview, and you can accept it by clicking Update or Update → Go.

You can update every fld in all the recs where your search term appears by clicking Update All. This is how you would make wholesale changes to a tab.

REMEMBER: Tonto2 will never bug you to ask, "Are you sure?" so, if you blow it, just Revert the whole dizzy tab. There is no undo (yet).

7.2.2   Edit: Insert

The menu options for Insert all create a blank rec somewhere on the tab. See Tonto2 Look and Feel.

These options are also available on the Context menu that pops up when you right-click on a rec.

7.2.3   Edit: Free Form Entry

You have to select a rec first.

The discussion of the Address List rel type includes an example of the Free-Form Entry Dialog.

7.2.4   Edit: Field Entry

You have to select a rec first.

See Tonto2 Look and Feel for a discussion of the Field Entry Dialog.

Double-clicking on a rec will also open the Field Entry Dialog.

7.2.5   Edit: Cut Row

You have to select a rec first.

This deletes the selected rec from the tab into the clipboard.

Keying ctrl-x also deletes the selected rec.

As soon as there is at least one rec in the clipboard, the Paste menu options light up.

7.2.6   Edit: Copy Row

You have to select a rec first.

This copies the selected rec into the clipboard without deleting it.

Keying ctrl-c also copies the selected rec.

7.2.7   Edit: Paste

You have to select a rec first.

The menu options for Paste re-insert all the rec(s) from the clipboard back into the tabbefore or after the selected rec.

When I say, "all the recs," I don't mean the clipboard accumulates a history. I mean that you can cut and copy more than one marked rec at a time.

You can even re-insert recs cut and copied out of other tabs. This is messy though because — unlike File: ExtendPaste does not modify the existing recs by giving them any flds from the new recs that they don't already have. Effectively, the new recs lose flds that the existing recs don't have and gain blank flds that the existing recs do have. It may not be very useful to try this unless the rel the recs came from is similar to the rel they're going to be pasted to.

Keying ctrl-v re-inserts all the recs from the clipboard before the selected rec.

7.3   View

The menu options for View provide ways of looking at recs and rels.

7.3.1   View: View as Text

You have to select a rec first.

This shows a view of the selected rec as a blob of text. See Tonto2 Look and Feel.

This option is also available on the Context menu that pops up when you right-click on a rec.

7.3.2   View: Traverse Link

You have to select a rec first.

This menu option lights up if the selected rec contains a _URI tag. Clicking Traverse Link is supposed to open it in your browser if you have one configured.

This option is also available on the Context menu that pops up when you right-click on a rec.

7.3.3   View: Calendar Month

This menu option lights up when a Calendar type tab is selected. It displays the current month as a grid showing scheduled events on that tab.

7.3.4   View: Alarms

Show a list of all scheduled events.

7.4   Mark

7.4.1   Mark: Toggle Row Mark

You have to select a rec first.

This bumps the rec's row mark from blank to √ to X.

You can do the same thing by clicking on the rec's row mark checkbox directly.

7.4.2   Mark: Mark All Rows

You have to select an open tab first.

This sets all the row marks on that tab to √. If you want to reset all the row marks, Mark All Rows, Toggle All Rows, and Toggle All Rows again.

7.4.3   Mark: Toggle All Rows

You have to select an open tab first.

This bumps all the row marks on that tab.

7.4.4   Mark: Cut Marked Rows

This deletes all the recs marked with a √ from the tab into the clipboard.

If you've searched for a bunch of widely separated recs and marked them, you can gather them all up. Just Cut Marked Rows and Paste them all back out of the clipboard onto the tab in one spot.

7.4.5   Mark: Copy Marked Rows

This copies all the recs marked with a √ from the tab into the clipboard without deleting them.

7.5   Help

7.5.1   Help: Contents

This opens the Tonto2 documentation in your browser.

7.5.2   Help: Gnu General Public License

This pops up a copy of the Gnu General Public License (GPL).

7.5.3   Help: About

This pops up a very brief description of Tonto2 showing which version is running.