 |
 |
Objective-C Unix Wrappers
|
 |
|
 |
|
Senior User
Join Date: Oct 2000
Location: Lawrence, KS
Status:
Offline
|
|
Where can I find an example that illustrates wrapping simple Unix commands with Cocoa. Here's an idea: an app with one window and one button. Press the button and another window opens and displays the results of "ls -la".
Is this a simple thing? Any similar examples would be helpful, I am not looking for the above specifically. I just need an example on how to write wrappers.
Thanks.
|
|
iMac 17" G4 800MHZ & 768 SDRAM
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Apr 2001
Location: San Francisco, USA
Status:
Offline
|
|
|
|
|
|
| |
|
|
|
 |
|
 |
|
Junior Member
Join Date: May 2001
Location: Walnut Creek, CA
Status:
Offline
|
|
This may help too. I got it off of the Mac OS X Dev mailing list.
Originally posted by Ryan:
For some things using NSTask/NSPipe can be a little over-kill. I found popen* and system* useful for basic needs.
* see their man pages ;-)
------------------
-Whisper
|
|
-Whisper
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Nov 2000
Location: Glasgow
Status:
Offline
|
|
Smallsockets (http://smallsockets.sourceforge.net) is another instructive example.
Fraser
|
|
PowerBook G4 17"
Power Mac G4/800, 1Gb RAM, 80Gb HDD, Superdrive, GeForce 4MX, Gateway 21" CRT, Apple Pro Speakers, iSub - Running Mac OS X Server 10.2
iBook 500, 192MbRAM - Running Mac OS X 10.2
iPod 5Gb
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status:
Offline
|
|
Originally posted by speirsfr:
Smallsockets (http://smallsockets.sourceforge.net) is another instructive example.
Of how to wrap BSD API into Obj-C, but not of how to wrap commandline tools into Cocoa apps 
|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Oct 2000
Location: Lawrence, KS
Status:
Offline
|
|
Thanks everyone, for the good info. The cocoadevcentral.com standsout, it is a really good site.
|
|
iMac 17" G4 800MHZ & 768 SDRAM
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Mar 2001
Status:
Offline
|
|
Hi, Any tutorials to do the same thing as described in the original message, but in JAVA? Thanks!
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|