Subclassing NSURL
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.