frondoc picture

What is Frontier?
Download
News & Updates

Web Tutorial
Scripting Tutorial
BBEdit Scripting
Directory

Mailing Lists
Sample Scripts
Verb Set
Frontier Site Outline

Search
Guestbook
BBS

User's Guide
1 2 3 4 5 6
7 8 9 10 11

Apple File Edit
Main Open Suites
Web Window

Menubar Outline
Script Table WP

frondoc picture

Frontier 4.1b4 Change Notes


HTML SUITE

1. Macro processing

Updated html.processmacros script to allow nested calls, i.e. calls from a glossary or macro item. [b4]
Macro expressions can contain nested braces [b4]
Fixed osa component bug that caused nested calls to html.processMacros to crash. [b3]

2. iso8859 encoding

Updated the translation table to one that works with today's browsers. (Thanks to Alan Legg).
Default iso8859 translation can be overidden by providing a mapping table at user.html.prefs.iso8859map. The table should look exactly like html.utilities.iso8859.table, with the values modified as desired.
Note: there is very little (perhaps negligable) performance degradation in providing a custom translation table.

3. Standard macros

pageheader and renderobject are now standard. (Thanks to Preston Holmes.)

4. ftpText

Now uses ftpClient.sureFilePath.

5. Normalizing file names

New preference user.html.prefs.lowercasefilenames is observed in html.normalizename.


FTPCLIENT SUITE

1. New suites.ftpClient

Thanks to Tim Moore!
Features to be detailed here later; change notes in the table.


"WINDOW-BASED" OBJECTS

1. Definition

"Window-based" objects are large object types that are displayed in their own window. These include tables, menubars, scripts, outlines, wptext and pictures.

2. New capabilities

Scripts can now directly assign window-based values, pass them as parameters, and returned them as a script's result.
For example, the statement "x = scratchpad", formerly illegal, will now set x to a local copy of the scratchpad table.


NEW DATABASE ACCESS VERBS

1. fl = db.open (f, readonly)

Opens the specified database file for read-only or read-write access. All other db calls require that the specified database be first opened by this call.

2. val = db.getValue (f, dbpath)

Returns the value of the specified cell in the (open) database f.

3. fl = db.setValue (f, dbpath, val)

Sets the value of the specified cell in the database f.

4. fl = db.newTable (f, dbpath)

Creates a new table in the specified cell in the database f.

5. fl = db.isTable (f, dbpath)

Returns true if the specified cell is a table.

6. ct = db.countItems (f, dbpath)

Returns the number of items in the table at the specified database location.

7. name = db.getNthItem (f, dbpath, n)

Returns the name of the nth item in the table at the specified database location.

8. fl = db.delete (f, dbpath)

Deletes the specified cell in the database f.

9. fl = db.save (f)

Saves changes made to database f.

10. fl = db.close (f)

Closes database f.


NEW THREADING VERBS

1. fl = thread.exists (id)

Returns true if the specified thread ID is valid.

2. id = thread.evaluate ("expr")

Evaluates the expression in a new thread. Returns the ID of the newly created thread.

3. id = thread.getCurrentID ()

Returns the ID of the currently executing thread.

4. ct = thread.getCount ()

Returns the number of threads, including sleeping threads.

5. id = thread.getNthID (n)

Returns the ID of the nth thread. The index must be in the range 1 to thread.getCount()

6. fl = thread.isSleeping (id)

Returns true if the specified thread is sleeping. It is an error to specify an invalid ID.

7. fl = thread.sleepFor (secs)

Puts the current thread to sleep for the specified number of seconds. Returns true when the thread wakes up, either by having its timer expire, of if another thread wakes it up.

8. fl = thread.wake (id)

Wakes up the specified thread. Returns true if the thread was sleeping, false if it was already awake. It is an error to specify an invalid ID.

9. fl = thread.kill (id)

Terminates the specified thread and returns true. If the thread is sleeping, it is woken up automatically. ID may specify the current thread. It is an error to specify an invalid ID.

