Hi,
I got a mail ; is it possible to make a plugin for Quicksilver
by Ruby (with RubyCocoa)?
Is there someone writing the plugin, and interesting one? The
follows is snip of the mail:
--
FUJIMOTO Hisa
------------------------------------------
I am enjoying your RubyCocoa. It is my first Mac programming experience,
though I am also using FScript. Thank you for doing such a good job on it!
I would like to make a plugin for Quicksilver
http://quicksilver.blacktree.com/ .
They use a standard plugin architecture (see
http://quicksilver.blacktree.com/docs/?page=Quicksilver+Development ).
Plugins can be written in ObjectiveC, or in Python using PyObjC
http://quicksilver.blacktree.com/docs/?page=PyObjC+PlugIns
I thought that Ruby might be used to make these plugins. If Python can be
used, why not Ruby?
But I don't know if that is possible.
They use arrays in the plist to specify handlers. The values of these entries
are class names, so I guess that they call the code dynamically.
They have an ObjectiveC file in the Python plugins that defines a subclass of
NSBundle with a unique name. This subclass overrides
-(Class)classNamed:(NSString*)name
to do the lookup of Python classes. Then they have another class with a
+(void)load
method that gets the NSBundle object for the plugin and changes its class to
that of the NSBundle subclass.
Is this the way that Ruby could make plugins, or is there a better way?
|