|
From: kimura w. <ki...@us...> - 2005-06-07 14:53:22
|
Hi,
This patch was merged to CVS HEAD.
Thanks!
Thu, 28 Apr 2005 08:57:07 +0100, Jonathan Paisley wrote:
>I've attached a patch to this message that extends the base Ruby-Cocoa
>bridge class methods. addRubyMethod_withType allows creation of an
>actual ObjC method corresponding to a ruby method. This means that
>key-value coding will be able to find the actual method when it does a
>lookup.
>
>This could be used to define real accessor methods (therefore avoiding
>the valueForUndefinedKey hook), or for implementing array accessors
>(which have no such hook). For example:
>
> def kvc_array_accessor(*args)
> kvc_accessor(*args)
> args.each do |v|
> n = v.to_s
> n[0..0] = n[0..0].upcase
> self.addRubyMethod_withType("countOf#{n}".to_sym,"i4@8:12")
>
--
kimura wataru
|