10. OSA "threads"

Threads in other processes, i.e. scripts being executed by Frontier for an OSA client, are not included in the thread list and cannot be operated on.


NEW SYSTEM TABLE: THE THREADS TABLE

1. system.compiler.threads

Fronitier threads are dynamically added to and removed from this table
Items are named according to the source of the script. Threads created by thread.evaluate are anomynous.
Each entry's value is the ID of the thread.
You can kill a thread by deleting its table entry. This is not undoable.
Threads in other processes, i.e. scripts being executed by Frontier for an OSA client, do not appear in the threads table.


NEW WPTEXT ENGINE

1. Bug fixes

Hopefully, problems with wptext objects containing more than 32K of text are gone now. This has not yet been verified.
Double-byte characters should be safe to backspace over.
Fixed horizontal autoscrolling while dragging a text selection in a headline. [b4, introduced in b3]

2. Inactive selections

Selected text is outlined in inactive windows in both the 68K and PPC versions of the program.


MACBIRD RUNTIME INTEGRATION

1. card.import

Loads a specified file into a database cell.

2. card.run

Runs a MacBird card
If the card is modal, the verb returns when it's done.
If the card is modeless, the verb returns immediately.
Card scripts execute in Frontier's main thread. This may be problematic; we'll have to watch this.
All cards run in Frontier's layer. OSA clients cannot display cards in their own layer.

3. card.runFromFile

Convenience verb, builds on card.import and card.run.

4. card.isModal

Not clear when you would need this, but it might be useful.

5. Bug Fixes [b4]

Fixed card updating bug when bringing Frontier to the front.
Fixed bug where a card script that changed an item's text would not update the card's display (Fortune Cookie).
Fixed bug after using File/Close to close a card window. The card's contents would subsequently be displayed in a Frontier window.
Fixed crashing bug option-clicking in a window's close box (Close All) with more than one card window open.

6. Bug Fixes [b3]

Typing into a modal card text field no longer enters characters into the Frontier windows that is behind the card.
Color popup menus work on PowerPC machines. They no longer crash.

7. Bug Fixes [b2]

Popup menu arrows are drawn correctly.
Frontier's Save command works normally when a card window is frontmost.
Fixed bug that caused a debugger trap about drawing into the wrong port.


ERROR INFO WINDOW IMPROVEMENTS

1. Go To button is more powerful

When an error occurs in a subroutine, pressing the Go To button now pops up a menu of the script's stack.
The popup menu appears only after the mouse has been down a few moments. A simple click goes directly to the error location as before. [b4]

2. Raised error reporting limits

Increased error reporting range from 32K to 64K lines of source.

3. Bug Fixes [b4]

On compile-time errors, fixed bogus "(anomynous" entry the would crash if selected.
Fixed bug where Go To locations could be incorrect the first time a script was executed.


MENU SHARING FIXES

1. Client customization

Clients using the 4.1 SDK can now customize the way that shared menus are installed. They don't have to be placed in the main menubar.

2. Server crash survival

Applications that use the 4.1 Menu Sharing Toolkit will cleanly remove their menus in the event of a server crash. Re-launching Frontier will bring back working menus.

3. Bugs / reliability

Fixed heap trashing / crashing bug if you had a fomula in a shared menu that sent an Apple event to another application.
Fixed bug that could leave the wrong port set after executing a shared menu script or fomula item.
Menus are now created in the client's heap zone. This may or may not improve compatibility.


DISK-BASED STRINGS

1. What's new

For large scalar values, i.e. string, binary, list or record values larger than 1K, the object data now occupies its own block on disk.
When a table is loaded into memory, large values stay on disk.
When a large value is referenced, it is loaded into memory and its disk block is freed (pending a Save). At this point the values look the same as they always have internally, so no side effects should appear.

2. Viewing tables

When viewing a table, only visible values are loaded into memory.
Calling target.set() does not force any scalars to be loaded.

3. Saving

