Re: Directory navigated to by menu File > Open
Re: Directory navigated to by menu File > Open
- Subject: Re: Directory navigated to by menu File > Open
- From: Quincey Morris <email@hidden>
- Date: Fri, 16 Jan 2015 02:24:39 +0000
On Jan 15, 2015, at 16:16 , Jerry Krinock <email@hidden> wrote:
>
> Presumably I could get the control I want by overriding and re-implementing -openDocument: to actually use -currentDirectory the way the documentation says it should.
I’m not entirely sure you should do that, at least not casually.
Note that ‘currentDirectory’ has been available since OS X 10.0, and that methods that displayed open panels with a directory parameter (such as ‘beginForDirectory:…’, thereby “encouraging” you to set the directory yourself) were *discarded* in 10.6.
So, I’m guessing that in 10.6, a new layer of UI behavior was overlaid on top of what happened before, that’s supposed to remember what the user did before. (In a sense, this might have been Apple's response to the 3rd party Default Folder and SuperBoomerang extensions of the olden days, which had been kicking Navigation Services’ butt for decades.)
In effect, ‘currentDirectory’ died in 10.6.
It’s possible that some or all of the old behavior is used when the defaults that Ken and Lee Ann mentioned have not yet been set (that is, the first time the app is used after installation), which might explain why ‘currentDirectory’ is not deprecated.
It’s also possible that Apple realized that its new “behavior overlay” approach isn’t good for certain classes of app, so left it open to you to make it behave the old way using the technique that Ken described (setting the directory after creating the open panel) — or, really, allowing you to make it behave in an ol’ non-standard way, should you choose.
If that’s all true, then you should pause before jumping in and interfering. If it’s just a matter of your (historical) expectations, you’re probably better off leaving it as it is, so that it’s consistent with what other apps do — and what Mac users younger than us (ahem!) unconsciously expect.
Only if it actively interferes with the way your users actually use your app (and they’re complaining about it) could I see an unarguable reason for going your own way on this.
FWIW
_______________________________________________
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