On Nov 2, 2009, at 10:04 PM, Jens Alfke wrote:

> This misfeature has confused a lot of people over the years, including me. My 
> solution, once I found out what was going on, was to never send NSURLs over 
> DO — I converted them to NSStrings on the sending side and back to NSURLs on 
> the receiving.

Jens' solution is best, but I've also used a category override to work around 
this.  If NSURL ever implements replacementObjectForPortCoder: in a category, 
this will break.

@interface NSURL (PortCoderFix) @end

@implementation NSURL (PortCoderFix)

- (id)replacementObjectForPortCoder:(NSPortCoder *)encoder
{
    return [encoder isByref] ? (id)[NSDistantObject proxyWithLocal:self 
connection:[encoder connection]] : self;
}

@end

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to