|
||||||||||||
|
a travel log
From France to Scotland by sea. [technology] - What I've learned about creating Macros in Radio. For those of you who don't know this, Radio is a piece of software I am using to create this web site. For the basic user, Radio allows one to create a fully functional personal log (sometimes called a Blog); for more advanced users, it offers a platform for creating powerful scripts (macros) to generate more interesting web sites. For the past few days I've been trying to teach myself how to script in Radio, and the first thing I discovered was that the documentation was... well... lacking. There seems to be tons of information, but none of it is organized. Since I'm going through the pains of learning this stuff, I thought I would put together a page with some of what I've learned; should be useful to somebody. First script: I've been reading Dave's Going Crazy with Macros, and got very excited; it all looked very simple! And it all worked. In Going Even Crazier with Macros I hit my first roadblock; for some reason the Macros directory in the www folder was not loading the scripts I put there, so that was the end of that tutorial. Turns out it's a bug in the OS X version of Radio, and I expect it will be solved soon. SO, I decided I needed to learn how to create a script in the Radio application itself (rather than using a text editor as described by Dave in "Even Crazier"). Here is what I did: - I opened Radio.root - Inside "workspace", I created new sub-table called "tomScripts" - I then create my scripts in this sub-table - Once my script is tested and debugged, I was able to call it from a .txt file in my www directory with the following call: <%workspace.tomScripts.scriptName()%> I'm looking around now to find out how I can create my own .root file, because I'm not super comfortable with the notion that i'm scripting inside radio.root; I'll update this page once I've found out how to do this. update As is typical with these things, when you think something is missing, it's usually because you haven't found it yet. Here is a link to a most useful page - called programming pointers; and it's just that. Pointers to how to program in Radio... Dave should really point to this page from this "Going crazy with macros" © Copyright 2003 Thomas Degremont. Last update: 3/11/03; 6:12:07 PM. |
|
|||||||||||