A community of Frontier
and Radio Users


Meridian News


Community List


Regex Project

From my custom menu, a little item I call "Preview Page Text".

tools.betty.previewPageText(), which looks like this:

on previewPageText ()
    //local (st = clock.ticks())
    local (s, adrpagetable = @websites.["#data"])
    local(adrobject = table.getCursorAddress ())

    html.data.flPreview = true
    s = html.buildObject (adrobject, adrpagetable)
    try {delete (@html.data.flPreview)}

    //scratchpad.time = string((clock.ticks() - st) / 60)

    edit(@scratchpad.text)
    wp.setText(s)
    wp.go(up, infinity)

It's really useful when debugging macros, since you can check the code without actually previewing the page.

If you use BBEdit, you can then hit Cmd-E, twiddle with code and preview without firing up the website framework.

Since I don't print from Frontier very often, I put cmd-P on this script.


Another item in my custom menu is the following script, which adds a glossary entry for the selected page or table:

local (adrPageTable = @websites.["#data"])
on vproc (adr)
    window.msg(adr)
    new(tableType, adrPageTable)
    html.buildPageTable (adr, adrPageTable)
    adrPageTable^.title = html.getPagePref("title", adr)
    if typeOf(adrPageTable^.title) == stringType
        html.addPageToGlossary (adrPageTable)
local(adr = table.getCursorAddress ())
if typeOf(adr^) == tableType
    for x = 1 to sizeOf(adr^)
        vproc(@adr^[x])
else
    vproc(adr)

It skips anything for which html.getPagePref() returns a booleanType, assuming that the object is not a page.

Simple stuff, but they save a lot of time. Enjoy!