[MacRuby-devel] spotlight - MDItemRef

Josh Ballanco joshua.ballanco at apple.com
Thu Oct 29 10:48:44 PDT 2009


Hi Ruben,

Using an Objective-C class in a MacRuby script is the first step in  
both recipes currently posted to the MacRuby website (http://www.macruby.org/documentation.html 
). Your choices are either to add a "dummy" Init_foo{} function and  
make a foo.bundle from the class or compile the Objective-C files to a  
foo.framework and then either put the framework in a well known  
location (like /Library/Frameworks) or modify the DYLD_FRAMEWORK_PATH  
before running your MacRuby script.

If you want more details on wrapping C API, I am currently working on  
just such a project, and might be able to put together another recipe.  
What sort of information would you be looking for specifically? Is  
there a particular C API you'd be interested in seeing how to wrap?

Finally, as to your later question, there actually *is* a MacRuby API  
for GCD currently in the 0.5 beta and nightly builds.

Cheers,

Josh


On Oct 29, 2009, at 2:27 AM, Ruben Fonseca wrote:

> Hi Laurent!
>
> On Oct 28, 2009, at 12:31 AM, Laurent Sansonetti wrote:
>
>> and to wrap this C API into an Objective-C class that you can call  
>> from MacRuby in the meantime.
>>
>> Laurent
>
> Just a quick question. Imagine I have an Objective-C class that  
> wraps that API. How can I then use it on a Macruby script? I  
> probably have to compile it somewhere...
>
> Ruben
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel



More information about the MacRuby-devel mailing list