Re: NSDocument, setFileURL:
Re: NSDocument, setFileURL:
- Subject: Re: NSDocument, setFileURL:
- From: Brian Amerige <email@hidden>
- Date: Wed, 10 Oct 2007 18:55:57 -0400
Hi,
It seems no one has responded to this, which is typically a good
indicator that it's an odd problem. And with an odd problem, comes an
odd solution.
I'm typically (read: almost always) against using class-dump, using
private/undocumented methods, etc., but as far as I can tell
NSDocument is doing its job, and there is no public way of preventing
it from doing so, which would be necessary in this case. That being
said:
class-dump reveals a method, "_resetMoveAndRenameSensing", which,
unsurprisingly, resets exactly what I need to. A quick subclass of
setFileURL: in my NSDocument subclass allows me to do have setFileURL:
do exactly what I need.
- (void)setFileURL:(NSURL *)absoluteURL
{
[super setFileURL:absoluteURL];
if ([super respondsToSelector:@selector(_resetMoveAndRenameSensing)])
{
[super performSelector:@selector(_resetMoveAndRenameSensing)];
}
}
Best,
Brian Amerige
email@hidden
_______________________________________________
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