When you save, values that are large have a new disk block allocated, whether or not they have been changed.
Doing otherwise (i.e. retaining the original disk block) would require a much more substantial code change and would have its own drawbacks in terms of performance.
When you Save a Copy, or pack a value, large values that are on disk remain on disk, i.e. the data is loaded into memory only temporarily.

4. Searching

Searching a table only loads disk-based scalars into memory while they are being searched.
After a replace all, only changed values remain in memory.


NEW STRING VERBS

1. Integrated the stringOps and macroprocessor ucmds for maximum performance.

2. string.processHtmlMacros

Replaces html.ucmds.macroprocessor, is now called by html.processMacros.
Takes the embedded script as a compiled osa script parameter. This allows the embedded script to continue to supply two entry points.
The embedded script can now be written in any OSA language.

3. string.urlEncode

Same as toys.urlEncode, which now invokes the kernel.

4. string.urlDecode

Same as toys.urlDecode, which now invokes the kernel.

5. string.parseHttpArgs

Same as toys.parseArgs, which now invokes the kernel.

6. string.iso8859encode

Same as toys.iso8859filter, which now invokes the kernel.


SMALL CHANGES AND BUG FIXES

1. New agent threading [b3]

Agents now run in a single thread that sleeps and re-awakes every second. In the past, the agent thread has been destroyed and recreated each second.
The new mechanism is more efficient, and creates a more stable environment in low memory conditions
Disabling agents reclaims the agent thread's memory; enabling agents consumes it anew.
Note: a side effect of the new agent scheduling is that when you open a 2nd root, the 1st roots agents continue to run, not those in the new root. You can disable agent and reenable them in a different root if desired.
Bug Fixes [b4]

Frontier's menus reappear correctly after opening, then closing another root file.
Fixed potential hang on Quit

2. Raised recursion limits [b3]

40 level of recursion are now supported, up from 25

3. String-to-address coercion [b2]

Fixed bug that prevented long strings with many bracketed expressions from being coeced to an address. Like this:
address("root.["newsdb"].["alt"].["music"].["misc"].["why"].["not"].["duplicate"].["the"].["entire"]")
Fixed a bug coercing addresses back to strings where a item name that was a compiler constant would not be braketed.

4. String-to-list coercion [b2]

A string that contains a syntactically correct list value yields that value when coerced to a list.
A string that contains a syntactically correct record value yields that value when coerced to a record.

5. String-to-double coercion [b2]

double("") resolves to 0.0, not "NAN (017)".

6. Table sorting [b2]

Editing item names in tables now maintains the table's sort order. Like the Finder, items many move when you finish editing their names.
Bug fix [b3]: tabbing after editing an item name now keep the cursor on the right row.
When a script adds an item to a table that isn't opened in a window, the new item is sorted correctly.

7. Table modification dates [b2]

When a script modifies a table that isn't opened in a window, the table's modification date is now updated.

8. "new" verb [b2]

Fixed bug where new (type, adr) would overwrite "adr" itself if adr's value couldn't be coerced to an address.

9. Frontier.clickers.typeCARD

Rewrote, now calls card.runFromFile.
Sets Frontier.finderToFront to false so Frontier stays in front.

10. string.replaceAll

Bug fix: handles search/replace strings longer than 32K characters.

11. search.find, search.replaceAll

Searches will now find occurances beyond the first 255 charcters of an object.
You can cancel a search in progress.

12. suites.webBrowser.toys.urlJumper

Removed outdated launching code, call webBrowser.launch instead.

13. system.misc.techsupport

Calls WebBrowser.toys.urlJumper, not Netscape.toys.urlJumper.

14. menubars.IOWA

Updated the "Save in Frontier..." script to use the user.cards table instead of scratchpad.

15. About window

The www.scripting.com url is now live!

16. FinderMenu.getSelectionList

When the scriptable Finder is running, get the selection using an Apple event, not the ucmd.


© Copyright 1996-97 UserLand Software. This page was last built on 5/7/97; 1:24:52 PM. It was originally posted on 10/5/96; 1:38:47 PM. Internet service provided by Conxion.