Re: macOS 10.13 suggestion for init() throws

2017-02-28 Thread Jens Alfke
> On Feb 28, 2017, at 11:56 AM, Daryle Walker wrote: > > The problem here is an interface mismatch where Swift has function > throw-ability status out-of-band from that function’s parameter list, while > Objective-C doesn’t. Only at the syntax level. Under the hood it works

Re: macOS 10.13 suggestion for init() throws

2017-02-28 Thread Greg Parker
> On Feb 28, 2017, at 4:56 AM, Daryle Walker wrote: > > Could we have a NSDocument.init() that throws in the next macOS? That would > translate to a "initWithError" in Objective C (I think). It would be the new > primary initializer, with the current one calling it and

Re: Replacement of deprecated API GetProcessInformation

2017-02-28 Thread dangerwillrobinsondanger
You shouldn't. I'm surprised anybody is trying to work with code this decrepit in 2017. Sent from my iPhone > On Mar 1, 2017, at 6:07, Steve Mills wrote: > > On Feb 28, 2017, at 03:04 PM, dangerwillrobinsondan...@gmail.com wrote: > > IIRC that was a Classic Mac OS thing

Re: Replacement of deprecated API GetProcessInformation

2017-02-28 Thread Steve Mills
On Feb 28, 2017, at 03:04 PM, dangerwillrobinsondan...@gmail.com wrote: IIRC that was a Classic Mac OS thing that ended more than a decade ago. Yes, but current versions of Apple apps still have it set. I just wouldn't write new code that depends on it. Sent from iCloud's ridiculous UI, so,

Re: Replacement of deprecated API GetProcessInformation

2017-02-28 Thread dangerwillrobinsondanger
IIRC that was a Classic Mac OS thing that ended more than a decade ago. Sent from my iPhone > On Mar 1, 2017, at 4:59, Daryle Walker wrote: > > >> On Feb 28, 2017, at 2:35 PM, Steve Mills wrote: >> >> The process signature is an old way of identifying

Re: Replacement of deprecated API GetProcessInformation

2017-02-28 Thread Daryle Walker
> On Feb 28, 2017, at 2:35 PM, Steve Mills wrote: > > The process signature is an old way of identifying applications and > processes. The modern equivalent would be the bundle identifier. From an > NSRunningApplication you can get its bundleIdentifier. If you need more info,

Re: macOS 10.13 suggestion for init() throws

2017-02-28 Thread Daryle Walker
> On Feb 28, 2017, at 12:27 PM, Jens Alfke wrote: > > >> On Feb 28, 2017, at 4:56 AM, Daryle Walker > > wrote: >> >> Could we have a NSDocument.init() that throws in the next macOS? That would >> translate to a "initWithError" in

Re: Replacement of deprecated API GetProcessInformation

2017-02-28 Thread Steve Mills
On Feb 28, 2017, at 01:08 PM, sumit bansal wrote: Hello All, I need to get process information (specifically: processSignature and processType). As API GetProcessInformation has been deprecated. So I was trying to get the information from NSRunningApplication,

Re: Need replacement of Component Manager::OpenDefaultComponent

2017-02-28 Thread sumit bansal
Hey Shane, It's working with following as suggested by you. ComponentInstance compInstance = [[OSALanguageInstance languageInstanceWithLanguage:[OSALanguage languageForName:@"AppleScript"]] componentInstance] Thanks alot for helping. On 28 February 2017 at 05:25, Shane Stanley

Replacement of deprecated API GetProcessInformation

2017-02-28 Thread sumit bansal
Hello All, I need to get process information (specifically: processSignature and processType). As API GetProcessInformation has been deprecated. So I was trying to get the information from NSRunningApplication, but not able to find the exact property/method for upper mentioned info. Can anyone

Re: macOS 10.13 suggestion for init() throws

2017-02-28 Thread Jens Alfke
> On Feb 28, 2017, at 4:56 AM, Daryle Walker wrote: > > Could we have a NSDocument.init() that throws in the next macOS? That would > translate to a "initWithError" in Objective C (I think). It would be the new > primary initializer, with the current one calling it and

macOS 10.13 suggestion for init() throws

2017-02-28 Thread Daryle Walker
Could we have a NSDocument.init() that throws in the next macOS? That would translate to a "initWithError" in Objective C (I think). It would be the new primary initializer, with the current one calling it and dropping any error to oblivion. This doesn't make any difference to Objective-C