比较不同的'启动Cocoa应用程序与参数'方法 [英] Comparing different 'the launching Cocoa app with parameters' methods

查看:227
本文介绍了比较不同的'启动Cocoa应用程序与参数'方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现至少有三种方法可以从应用程式启动使用Mac OS X的应用程式。

I found there are at least three ways to launch an app with Mac OS X from an application.


  1. NSTask 。我可以给参数,但它似乎不是一个Cocoa应用程序,而是一个UNIX风格的二进制。

  2. 系统函数(system())就像C一样。我不知道为什么,但似乎没有人推荐这种方法。

  3. NSWorkspace ,但我找不到一个方法传递参数到这个函数。

  1. NSTask. I can give parameters, but it seems that it's not for an Cocoa App, but an UNIX style binary.
  2. system function (system()) just the same way as C does. I don't know the reason why but it seems that nobody recommends this method.
  3. NSWorkspace, but I can't find a way to pass parameters to this function.



问题



查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