[MacRuby-devel] Conforming to a protocol

Eloy Duran eloy.de.enige at gmail.com
Tue Nov 16 10:59:26 PST 2010


I don't have an example of a class that uses conformsToProtocol: on the delegate, so I can't give you a code example, but I would try to override the conformsToProtocol: class and instance methods and return true for those you support.

On 15 nov 2010, at 00:15, Martijn Walraven wrote:

> Hi,
> 
> I was wondering if there is any way to formally indicate a MacRuby class conforms to an Objective-C protocol. I encountered some code that uses conformsToProtocol: instead of respondsToSelector: as a check before invoking delegate methods, and the only way I could get a delegate written in MacRuby to work was to create an Objective-C class with the same name and specify the required protocols in the interface declaration there.
> 
> Thanks,
> 
> Martijn
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel



More information about the MacRuby-devel mailing list