On The Radio WindowTypes Framework
By Mark Woods, February 3, 2003
A Simple Problem
Today I wanted to do something that seemed fairly simple. I wanted to write a short macro that would open an outline containing all of the posts I had written today, or open a new outline if no posts had yet been written. This is all part of playing around with writing weblog posts using the Radio outliner. The problem turned out to be more interesting than I anticipated. I document the process I went through here mostly to help me remember what I did and why.
I am creating the posts in an outline and I periodically save the outline to a designated directory. I figured I could just read in the OPML, create an outline from the OPML, then display it in a window. My first effort fell a little short of the mark. To create a new outline object you must specify an address for some existing table structure in which to create the table (e.g. workspace.myNewOutline). Thing is, I didn't want these outlines in the Radio database. I just wanted to open an outline from a file. After satisfying myself that the existing outline verbs could not help me out, I decided to look at how Radio does it. That is when I found out about Radio's WindowTypes Framework.
Playing The Sleuth With Radio
I found out about the WindowTypes Framework accidentally. I knew that Radio allows creation of new outlines (via File/New...) that are not associated with a table and figured I would just follow its logic. You can figure out most of Radio's menu commands by simply holding down the 'Alt' key (on the PC; I think it is the Option key on the Mac). This approach does not work with the File, Edit, or Window menus. For grins I created a new outline (using File/New), then hit Shift-Backspace. This normally opens up an edit window for the parent object. I was pleasantly surprised when this keystroke opened up a window named: system.temp.windowTypes.window.0000001. A little more digging, a Google search, and then I found the WindowTypes Framework.
Solution
Cutting to the chase, I learned that I could use the Frontier.tools.windowTypes.newWindow verb to launch a new edit window with any legit Radio type (outlineType, in my case). It was a little tricker working out what window type to use, until I found the table of built-in Radio window types at Frontier.tools.data.windowTypes. The one called "outlinerFile" is what I wanted. Once I had the window created I used the op.xmlToOutline verb to load up the OPML from the file into an outline edited within the window.