[Rubycocoa-devel 386] Re: fix lazy import

Back to archive index

Laurent Sansonetti lsans****@apple*****
Tue Sep 19 04:15:23 JST 2006


Hi Kimura-san,

Excellent! Thank you very much, I couldn't fix the problem by myself  
in the past. I just transfered your fix to the 'apple-unstable' branch  
as well!

Now, OSX.ns_import is really unnecessary for users!

Thanks again,
Laurent

On Sep 18, 2006, at 7:26 PM, kimura wataru wrote:

> 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
> <fix_lazy_import.patch>
> _______________________________________________
> Rubycocoa-devel mailing list
> Rubyc****@lists*****
> http://lists.sourceforge.jp/mailman/listinfo/rubycocoa-devel




More information about the Rubycocoa-devel mailing list
Back to archive index