[Rubycocoa-devel 385] fix lazy import

Zurück zum Archiv-Index

kimura wataru kimur****@i*****
Tue Sep 19 02:26:52 JST 2006


Hi,

I wrote a patch to fix "lazy import" and commited to trunk (r1094). 
So RubyCocoa programmers never use OSX.ns_import.

The patch is ...

* override Object.inherited()
* redefine a class with OSX.ns_import at definition of a subclass of
  Object (Ruby's root class)


the problem "lazy import":

    module OSX
      class NSURL
        def some_method()
        end
      end
    end

A programmer write this code to add a method to the Cocoa class OSX::NSURL.
But Ruby defines a new subclass of Object as OSX::NSURL. "OSX.ns_import 
:NSURL" is required before using OSX::NSURL class.


-- 
kimura wataru
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix_lazy_import.patch
Type: application/octet-stream
Size: 2185 bytes
Desc: not available
Url : http://lists.sourceforge.jp/mailman/archives/rubycocoa-devel/attachments/20060919/afa276dd/attachment.obj 


More information about the Rubycocoa-devel mailing list
Zurück zum Archiv-Index