Skip navigation.
 
mlRe: NSMutableDictionary Error
FROM : Nicholas Riley
DATE : Sat Jan 18 19:28:25 2003

On Sat, Jan 18, 2003 at 10:08:09AM -0800, Seth Willits wrote:
> When compiling, the compiler gives me the error that the 
> NSMutableDictionary class doesn't respond to the setObject:forKey 
> message. How can this be? It's clearly documented.
>
>
> NSMutableDictionary * attribs = [NSMutableDictionary dictionary];
>
> [attribs setObject:[NSFont fontWithName:@"Times" size:36]
>                        forkey:NSFontAttributeName];


Try 'forKey', not 'forkey'.  Objective-C selectors are case-sensitive.

--
=Nicholas Riley <<email_removed>> | <http://www.uiuc.edu/ph/www/njriley>
        Pablo Research Group, Department of Computer Science and
  Medical Scholars Program, University of Illinois at Urbana-Champaign
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

Related mailsAuthorDate
mlNSMutableDictionary Error Seth Willits Jan 18, 19:08
mlRe: NSMutableDictionary Error mw Jan 18, 19:22
mlRe: NSMutableDictionary Error Nicholas Riley Jan 18, 19:28
mlRe: NSMutableDictionary Error Seth Willits Jan 18, 19:30