[MacRuby-devel] MacRuby classes delete/overwrite Objective-C classes?

Mark Rada mrada at marketcircle.com
Fri Feb 11 17:00:29 PST 2011


Hi Robert,

Classes in ruby are open, which means that if you define it in multiple places, you get one class with things from all the definitions definitions.

However, if you define the same methods, then which ever method you define last is the one that will exist. There are also techniques for concatenating methods. 

If you want two classes with the same name two remain separate, consider using a module to create a namespace. 


Sent from my iDevice

On 2011-02-11, at 17:54, Robert Payne <robertpayne at me.com> wrote:

> Hey All,
> 
> Do MacRuby classes completely overwrite Objective-C classes if you load one in with the same class name? I'm just testing the best way to communicate to a MacRuby class from an Objective-C class and wanted to make sure.
> 
> Robert Payne
> Interactive Developer
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20110211/f4bec7bd/attachment.html>


More information about the MacRuby-devel mailing list