FROM : Jakob Olesen
DATE : Mon Jul 17 21:50:22 2006
On 17/07/2006, at 2.47, CoLo0LoGo wrote:
> I found this while learning ruby on rails
> http://rubycocoa.sourceforge.net
>
>> From the notes, it uses the full Garbage collection of Ruby, and the
> full spectrum of Cocoa's Objects and other items
>
> Has anyone tried it out for anything ?
I have tried it and ended up writing my own Ruby bridge. Not because
rubycocoa is bad, but it is intended for a different purpose than mine.
Rubycocoa is intended for writing a Ruby application that uses Cocoa.
For this it works very well.
I wanted to write a Cocoa app that uses Ruby for scripting. For this
it works not so well.
The fundamental problem is a bit technical, but basically calling
Cocoa from Ruby works well, while calling Ruby from Cocoa has limited
support. This is OK if you just need to handle callbacks like
sheetPanelDidEnd:returnCode:contextInfo:
(The real problem is [NSMethodSignature signatureWithObjCTypes:]
being a private method, but that's another matter)
So, rubycocoa is sort of a one-way bridge. It is great for using
Cocoa from Ruby, less great for using Ruby from Cocoa.
Oh, and it is LGPL.
Something like pyobjc for Python seems a lot more mature.
DATE : Mon Jul 17 21:50:22 2006
On 17/07/2006, at 2.47, CoLo0LoGo wrote:
> I found this while learning ruby on rails
> http://rubycocoa.sourceforge.net
>
>> From the notes, it uses the full Garbage collection of Ruby, and the
> full spectrum of Cocoa's Objects and other items
>
> Has anyone tried it out for anything ?
I have tried it and ended up writing my own Ruby bridge. Not because
rubycocoa is bad, but it is intended for a different purpose than mine.
Rubycocoa is intended for writing a Ruby application that uses Cocoa.
For this it works very well.
I wanted to write a Cocoa app that uses Ruby for scripting. For this
it works not so well.
The fundamental problem is a bit technical, but basically calling
Cocoa from Ruby works well, while calling Ruby from Cocoa has limited
support. This is OK if you just need to handle callbacks like
sheetPanelDidEnd:returnCode:contextInfo:
(The real problem is [NSMethodSignature signatureWithObjCTypes:]
being a private method, but that's another matter)
So, rubycocoa is sort of a one-way bridge. It is great for using
Cocoa from Ruby, less great for using Ruby from Cocoa.
Oh, and it is LGPL.
Something like pyobjc for Python seems a lot more mature.
| Related mails | Author | Date |
|---|---|---|
| CoLo0LoGo | Jul 17, 02:47 | |
| Mike Blaguszewski | Jul 17, 18:05 | |
| Jakob Olesen | Jul 17, 21:50 | |
| Sherm Pendley | Jul 17, 23:08 | |
| Mike Blaguszewski | Jul 17, 23:08 | |
| Jakob Olesen | Jul 17, 23:42 | |
| CoLo0LoGo | Jul 17, 23:59 | |
| Jakob Olesen | Jul 18, 00:15 | |
| cocoa-dev-admins | Jul 18, 00:15 | |
| Sherm Pendley | Jul 18, 00:48 |






Cocoa mail archive

