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 > I/O in cocoa?

I/O in cocoa?
Thread Tools
iNeusch
Mac Elite
Join Date: Dec 2001
Location: Paris, France
Status: Offline
Reply With Quote
Mar 27, 2002, 02:57 AM
 
I'm trying to access a tab delimited text in cocoa.
Made the program in C++, works fine, but I'd like to put it in my Cocoa App since I need to call this functions and encode objects in the right format (it's an import function).
Where can I find the open, get, getline, read, write commands in cocoa?

Any ideas ?
Thanks !!
     
Chuckit
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Mar 27, 2002, 04:35 AM
 
Wouldn't it be easiest just to use Obj-C++ and keep the functions you've already got?
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
barney ntd
Dedicated MacNNer
Join Date: Dec 2001
Location: Bolton, UK
Status: Offline
Reply With Quote
Mar 27, 2002, 09:46 AM
 
You can either use cocoa's own functions (see the developer help) or just include stdio.h and use the standard C functions within your methods. Works fine.

Barney.
     
iNeusch  (op)
Mac Elite
Join Date: Dec 2001
Location: Paris, France
Status: Offline
Reply With Quote
Mar 27, 2002, 01:53 PM
 
Originally posted by barney ntd:
<STRONG>You can either use cocoa's own functions (see the developer help) or just include stdio.h and use the standard C functions within your methods. Works fine.

Barney.</STRONG>
Thx!
     
iNeusch  (op)
Mac Elite
Join Date: Dec 2001
Location: Paris, France
Status: Offline
Reply With Quote
Mar 27, 2002, 02:12 PM
 
Then how do you do a simple modal dialog to ask for a file ?

Damn the Apple documentation is bad !
     
iNeusch  (op)
Mac Elite
Join Date: Dec 2001
Location: Paris, France
Status: Offline
Reply With Quote
Mar 28, 2002, 01:20 PM
 
Originally posted by barney ntd:
<STRONG>You can either use cocoa's own functions (see the developer help) or just include stdio.h and use the standard C functions within your methods. Works fine.

Barney.</STRONG>
Including stdio.h and adding a .mm to my files doesn't work...
Strange...

I can't find the IO functions in cocoa... can anyone help ?
     
Porfiry
Junior Member
Join Date: Mar 2001
Status: Offline
Reply With Quote
Mar 28, 2002, 05:20 PM
 
Modal (Open) dialog: NSOpenPanel
http://developer.apple.com/techpubs/...OpenPanel.html

File I/O: NSFileManager and NSFileHandle:
http://developer.apple.com/techpubs/...ileHandle.html
     
iNeusch  (op)
Mac Elite
Join Date: Dec 2001
Location: Paris, France
Status: Offline
Reply With Quote
Mar 28, 2002, 05:21 PM
 
     
   
 
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
Top
Privacy Policy
All times are GMT -4. The time now is 11:21 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,