#531: make #[] and alias for #objectForKey
-------------------------------------+--------------------------------------
Reporter: mattaimone...@… | Owner: martinlagarde...@…
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/>
_______________________________________________
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel