Re: Launching another app with command line arguments

2020-06-20 Thread Marco S Hyman via Cocoa-dev
> On Jun 20, 2020, at 4:31 PM, Gabriel Zachmann wrote: > >> >> If app B can be treated as a sub-process of app A you can use Process. I >> know that argument passing works with Process. > > Sounds good. How can A launch B as its sub-process? (and pass command line > arguments?) > > le

Re: Launching another app with command line arguments

2020-06-20 Thread Gabriel Zachmann via Cocoa-dev
> > Write stuff to location in file the other app knows about, then read it. > Interesting. Will that work with all the sandboxing? Can A create a file /tmp/info-for-B without any user intervention? Can B read it *and* delete it? smime.p7s Description: S/MIME cryptographic signature ___

Re: Launching another app with command line arguments

2020-06-20 Thread Gabriel Zachmann via Cocoa-dev
> > If app B can be treated as a sub-process of app A you can use Process. I > know that argument passing works with Process. Sounds good. How can A launch B as its sub-process? (and pass command line arguments?) smime.p7s Description: S/MIME cryptographic signature _

Re: Launching another app with command line arguments

2020-06-20 Thread Marco S Hyman via Cocoa-dev
> On Jun 20, 2020, at 4:16 PM, Gabriel Zachmann wrote: > > So, the new question is: is there any easy way how my app A can launch my app > B > and pass a simple piece of info from A to B, such as a boolean flag or an > integer? If app B can be treated as a sub-process of app A you can use P

Re: Launching another app with command line arguments

2020-06-20 Thread A. Reichstadt via Cocoa-dev
Write stuff to location in file the other app knows about, then read it. Sent from my iPhone > On Jun 20, 2020, at 16:17, Gabriel Zachmann via Cocoa-dev > wrote: > > Thanks a lot for your reponse. > > Yes , it is sandboxed. > > ... Argh, the *last* line of the docs of configuration.argument

Re: Launching another app with command line arguments

2020-06-20 Thread Gabriel Zachmann via Cocoa-dev
Thanks a lot for your reponse. Yes , it is sandboxed. ... Argh, the *last* line of the docs of configuration.arguments tell that those are ignored! :-( So, the new question is: is there any easy way how my app A can launch my app B and pass a simple piece of info from A to B, such as a boolean

Re: Launching another app with command line arguments

2020-06-20 Thread Marco S Hyman via Cocoa-dev
> > That works fine, *except* the command line arguments are not passed along :-( Is your app sandboxed? Arguments are ignored in sandboxed applications. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or mo

Launching another app with command line arguments

2020-06-20 Thread Gabriel Zachmann via Cocoa-dev
I would like to launch app B (developed by me) from app A (also developed by me). In app A, I do let configuration = NSWorkspace.OpenConfiguration() configuration.activates = true configuration.arguments = ["-f"] NSWorkspace.shared.openApplication( at: url_for_app

Re: Status bar item icon is always black

2020-06-20 Thread Gabriel Zachmann via Cocoa-dev
> Why do you put the images in an asset catalog? I use PDFs a lot for icons, in my case, the "icon" is really a bitmap in the first place. (It is an image of a painting - I know, this is not the traditional look of icons.) > (in my case mostly as Template images). But I just drag them into a gr

Re: Status bar item icon is always black

2020-06-20 Thread Georg Seifert via Cocoa-dev
Why do you put the images in an asset catalog? I use PDFs a lot for icons, (in my case mostly as Template images). But I just drag them into a groups in Xcode and they are copied into the Resource folder. Then you can load them with -[NSBundle imageForResource:]. If you have @2x version, they ar