|  | ## Getting Comfortable With Tables
> Frontier Web Tutorial About This Tutorial About Web Site Management Why Frontier? Starting Up Getting Comfortable With Tables Exploring the Examples Your First Web Site Frontier HTML Basics Getting Comfortable With Outlines Templates Outline Formatting Includes and Macros Handling Images Glossaries and Filters Defines and Custom Directives Publishing Site Outline and NextPrev Relative References Leveraging Your Work Narrative of a Rendering Where To Go From Here Terms, Tips and Examples |  | ### 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"). Frontier's object database is organized much like your computer's desktop, but instead of folders or directories Frontier has tables. Navigating the object database is like exploring your hard drive, or working with the Mac Finder in outline view. Let's open the "websites" table. Just double-click on the black triangle to the left of the word "websites." You should see a listing of the contents of the websites table, indented one level. You may want to re-size your window: you can do it manually, or click on the Windows Maximize button or the Mac zoom button. The object database contains more than just tables and sub-tables. It also contains text windows, outlines, scripts, and much more. Now open the "samples" table that's inside the websites table. Inside that table is a "wp text" entry called "randomStuff." Let's read it. To do so double-click on the triangle at the left of the name "randomStuff," or select anywhere in the "randomStuff" line and press control-enter (that's the keypad enter key) for Windows or command-enter for Macs.
> Important note: On the Macintosh, the Return and Enter keys perform two different functions. PCs don't have a Return key. When this tutorial refers to the Return key, it's referring to the key marked Enter that's immediately to the right of the quotes key. When this tutorial refers to the Enter key, it means the keypad Enter key, to the right of the keypad number 3 key. If you're using a Windows computer without a keypad, you can use the F2 key instead.
> Now you can read it. This is just a sample web page. More on this later! Now close the "randomStuff" window by clicking its go-away box or by typing control- or command-W. ### Names and navigation Now open something else that's in the Root window table: open the "user" table. 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 "backups" entry is actually "user.backups." (You might argue that since the "user" table is inside the "root" table, the name should really be "root.user.backups," 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 "backups" or longer names like "user.backups," 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. 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 Main 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 websites.samples.davenet.aboutThisWebsite. Say, it looks like it could be a web page! It sure is. You can open up tables in their own windows, too. This is called zooming a table. To zoom a table, double-click in the Value column of a table. Here's one more thing about navigating: right-click or 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: on a Mac you can hit option-command-W to close them all. Time for another summary:
> Action | Shortcut
> close this window | ctrl or cmd-W
> close all windows | cmd-option-W (Mac only)
> list this window's containers | right click or 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 your keypad Enter key. 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 the keypad Enter key 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?
> Action | Shortcut
> toggle selection/content mode | keypad Enter
> navigate, in selection mode | up-arrow, dn-arrow; type
> navigate, in content mode | tab, shift-Tab; arrows
Consider, for instance, user.prefs.initials. If you double-click the triangle to the left of this entry, or hit command-enter with user.prefs.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.prefs.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; jump to "examples.counter" -- it's a script! There are a bunch more type of objects, too. 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 look around, you certainly can; just don't change anything.

|  | © Copyright 1996-98 UserLand Software. This page was last built on 6/17/98; 2:47:43 PM. It was originally posted on 7/4/97; 7:25:18 AM. Webmaster: brent@userland.com.
| This tutorial was adapted for Frontier 5 by Brent Simmons, from the Frontier 4 web tutorial written by Matt Neuburg.