[MacRuby-devel] RubyCocoa layer
Laurent Sansonetti
lsansonetti at apple.com
Mon Jun 23 17:52:36 PDT 2008
On Jun 24, 2008, at 6:20 AM, Eloy Duran wrote:
> Hi,
>
> Today I merged my code for the RubyCocoa layer.
> It's still very premature. There are some notes in sample-macruby/
> RubyCocoa/README
> about what still needs to to be done.
Excellent, thanks!
> Also it is now in lib/osx/rubycocoa.rb and there's a osx/cocoa.rb.
> The latter will probably be removed as to not have RubyCocoa
> applications work by default.
> This needs to be discussed further.
As I said earlier I don't think osx/cocoa.rb is a good idea, I would
prefer rubycocoa.rb instead.
This is a temporarily compatible layer, designed to help people port
their RubyCocoa app to MacRuby. The purpose is not to provide a layer
on which people can rely on eternally. So having developers explicitly
require rubycocoa.rb is better IMHO (and anyway, in the most cases,
this will be an Xcode app that has to be modified to link against
MacRuby.)
Also, I don't think it's a good idea to duplicate the whole osx/*.rb
environment then.
> For now the main issues are the super_foo style methods and also some
> method missing like behaviour
> for objc methods that check if a method exists before dispatching. The
> latter is currently being worked around,
> but that should definitely move out.
I will address these.
Regarding your commit:
- could you install the layer as part of instruby.rb instead? And
respect destdir.
- I wonder if it's necessary to commit the RubyCocoa samples in sample-
macruby as you did. Ultimately we might be able to run all RubyCocoa
samples, but we probably don't want to have all of them in macruby-
sample, right? Maybe some of the samples could be moved in the test
directory, for testing purposes?
I think people will be confused to see a RubyCocoa directory in /
Developer/Examples/Ruby/MacRuby.
Laurent
More information about the MacRuby-devel
mailing list