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

Subclassing NSURL


  • Subject: Subclassing NSURL
  • From: Jonathan Wight <email@hidden>
  • Date: Thu, 20 Nov 2003 16:15:53 -0600

Hi,

I'd like to make a subclass of NSURL that I can pose as NSURL so I can override the behavior of the "-standardizedURL" method. NSURL is toll-free bridged with CFURL so I thought I could subclass the same way you could subclass NSArray/NSDictionary/etc (e.g. create a subclass that contains an instance of the class you're subclassing and route methods through that object). I tried that but as soon as I called poseAsClass my program would die deep in the bowels of somewhere unpleasant.

I was thinking I could try just creating a new category of NSURL that replaces NSURL's standardizedURL with my implementation, unfortunately I cannot then called the original standardizedURL method. If CFURLRef exposed a function that worked the same as standardizedURL I could call that, but unfortunately I couldn't find one.

Has anyone successfully subclassed NSURL? And if so please share your wisdom!

Cheers.

Jon.
_______________________________________________
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.

  • Prev by Date: Re: Dynamically Generating GUI forms from an XML file?
  • Next by Date: Re: NSNotification for screen resolution change?
  • Previous by thread: Re: Limit NSTextField Size of Input
  • Next by thread: SearchKit vs. Lucene
  • Index(es):
    • Date
    • Thread