Re: SecStaticCodeCheckValidity fails when app is lauched from Terminal

2016-09-27 Thread Markus Spoettl
On 27/09/16 22:57, Chris Hanson wrote: On Sep 27, 2016, at 1:54 PM, Markus Spoettl wrote: On 27/09/16 22:39, Chris Hanson wrote: How are you getting the URL that you pass to represent your application? Could it be that you’re constructing the URL from a relative path when run from the comman

Re: Lifecycle for custom NSURLProtocol properties

2016-09-27 Thread Jens Alfke
> On Sep 26, 2016, at 10:42 PM, Allan Odgaard > wrote: > > I am making use of NSURLProtocol’s `setProperty:forKey:inRequest:` but it > seems that my custom properties outlive the URL request, and even if I > explicitly call `removePropertyForKey:inRequest:` after my request is done, > it wou

Re: SecStaticCodeCheckValidity fails when app is lauched from Terminal

2016-09-27 Thread Chris Hanson
On Sep 27, 2016, at 1:54 PM, Markus Spoettl wrote: > > On 27/09/16 22:39, Chris Hanson wrote: >> How are you getting the URL that you pass to represent your application? >> >> Could it be that you’re constructing the URL from a relative path when run >> from the command line, rather than the ful

Re: SecStaticCodeCheckValidity fails when app is lauched from Terminal

2016-09-27 Thread Markus Spoettl
On 27/09/16 22:39, Chris Hanson wrote: How are you getting the URL that you pass to represent your application? Could it be that you’re constructing the URL from a relative path when run from the command line, rather than the full path? (You can’t depend on being run from any particular working

Re: SecStaticCodeCheckValidity fails when app is lauched from Terminal

2016-09-27 Thread Chris Hanson
How are you getting the URL that you pass to represent your application? Could it be that you’re constructing the URL from a relative path when run from the command line, rather than the full path? (You can’t depend on being run from any particular working directory.) -- Chris > On Sep 26, 2

Re: NSTextView read real text content (without 0xA added by wordwrap)

2016-09-27 Thread Felipe Monteiro de Carvalho
Hello, Sorry for the noise, it turns out that the bug was in my software after all! thanks, -- Felipe Monteiro de Carvalho ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Con

Re: NSTextView read real text content (without 0xA added by wordwrap)

2016-09-27 Thread Jens Alfke
> On Sep 27, 2016, at 2:07 AM, Graham Cox wrote: > > Are you sure about that? I’ve never seen the text view add line endings to > the underlying raw text - that’s just not how text layout works. +1. I’ve been using NSTextView since 2001 and I know for a fact that it doesn’t insert meta-charac

Re: NSTextView read real text content (without 0xA added by wordwrap)

2016-09-27 Thread Graham Cox
> On 27 Sep 2016, at 7:28 PM, Felipe Monteiro de Carvalho > wrote: > > By the way, not sure if this makes a difference, but the original text > was added via NSTextView.string > > It is not text inputted by the user. > Well, a NSTextView can’t have a string unless it came from somewhere, the

Re: NSTextView read real text content (without 0xA added by wordwrap)

2016-09-27 Thread Graham Cox
> On 27 Sep 2016, at 7:26 PM, Felipe Monteiro de Carvalho > wrote: > > But to be sure I will test the same thing as you are testing, you are > reading the text via NSTextView.string ? Yes. I set up a very simple situation where the NSTextView’s delegate simply logs the textView.string as I t

Re: NSTextView read real text content (without 0xA added by wordwrap)

2016-09-27 Thread Felipe Monteiro de Carvalho
On Tue, Sep 27, 2016 at 11:26 AM, Felipe Monteiro de Carvalho wrote: > But to be sure I will test the same thing as you are testing, you are > reading the text via NSTextView.string ? By the way, not sure if this makes a difference, but the original text was added via NSTextView.string It is not

Re: NSTextView read real text content (without 0xA added by wordwrap)

2016-09-27 Thread Felipe Monteiro de Carvalho
On Tue, Sep 27, 2016 at 11:07 AM, Graham Cox wrote: > Are you sure about that? I’ve never seen the text view add line endings to > the underlying raw text - that’s just not how text layout works. > (Indeed I just made a quick test case and I don’t see that happening). What I am writing is a larg

Re: NSTextView read real text content (without 0xA added by wordwrap)

2016-09-27 Thread Graham Cox
> On 27 Sep 2016, at 5:31 PM, Felipe Monteiro de Carvalho > wrote: > > But the resulting string contains line endings which are added in the > places where the word-wrap takes places, and I need the raw text, > without such added line endings. Are you sure about that? I’ve never seen the text

Re: Stupid objective-c question

2016-09-27 Thread Alastair Houghton
On 27 Sep 2016, at 05:31, Britt Durbrow wrote: > > FWIW, it’s currently an implementation detail that SELs do map into the > global address space in a way that doesn’t collide with anything else; but > technically, they are in their own address space and the system could map > them otherwise

Re: Stupid objective-c question

2016-09-27 Thread Alastair Houghton
On 27 Sep 2016, at 02:17, Slipp Douglas Thompson wrote: > > I'm just going to throw this out there as a solution, not because I recommend > this approach (it's API misuse after all) but because it would work. > > Instead of using an `NSString *` you could use a `SEL` (AKA `struct > objc_selec

NSTextView read real text content (without 0xA added by wordwrap)

2016-09-27 Thread Felipe Monteiro de Carvalho
Hello, I have a normal NSTextView and I would like to programatically read the text inside it. This is trivial, just call txt.string or txt.textContainer.string But the resulting string contains line endings which are added in the places where the word-wrap takes places, and I need the raw text,

Re: SecStaticCodeCheckValidity fails when app is lauched from Terminal

2016-09-27 Thread じょいすじょん
Have you also tried NSWorkspace for this? > On 2016 Sep 27, at 2:38, Markus Spoettl wrote: > > It is an OSX Cocoa GUI application. I have always started it from the command > line by executing the executable inside the bundle. While this always worked, > it no longer seems to. > > That said,