UserLand Software

 
 

Changes: Frontier 5.1.4 Change Notes

 
These are the changes to Frontier in 5.1.4, since the last release (5.1.3).

The two key changes in 5.1.4:

  1. Guest Databases, a feature introduced experimentally in Frontier 5.0, is now ready to build on, with very exciting possibilities, and

  2. Frontier now includes a full, fast, powerful and programmable search engine.

Guest Databases

Getting guest databases working was a long series of changes to the kernel, the model became more complex, and the code had to get more complex too.

Fixed a bug accessing large (> 1K) scalar values in a guest database, such as binary images. This bug could lead directly to corruption of the host database.

Fixed a problem accessing menubar scripts in guest databases. Attempting to run or view a menubar script would generally lead to an "Out of Memory" or "Attempted to read beyond the end of the file" error. Also, deleting a menubar item could lead to host database corruption.

Fixed a bug loading outlines, scripts or wptext objects in a guest database after doing a Save. This bug would yield the same errors as the menubar script problem above.

Fixed address-to-string coercion, where the address of the root of a guest database would have "system.compiler.files" prepended to the database name.

Caution is still advised when developing with guest databases, there will be guest database-related fixes in 5.1.5 and beyond, but we are optimistic that they can be used successfully now.

Search Engine

Frontier now contains a built-in website indexer and search engine. A new set of verbs, the builtins.searchEngine verbs, have been created.

New verbs:

searchEngine.indexLocalSite: Index the Frontier source of a website.

searchEngine.indexCurrentPage: Call this from a finalFilter to automatically index each page as it's built.

searchEngine.searchMacro: Call this macro to put a search engine in your page.

searchEngine.indexFolder: Index all the files in a folder.

searchEngine.indexViaHTTP: Get a page with tcp.httpClient and index it.

searchEngine.deIndexPage: Remove a page from an index.

searchEngine.stripMarkup: Remove HTML tags, macros, and compact white space in a string of text.

The search engine stores its indexes in guest databases.

Several new kernel verbs were created:

searchEngine.indexPage
searchEngine.deIndexPage
searchEngine.cleanIndex
searchEngine.stripMarkup
searchEngine.mergeResults

The remainder are implemented as scripts.

New system.environment table

A new system table, system.environment, is maintained by the kernel and initialized as Frontier starts up. View this table as read-only. The items in this table should be queried when writing scripts that have platform- or OS-specific functionality. The contents of the table is as follows:

isMac: true on Mac, false on Windows

isWindows: true on Windows, false on Mac

osFlavor: Windows only, "95" "98" or "NT"

osMajorVersion: the major version number

osMinorVersion: the minor version number

osBuildNumber: Windows only, the build number

osVersionString: The full version string , compatible with date.versionLessThan

osFullNameForDisplay: "Macintosh"", "Windows 95", "Windows NT", etc.

winServicePackNumber: Windows only, the service pack version

Note: while the sys.os() and sys.osName () verbs will continue to work, we recommend that scripts use the system.environment table instead.

Address values are less fragile

Address values that are stored in the object database no longer become "orphaned" if the parent table is deleted. Recreating the parent table will restore the validity of the saved address. Upgrading a suite, for example, will no longer invalidate an address in user.menus that points to the suite's menubar object.

One side effect of this change is that renaming a table will break address links that would have tracked the name change in the past. However, the much more common case of a table being deleted, replaced, or closed (if in a standalone table or guest database) is much more important to support.

The address value stability described above fixes a major source of misbehavior, crashes, and root corruption when creating a web site in a guest database. Specifically, after rendering a page, Frontier.root's websites.["#data"] table would contain many addresses pointing into the guest datahase. Subsequent saves could cause the disk to spin "forever", memory errors,and potential root corruption.

COM support

There has been a fix to the COM server interface with Frontier. In prior version the parameters would come into the Frontier script backwards (i.e. if you had 4 parameters, the order would be 4, 3, 2, 1 instead of 1, 2, 3, 4). In keeping with the COM philosophy, current programs continue to work with no modifications (i.e. backward parameters). A new class ID and program ID have been added to allow new COM coding to take advantage of the fix.

The Frontier 5.1.4 upgrader automatically updates your COM DLL for you. If you want to double-check, you can be sure you have the current version by looking in your DLLs folder and doing a properties check on COMDLL.DLL and looking on the version tab for version 1,0,1,3.

To use the fix from VBASIC, ASP, etc. use the new Program ID of "UserLand.Frontier.Server2" (this entry will be automatically made in your registry the first time you run the new version of Frontier).

The old registry Program ID is "UserLand.Frontier.Server" which has a class ID of {8806B501-BEC8-11D1-B2BA-006008AF0E0E}.

The new registry Program ID is "UserLand.Frontier.Server2" which has a class ID of {9596F617-477C-11D2-B2CE-006008AF0E0E}.

Semaphore-free rendering

The new html.getPageTableAddress () verb returns the address of the current page table. It's recommended that this verb be used in place of references to html.data.adrPageTable.

Many parts of the website framework were changed to use this new verb.

Once you have replaced all references to html.data.adrPageTable with this new verb, you can turn on semaphore-free rendering. Jump to user.html.prefs and create an entry called useSemaphores and set it to false.

The main reason behind this change is so that busy servers -- servers generating dynamic pages and running WebEditServer -- will render pages without errors caused by a semaphore time-out.

Because semaphore-free rendering is controlled by a preference, you can make the transition at your own pace.

html.getPageTableAddress () will always work, no matter what the setting of the useSemaphores preference. But html.data.adrPageTable is reliable only when useSemaphores is set to true.

