Re: Getting the content-type in a HTTP response
Re: Getting the content-type in a HTTP response
- Subject: Re: Getting the content-type in a HTTP response
- From: "Kyle Sluder" <email@hidden>
- Date: Fri, 25 Jan 2008 20:05:34 -0500
On 1/25/08, Dave Carrigan <email@hidden> wrote:
> Which I think reinforces my assertion that Apple really was
> shortsighted in designing the API, since returning a case-sensitive
> dictionary is pretty much useless for the task at hand, since it seems
> I have to do a linear search of the dictionary in order to find any
> item in it, which is useless and stupid.
I do not find it preferable to introduce an entirely new collection
class just for this purpose. NSDictionary is well-established and
well-supported throughout the system, it would be a bad design to use
something else. Not to mention that NSDictionary does not explicitly
require that keys be NSStrings (though in practice this is what you're
going to be doing 99% of the time anyway).
Now, it turns out that you're also using the wrong accessor.
-valueForKey: is the KVC accessor; you meant to use -objectForKey:.
--Kyle Sluder
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden