开发者

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.

  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 开发者_如何学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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