Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Objective-C Unix Wrappers

Objective-C Unix Wrappers
Thread Tools
Senior User
Join Date: Oct 2000
Location: Lawrence, KS
Status: Offline
Reply With Quote
May 24, 2001, 09:38 PM
 
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
Reply With Quote
May 25, 2001, 12:53 AM
 
     
Junior Member
Join Date: May 2001
Location: Walnut Creek, CA
Status: Offline
Reply With Quote
May 25, 2001, 02:10 AM
 
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
Reply With Quote
May 25, 2001, 05:08 AM
 
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
Reply With Quote
May 26, 2001, 03:08 AM
 
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
     
DaGuy  (op)
Senior User
Join Date: Oct 2000
Location: Lawrence, KS
Status: Offline
Reply With Quote
May 26, 2001, 04:43 PM
 
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
Reply With Quote
May 26, 2001, 08:27 PM
 
Hi, Any tutorials to do the same thing as described in the original message, but in JAVA? Thanks!
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 03:14 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2