[MacRuby-devel] [MacRuby] #152: KVC arguments not properly marshalled
MacRuby
ruby-noreply at macosforge.org
Fri Nov 14 08:25:13 PST 2008
#152: KVC arguments not properly marshalled
-----------------------------+----------------------------------------------
Reporter: ben at tanjero.com | Owner: lsansonetti at apple.com
Type: defect | Status: closed
Priority: blocker | Milestone: MacRuby 0.4
Component: MacRuby | Resolution: fixed
Keywords: |
-----------------------------+----------------------------------------------
Changes (by ben at tanjero.com):
* status: reopened => closed
* resolution: => fixed
Comment:
For posterity, the final syntax is:
{{{
class MathFacts
kvo_array :firstTenSquares do
def size; 10; end
def [](i); (i+1)*(i+1); end
end
end
>> MathFacts.new.valueForKey 'firstTenSquares'
=> [1, 4, 9, 16, 25, 36, 49, 64, 81, 100]
}}}
and similar for kvo_set.
--
Ticket URL: <http://www.macruby.org/trac/ticket/152#comment:7>
MacRuby <http://macruby.org/>
More information about the MacRuby-devel
mailing list