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: CGContextClipToRects: invalid context 0x0.

2015-12-18 Thread Uli Kusterer
On 18 Dec 2015, at 17:59, Richard Charles wrote: > Debugging a linked library without symbols is difficult (bordering on > impossible). It's not easy, but far from impossible. If you can read assembly, you can usually figure out quite a lot. The debugger will disassemble stack frames for you

Re: CGContextClipToRects: invalid context 0x0.

2015-12-18 Thread Quincey Morris
On Dec 18, 2015, at 08:59 , Richard Charles wrote: > > Apple’s frameworks do not have symbols. IIRC several OS X versions ago, Apple use to release versions of the system frameworks that included symbols, but this wasn’t very useful because they came out so much later than the OS itself. I don

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: Environment woes executing scripts from my OS X app

2015-12-18 Thread Clark Cox
If you know the environment variables you want to set, just use /usr/bin/env. (that’s it’s raison d’être): - Instead of executing: path/to/script args - Execute: /usr/bin/env PYTHONPATH=… PYTHONHOME=... path/to/script args Or you can use posix_spawn to do the launching, which

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: CGContextClipToRects: invalid context 0x0.

2015-12-18 Thread Richard Charles
After researching I found answers to my questions. > The first thing I noticed is that there are no debug symbols in Apple’s > frameworks. It that normal? Apple’s frameworks do not have symbols. > How do you debug something with no symbols? Debugging a linked library without symbols is diffi

Re: output string like a teleprinter (NSTextView)

2015-12-18 Thread Graham Cox
> On 18 Dec 2015, at 8:37 PM, sqwarqDev wrote: > > I’m pretty sure I didn’t use a timer (see below). > I wasn’t really trying to second-guess how you might have done this in the past; more, I was suggesting how you could do it without having “discovered” this effect previously. It definitel

Re: output string like a teleprinter (NSTextView)

2015-12-18 Thread sqwarqDev
> On 18 Dec 2015, at 06:34, Graham Cox wrote: > > If it happened accidentally it was most likely due to setting up a situation > that caused extreme low performance No, it wasn’t. > You could just gradually add characters from the original string to a > ‘display’ string using a timer and

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