Up and Running with Frontier Web Site Management
by Matt Neuburg

Prev | TOC | Next


Getting Comfortable With Tables

Table manners

Now let's return to our examination of the root window. This is a typical database window, known as a "Table" window.

Notice the column headings at the top: Name, Value, and Kind. You can click on any of them to make table sort itself on that column. You can widen and narrow columns by dragging the divider lines between them. You can resize the window. You can change the font and size in which its text is displayed. Go ahead and play with these features now.

Look at the Kind column. A table can contain various kinds of things. One thing it can contain, which this table is particularly full of, is more tables! But another thing it can contain is formatted text, called "wp text" (for "word-processing text").

Do you see the example here? It's called "readme". Let's read it. To do so, either double-click on the triangle at the left of the name "readme", or select anywhere in the "readme" line and press command-enter (or, you can select anywhere in the "readme" line and click the "zoom" button at the upper right of the window).

Now you can read it. However, you shouldn't believe everything you read! A lot of this information is old (it hasn't caught up with the changes in Frontier) and not very helpful. Now close the "readme" window by clicking its go-away box or by typing command-W.

Hint: You could also dismiss the frontmost window by typing shift-option-command-enter. That seems like a mouthful but there is system here, and you can save yourself a lot of time and effort with Frontier's windows if you know about it.

As we already saw, when you're in a table, command-enter opens what is selected in that table. So shift-command-enter goes from whatever you're in back out to the "parent", the table that contains it. The option-key makes what you're seeing now close as the next thing opens. So option-command-enter opens what is selected in a table while closing the table itself; shift-option-command-enter opens a thing's parent while closing the thing itself. Play with this now if you like. Here's a summary:

    go deeper                       cmd-Enter
    go deeper and dismiss           cmd-option-Enter
    go shallower                    cmd-shift-Enter
    go shallower and dismiss        cmd-shift-option-Enter

Names and navigation

Now open something else that's in the Root window table: open the "user" table.

userWindow picture

Before we explore what's in this window, let's talk about the business of names in a Frontier table. Frontier needs to be able to refer to every object in its database by a unique name. To do this, it strings together the names of all the tables containing the object, plus the object's name within its table.

The pieces of the name are joined with a period. So, for example, we're inside the "user" table, as the name of the window shows; so the full name of the "initials" entry is actually "user.initials". (You might argue that since the "user" table is inside the "root" table, the name should really be "root.user.initials", and that's quite right; but since absolutely everything is ultimately inside the "root" table, it is usual to omit "root" from the beginning of names.)

In this tutorial, I'll refer to database entries by partial names like "initials" or longer names like "user.initials", whichever seems likely to be clearest.

So now if I tell you the full name of an object in the database you should be able to find it by opening a succession of windows. Let's try it, shall we? What's in user.scheduler.prefs.reschedule? In my database, it says "false". It might say something else in yours. The point is to make sure you can find any object given its full name.

Now, in actual fact, you do not have to "drill down" like this every time you are given the name of an object to go to. If you choose Jump from the Open menu you can type the name of any object and you'll be taken there instantly.

Try it: use Jump to find out what's inside user.webBrowser.preview.template. Say, it looks like some HTML!

Here's one more thing about navigating: command-press on the title of the window to see a popup showing, in order, all containers of the object; you can select from this popup to navigate upwards through the containment hierarchy. There are other navigation techniques, but these will suffice to get you going.

Okay, your screen is now probably a mess of windows, so hit option-command-W to close them all. As long as the Main Window is not frontmost, this closes all windows except the Main Window. (If the Main Window is frontmost it's like dismissing the Main Window.) Time for another summary:

    close this window              cmd-W
    close all windows              cmd-option-W
    list this window's containers  cmd-press window title

Selecting and editing

Now get back to the "user" table again, and let's use it to consider one more thing about tables: selections.

Click in various rows, in the "Kind" column. Notice how the entire row is selected when you do this. You can also use the up- and down-arrow keys to manipulate the selection, or type a letter to jump to the first entry whose name follows that letter alphabetically.

Now hit Enter. Now instead of the whole row being selected, the selection point is at the end of the entry in the "Name" column. Now if you type a letter you add to the item's name. (You can try it if you like; just be sure to undo any changes you make.) Hitting Enter repeatedly toggles between selecting a table entry as a whole (selection mode) and selecting the contents of that entry (content mode).

When you're in content mode, you can use the Tab key to navigate through portions of content you're allowed to edit. (When you're in selection mode, the Tab key works like the down-arrow key.) Shift-Tab moves you the other way. Play around with all this for a while until you're used to it. Did you say you wanted yet another summary?

    toggle selection/content mode     Enter
    navigate, in selection mode       up-arrow, dn-arrow; type
    navigate, in content mode         tab, shift-Tab; arrows

Select the "Name" entry for the first row of the "user" table (user.applescripts) and make sure you're in content mode. Now press Tab repeatedly.

You'll notice that sometimes, but only sometimes, the selection jumps to the right, into the "Value" column, rather than downwards to the next "Name" entry. This occurs when what's in the "Value" column for that row is something that you can edit directly, right in the table window.

Consider, for instance, user.initials. If you double-click the triangle to the left of this entry, or hit command-enter with user.initials selected, nothing happens, in the sense that no window opens up as when you do this in a row representing a table or a piece of wp text.

As you can see from the "Kind" column, user.initials is neither a table nor a wp text; it's a string (your entry probably is termed "string[2]" or "string[3]", depending how many initials you have). There is no special window for editing a string; it is a value edited in place.

A value edited in place like this is called a "scalar" -- that is to say, a string is a type of scalar. Go ahead and play now; change your initials to "xxx" if you like; just make sure you change them back to what they were.

Hint: if you really want to change your initials to "xxx", be certain to hit Enter to get back to selection mode and force the change to "take". This is very important when editing names and values in a table; if you are still in content mode inside the box you were just editing, you have not yet confirmed the edit, and Frontier won't "know" about it yet. Be sure to remember this, since you will be changing many names and values from now on.

There are many other sorts of things stored in the database besides strings, wp texts, and tables; you can see, for example, that in the user window there are some entities called scripts.

We won't study these right now, because we are now sufficiently familiar with the Frontier environment to build our first Web site. However, if you wish to open a script and look at it, you certainly can; just don't change anything.


Prev | TOC | Next

All text is by Matt Neuburg, phd, matt@tidbits.com. This page created with Frontier, 7/8/97; 9:12:37 AM.