[MacRuby-devel] [MacRuby] #531: make #[] and alias for #objectForKey
MacRuby
ruby-noreply at macosforge.org
Wed Dec 30 21:29:38 PST 2009
#531: make #[] and alias for #objectForKey
-------------------------------------+--------------------------------------
Reporter: mattaimonetti@… | Owner: martinlagardette@…
Type: defect | Status: new
Priority: blocker | Milestone: MacRuby 0.5
Component: MacRuby | Keywords:
-------------------------------------+--------------------------------------
Quite often, Cocoa classes use the #objectForKey method, for instance:
{{{
NSLocale.currentLocale.objectForKey(NSLocaleCalendar)
}}}
I think that it would a lot of the API calls would look better if they
would follow the usual Ruby collection API:
{{{
NSLocale.currentLocale[NSLocaleCalendar]
}}}
It's not much but it's a bit like other existing shortcuts:
foo= and foo? for setFoo and isFoo.
--
Ticket URL: <http://www.macruby.org/trac/ticket/531>
MacRuby <http://macruby.org/>
More information about the MacRuby-devel
mailing list