run WPS from inside a cocoa application
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.
How do I execute this command from the C program
Is there a way to read the test.lst file into a text window in application builder?
It 开发者_如何学Cwould be fantatic if you could help me :-)
Regards, T
(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.
精彩评论