Re: Best way to get a file path for presentation to the user

2015-12-21 Thread Raglan T. Tiger
> On Dec 19, 2015, at 12:31 PM, Lee Ann Rucker wrote: > > Popup style is appropriate where the most important info is the last part but > sometimes they want to see the whole path. Standard style is for where the > whole path is important. It is an excellent control. -rags __

Re: Best way to get a file path for presentation to the user

2015-12-20 Thread Uli Kusterer
On 19 Dec 2015, at 09:51, Graham Cox wrote: > My use case is an interface that sets up a batch of files for saving in a > particular folder. The user chooses the folder using a standard NSOpenPanel, > but I want to display the chosen location in the UI so that they don’t need > to remember it.

Re: Best way to get a file path for presentation to the user

2015-12-19 Thread dangerwillrobinsondanger
Though you might consider including an analog of the slightly hidden but discoverable way Finder also exposes shell style paths from the Go menu with Go to Folder... The kb shortcut works in open/save panels as well. Sent from my iPhone > On Dec 20, 2015, at 8:00 AM, Graham Cox wrote: > > I

Re: Best way to get a file path for presentation to the user

2015-12-19 Thread Graham Cox
I was thinking that I didn’t want the user attempting to use it to navigate the folder hierarchy - but actually just using it for display and setting it to refuse First Responder does the trick pretty nicely. Because it shows the home folder as the user name and has the Home icon it’s much clear

Re: Best way to get a file path for presentation to the user

2015-12-19 Thread Sean McBride
On Sat, 19 Dec 2015 19:51:03 +1100, Graham Cox said: >I don’t think a NSPathControl is really appropriate for this. I'm curious why... that's what it's for. Cheers, -- Sean McBride, B. Eng s...@rogue-research.com Rogu

Re: Best way to get a file path for presentation to the user

2015-12-19 Thread Jens Alfke
> On Dec 19, 2015, at 12:57 AM, Graham Cox wrote: > > Actually - heh, -displayNameAtPath: really strips it back to just the folder > name, with no path at all. That doesn’t tell the user *where* the folder is. > Unless they’re already familiar with the location it’s likely less helpful > than

RE: Best way to get a file path for presentation to the user

2015-12-19 Thread Lee Ann Rucker
: Jens Alfke Cc: Cocoa-Dev List List Subject: Re: Best way to get a file path for presentation to the user > On 19 Dec 2015, at 5:23 AM, Jens Alfke wrote: > > >> On Dec 18, 2015, at 1:24 AM, Graham Cox wrote: >> >> I want to display a path to the user. I have a UR

Re: Best way to get a file path for presentation to the user

2015-12-19 Thread Graham Cox
> On 19 Dec 2015, at 7:51 PM, Graham Cox wrote: > > But I do want the string to be the most understandable for the user. I don’t > know really how many average users understand what ~/ means, but it’s > probably the best I can do. Actually - heh, -displayNameAtPath: really strips it back to

Re: Best way to get a file path for presentation to the user

2015-12-19 Thread Graham Cox
> On 19 Dec 2015, at 5:23 AM, Jens Alfke wrote: > > >> On Dec 18, 2015, at 1:24 AM, Graham Cox wrote: >> >> I want to display a path to the user. I have a URL, I need to show the local >> file path that represents (it’s always a local file path), where the >> /Users// is replaced by ~/ > >

Re: Best way to get a file path for presentation to the user

2015-12-18 Thread Uli Kusterer
On 18 Dec 2015, at 21:33, Ken Thomases wrote: > On Dec 18, 2015, at 12:23 PM, Jens Alfke wrote: >> >>> On Dec 18, 2015, at 1:24 AM, Graham Cox wrote: >>> >>> I want to display a path to the user. I have a URL, I need to show the >>> local file path that represents (it’s always a local file pa

Re: Best way to get a file path for presentation to the user

2015-12-18 Thread Ken Thomases
On Dec 18, 2015, at 12:23 PM, Jens Alfke wrote: > >> On Dec 18, 2015, at 1:24 AM, Graham Cox wrote: >> >> I want to display a path to the user. I have a URL, I need to show the local >> file path that represents (it’s always a local file path), where the >> /Users// is replaced by ~/ > > The

Re: Best way to get a file path for presentation to the user

2015-12-18 Thread Jens Alfke
> On Dec 18, 2015, at 1:24 AM, Graham Cox wrote: > > I want to display a path to the user. I have a URL, I need to show the local > file path that represents (it’s always a local file path), where the > /Users// is replaced by ~/ The best methods for this are in NSFileManager: /* displayName

Re: Best way to get a file path for presentation to the user

2015-12-18 Thread Graham Cox
Never mind, I just found it: stringByAbbreviatingWithTildeInPath —Graham > On 18 Dec 2015, at 8:24 PM, Graham Cox wrote: > > Hi all, > > I want to display a path to the user. I have a URL, I need to show the local > file path that represents (it’s always a local file path), where the > /Us

Best way to get a file path for presentation to the user

2015-12-18 Thread Graham Cox
Hi all, I want to display a path to the user. I have a URL, I need to show the local file path that represents (it’s always a local file path), where the /Users// is replaced by ~/ Is there an easy, reliable way to do this, or do I have to do a string search/replace myself? Going the other way