• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Getting the content-type in a HTTP response
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Getting the content-type in a HTTP response (From: Dave Carrigan <email@hidden>)
 >Re: Getting the content-type in a HTTP response (From: Bill Garrison <email@hidden>)
 >Re: Getting the content-type in a HTTP response (From: Dave Carrigan <email@hidden>)

  • Prev by Date: Re: NSScroller methods not being called
  • Next by Date: Re: Getting the content-type in a HTTP response
  • Previous by thread: Re: Getting the content-type in a HTTP response
  • Next by thread: Re: Getting the content-type in a HTTP response
  • Index(es):
    • Date
    • Thread