Hi all, In the course of normal work, I put together a really simple plotting application. The problem: I’m at a command-line, and I have some numbers, and I want to see them on a simple plot to quickly identify patterns. My first solution: A simple Cocoa app that reads the numbers on stdin, and displays them right on the window. It’s simple, and it works. At a bash shell, the usage is roughly: `<obtain_and_print_numbers> | /Applications/Plot.app/Contents/MacOS/Plot &`. Yes, it’s crude, but it works.
Now, partially for fun and practice, and partially because this architecture is stopping me from making some more interesting modifications, I want to separate the input of the numbers from the main Plot app. Ideally, I’d like to see a completely separate command-line tool that, when used, performs a series of steps: 1. If the main Plot app is _not_ running in the current Aqua session, then launch a new copy in the current Aqua session. 2. Open some sort of a socket to the main Plot app in the current Aqua session. 3. Accept numbers on stdin, and forward them through the socket to the main Plot app. 4. When stdin is exhausted, exit. This architecture would, I believe, pave the way for some really neat improvements in the future. So then, here comes the question. #1 and #2 above strike me as something that Launch Services and/or launchd might be capable of, but I’m having trouble identifying a set of APIs that would perform this task. I’ve found lots of documentation on having one master app delegate services to a helper that’s launched on-demand, but nothing yet on having _two main apps_ — one of them command-line and one of them Cocoa — where one can launch and subsequently communicate with the other, and then die. And, for what it’s worth, I am interested in being App Store compliant. I don’t know if this will make it there, but being App Store compliant is also something I need to learn, so I figure I may as well shoot for it. Any ideas? Or, are there any other mailing lists that may be more closely related to this topic? Thanks, - Andrew Keller _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com