Re: NSMutableDictionary Error
Re: NSMutableDictionary Error
- Subject: Re: NSMutableDictionary Error
- From: mw <email@hidden>
- Date: Sat, 18 Jan 2003 13:22:42 -0500
On 1/18/03 1:08 PM, "Seth Willits" <email@hidden> 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];
>
>
PB 2.1 & OS X 10.2.3
>
>
Seth Willits
Well, if your code is copied directly from your application, then the
problem is you are calling setObject:forkey when the method is
setObject:forKey:. Notice how Cocoa is case-sensitive?
Mw
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.