Using "printf" in a carbon application

Using "printf" in a carbon application

Post by Lothar Sch » Sat, 02 Apr 2005 03:07:42


Hey,

i want to try Carbon programming.
I created a simple app but i can't find a way to

a) start the application in folder "Foo.app" from the terminal. I must click the finder otherwise the event handling does not work.

b) i need printf statements because i use a eiffel compiler (which is simply a huge preprocessor that outputs a makefile and c code)
and i can't integrate this process into XCode and i feel comfortable with Emacs.

c) how can i kill the running app from the command line.
 
 
 

Using "printf" in a carbon application

Post by Paul Russe » Sat, 02 Apr 2005 03:22:03


% open Foo.app


You might be able to do something kludgy like #define printf such that
printf gets mapped to syslog.


% ps -aux | grep MyAppName

% sudo kill -9 <MyAppName's process ID>

Paul

 
 
 

Using "printf" in a carbon application

Post by Lothar Sch » Sat, 02 Apr 2005 03:39:41


Okay, i was trying to do it with -a which obviously failed


Thanks just found that i don't need this. each printf is written to the syslog. I you must have the console window open.
(Note: save money to buy the 30" display).


Okay so i must write a small batch script to do this with a single "k <Enter>" combination.
 
 
 

Using "printf" in a carbon application

Post by Eric Alber » Sat, 02 Apr 2005 11:35:10

In article <424c3fd0$0$5470$ XXXX@XXXXX.COM >,





killall MyAppName

-Eric

--
Eric Albert XXXX@XXXXX.COM
http://www.yqcomputer.com/
 
 
 

Using "printf" in a carbon application

Post by Paul Russe » Sat, 02 Apr 2005 20:50:19


Thanks - I hadn't seen that one before.

Paul