XML-related changes

xml.compile now recognizes the &amp;, &lt; and &gt; escape sequences within tags, mapping them to &, < and > respectively. xml.decompile makes the reverse translation.

Fixed an xml.compile bug where an empty tag with attributes would fail to create an "/atts" subtable. Instead, a single, empty string item was created, losing the attribute information.

xml.compile correctly parses DTDs that contain markup declarations in square brackets:

<!DOCTYPE hello [ <!ELEMENT hello ANY> <!ATTLIST hello att CDATA #IMPLIED> ]>

xml.compile correctly parses freely-formatted processing instructions, such as:

<?Frontier-DOM "modified:8/8/98"?>

Comments that contain the character '>' no longer confuse the compiler. The following example is now parsed correctly:

<!-- declarations for <head> & <body> -->

All non-content constructs -- the xml declaration, doctype declaration, processing instructions, and comments -- are now included in the compiled xml table. This should not alter the behavior of scripts that operate on xml tables using the standard xml verbs: xml.getValue, xml.getAddress, etc. However, scripts that wish to examine the content of the xml declaration or of processing instructions in their compiled form can now do so. In addition, xml.decompile has also been upgraded so that all of these structures are translated back to markup. The compile/decompile cycle, while not quite lossless, is very nearly so.

Miscellaneous

Added two new basic verbs: setTimeCreated (adr, time) and setTimeModified (adr, time). These verbs complement the existing timeCreated and timeModified verbs. They can be usefull for keeping a database structure in sync with a folder hierarchy on disk, for example.

fileMenu.close now takes an optional parameter, the window to be closed. If omitted, the current target window is closed, as before.

Fixed fileMenu.save crashing bug if an invalid address was supplied. It now generates an appropriate error message.

If table.rename is given a name of an item that already exists, an error is now generated:

Can't rename "foo" as "bar" because an item with that name already exists.
Previously, name conflicts were not detected, and duplicate items could be created.

If the original item passed to table.rename, table.move, table.copy, or table.moveAndRename does not exist, an error is generated. In the past, false would be returned, contrary to the documentation (and reasonable expectations). Generating appropriate errors in these instances should help avoid confusing bugs.

When an empty table is opened or expanded, a default "item #1" entry is created. These entries are no longer saved to disk, so if you add items to the table and then close and reopen the database, they will disappear. In addition, closing or collapsing a table will delete all of the temporary items it contains, even if other items have been added to the table.

Fixed bug where expanding and collapsing an empty table entry would aternately display an item #1 whose value was nil, then empty, then nil, then empty, etc.

Fixed bug that caused the Changed Pages / Publish All command to fail, reporting strange errors and possibly corrupting the database.

Fixed bug where certain low-level database access errors could not be caught by a try statement, nor the standard Error Info mechanism. Instead, the errors would appear in a modal dialog, disrupting normal script error handling. The most common error in this class was "Internal error: attempted to read a free block". One symptom of this bug was that a db.getValue failure, after encountering an error alert, would lead to an Assertion Failure in langevaluate.c (hlocals == currenthashtable). This problem no longer occurs.

Added more intelligence to target.set, so that if the old target value is no longer valid, it returns nil. This can occur if a previous caller of target.set failed to restore the target, and left it set to a local object. This change will help ensure that a subsequent target.set to the old target will not fail.

Fixed file.readLine bug, where the empty string ("") would be erroneously returned in between valid lines. This would occur in larger files with cr-lf line endings.

Fixed file.isVisible bug. On the Macintosh, it would always return true for folders. (This bug was new in 5.x.)

Fixed a memory management glitch in the DDE DLL that Frontier uses to communicate with the web browser. This change should be transparent to most users, but may avoid random crashes.

Fixed a rare crashing bug. If an error occurred opening a menubar script's window, closing the menubar's own window could crash.

Fixed two table display updating bugs: 1) When all of the items are deleted from a table, and that table appears in its own window, subsequent additions to the table appear in the window. For example, if websites.["#data"] is open, it updates completely as different pages are rendered. 2) When an item is deleted from a table, and the table appears collapsed in a window (the deleted item is not visible), the item count is now updated properly.

Improved error reporting for Copy/Paste and unpacking. Copy and Paste report more detailed error information, while unpacking provides the full path to the object that triggered the error. You now get "Error unpacking "a.b.c"...", not "Error packing "a": Errror packing "b": Error packing "c"...."

Improved the dreaded "Internal Error: attempted to read a free block" error message. It now suggests that you try to Save a Copy and open the freshly saved database.

tcp.dns.getDomainName and tcp.dns.getDottedID are two new verbs that do cached DNS lookup and reverse lookup. They're faster than the lower-level verbs.

webserver.server: added optional httpRequest parameter, which allows it to be called directly from tcp.httpClient, so that HTTP requests from Frontier to Frontier on the same machine bypass TCP entirely and are much faster. This change also supports .wsf page generation behind external servers such as WebSTAR, Quid Pro Quo, and WebTen.

string.mailMessageToTable breaks an email message into its component parts and stores the parts in a table.

table.sureDatabaseOpen (adr) ensures that the database containing the address is open. The address could point to an object in the Frontier.root or in a guest database. If it points to an object in a guest database, and the database cannot be found on disk, a scriptError is generated.

date.dayOfWeekToString and date.monthToString returns the name of the day of the week and the name of a month, respectively.

   


 

© Copyright 1996-98 UserLand Software. This page was last built on 1/21/99; 4:39:32 PM. It was originally posted on 8/25/98; 4:38:24 PM. Webmaster: brent@userland.com