开发者

Invoking external shell application through RubyCocoa

开发者 https://www.devze.com 2022-12-25 18:12 出处:网络
How would I invoke an external application through the RubyCocoa bridge? I read something about NSTask, yet I have no idea how this should be translated in RubyCocoa. My goal is to have an IB开发者_开

How would I invoke an external application through the RubyCocoa bridge? I read something about NSTask, yet I have no idea how this should be translated in RubyCocoa. My goal is to have an IB开发者_开发百科_action to trigger a method which will run a terminal application with some parameters, i.e. ls -p $mydir, where mydir comes from an IB_outlet such as an Textfield. Any directions or help would be greatly appreciated!


Usually it is invoked using ` quotes and #{} structure for variable

`ls -p #{mydir}`
0

精彩评论

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