views:

25

answers:

1

Hi

I'm trying to learn to develop in cocoa and objective C. I would like to run a run WPS from inside a cocoa application. This command works from a terminal: wps test.sas The command creates a test.log and a test.lst.

  1. How do I execute this command from the C program

  2. Is there a way to read the test.lst file into a text window in application builder?

It would be fantatic if you could help me :-)

Regards, T

+3  A: 

(1) To run the command, use NSTask.

(2) To read the file, use NSString's + stringWithContentsOfFile:encoding:error: method

(3) To put the contents of the file into an NSTextView in your user interface, use NSTextView's setString: method.

If little to none of the above makes sense, you need to start here.

bbum