[MacRuby-devel] Obj-C -> MacRuby and back?

Josh Ballanco joshua.ballanco at apple.com
Wed Apr 28 23:26:18 PDT 2010


Alexander,

See also, for example, the recipe on the MacRuby website for TDD. In that recipe, a class created in Obj-C gets used from MacRuby.

- Josh

On Apr 28, 2010, at 2:17 PM, Alexander von Below wrote:

> Thanks a lot!
> 
> I have looked at the EmbeddedRuby app, but I did not see the way "back". Could you point me in the right direction?
> 
> Alex
> Am 28.04.2010 um 22:55 schrieb Laurent Sansonetti:
> 
>> Hi Alexander,
>> 
>> On Apr 28, 2010, at 1:49 PM, Alexander von Below wrote:
>> 
>>> Hello,
>>> 
>>> I have a conceptual question:
>>> 
>>> Is it possible for an embedded ruby script running in MacRuby to call back into my Cocoa Application easily? Or would the only way be to create distributed Objects or similar IPC mechanisms?
>> 
>> It is possible to run the MacRuby runtime inside a pure Objective-C-based Cocoa app, which allows Objective-C to talk to Ruby objects (and vice-versa) inside the same process. Check out the MacRuby.h header file (an Objective-C API to talk to the runtime) inside the framework, or the EmbeddedMacRuby sample app.
>> 
>> Laurent
>> _______________________________________________
>> MacRuby-devel mailing list
>> MacRuby-devel at lists.macosforge.org
>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
> 
> _______________________________________________
> 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