• 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
NSDictionary casting
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSDictionary casting


  • Subject: NSDictionary casting
  • From: Dan Hopwood <email@hidden>
  • Date: Fri, 5 Nov 2010 13:36:25 +0000

Hi all,

I am using XML-RPC technology to invoke a website back end. I used the
Wordpress project to extract what I needed in order to send off requests and
decode what I get back from the webservice. This works.

The encoding/decoding methods equate the *struct* tag to the type *
NSDictionary* for obvious reasons. In order to form the NSDictionary object
to encode however requires me to set the name value pairs manually, which is
annoying. I wondered whether it's possible to instead define a custom class,
which contains the attributes I want to send and then cast the object to
type NSDictionary, which the encoder is then able to interpret.

In the same way, if a struct is returned by the webservice I'd like to be
able to cast the NSDictionary object to a custom class.

If anyone is able to point me in the right direction I would be very
grateful.

Cheers,

Dan
_______________________________________________

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

  • Follow-Ups:
    • Re: NSDictionary casting
      • From: Sherm Pendley <email@hidden>
  • Prev by Date: Re: Cannot find protocol declaration for 'NSTableViewDelegate'
  • Next by Date: Map peel affect
  • Previous by thread: Re: Threads and run loops
  • Next by thread: Re: NSDictionary casting
  • Index(es):
    • Date
    • Thread