Embedding Ruby in Firefox addons

Ok, so finally I’m being pushed to do a Ruby GUI.

I have long claimed that if I ever did a gui again, I would use gecko.

Now the push comes to the shove and I’m looking at the problem
again… And I’m starting to think I’m wrong.

Writing a standalone app that uses Gecko as the gui / layout engine is
wrong… the correct approach is to use firefox as the app, and just
write a firefox addon.

So my question is this…

Does anyone have a “hello world” firefox addon that will allow the
user to enter a parameter and then invoke a ruby script with that
parameter and display the result in a firefox window?

Thanks,

John C. Phone : (64)(3) 358 6639
Tait Electronics Fax : (64)(3) 359 4632
PO Box 1645 Christchurch Email : [email protected]
New Zealand

John C. wrote:

Does anyone have a “hello world” firefox addon that will allow the
user to enter a parameter and then invoke a ruby script with that
parameter and display the result in a firefox window?

I think the right way to do this is to use Camping to build
the app, and when you launch it, to use one of the browser
communication APIs to make an existing browser open a new
tab, or to launch a configured browser, on the localhost URL
that the Camping app is serving. That way it’ll work on a
wider range of browsers.

I have a collection of code snippets for such browser
communications. One for the Mac, one a Netscape Unix X-Windows
thing, and a couple of different methods for Windows. I plan
sometime to make these into a multi-platform Ruby extension
GEM that can be used in the way described. No promises as to
when however - I can’t look at it for more than a month. If
someone else wants to do it, I can send what I have.

Clifford H…