Frontier Tutorials / Writing Table Renderers / Anatomy of a Table Renderer

Anatomy of a Table Renderer

The table renderer is simply a script that is passed the address of the table to be rendered; it is expected to return the HTML representation of the table:

on RenderTableAsXXX( tableAdr )
space picturelocal
space pictureoutText = ""
space picture« ...
space picture« Render the table to html text
space picture« ...
space picturereturn( outText )

That's all. Nothing more.

So why am I doing this tutorial, anyway?

The renderer is a callback script. And as is usual for callback scripts, the outline is easy to describe. The brief comment in the center of the above script--render the table to html text--hides the bulk of the effort.

Also as usual, there's an easy way and a hard way. First, we'll look at the hard way, because it's the simplest to understand. (Aren't paradoxes wonderful?) Besides--sometimes the easy way won't do what you need.

So let's look at the hard way.

Tutorial Contents
Writing Table Renderers
What Is A Table Renderer
Anatomy of a Table Renderer
The Hard Way
The Easy Way
The Easiest Way
About the Author