|Frontier Tutorials / Writing Table Renderers / 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 )
outText = ""
« Render the table to html text
return( 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.