• 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
[Cocoa] Subclassing NSMutableURLRequest
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Cocoa] Subclassing NSMutableURLRequest


  • Subject: [Cocoa] Subclassing NSMutableURLRequest
  • From: Alexander von Below <email@hidden>
  • Date: Mon, 30 Jun 2008 22:05:31 +0200

Hello List,

I have searched the archives, but did not really find an answer to my question, even though the title was the same...

I want to subclass NSMutableURLRequest, in order to create my own, specialized URLRequest (namely, XML-RPC). I thought that was a smart idea.

As NSURLRequest is deep-copied for transmission, I could overwrite copyWithZone: , and create my custom body there on 10.4

On 10.5 however, copyWithZone: (or copyMutableWithZone:, for that matter), is never called.

Using class_dump to take a peak at the class, I overwrote - (struct _CFURLRequest *)_CFURLRequest, and all is well.

Now... is that a good idea? Or should I not subclass NSMutableURLRequest at all?

Any hints or opinions are appreciated!

Alex


_______________________________________________

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


  • Prev by Date: Re: RFC822 date-string to NSDate
  • Next by Date: Re: garbage collection and NSConnection
  • Previous by thread: Re: RFC822 date-string to NSDate
  • Next by thread: Splitting an NSAttributedString across different NSRects of a given size
  • Index(es):
    • Date
    • Thread