PDA

View Full Version : Get output of NSTask as NSString possible?




GeeYouEye
Jan 22, 2004, 12:50 AM
I'm trying to write a frontend for md5, which is later going to be integrated into another program. I know how to initialize and launch the NSTask, but what I can't seem to find a way to get what would be the output of the task (in this case, the result of the hashing function) into an NSString, which I would then pass back to an NSTextField via -setStringValue: (the -launch method of NSTask is a void). While I could create a temporary file and then make a new NSTask to rm it, that seems like a waste, and I don't know how to get the file contents anyway. Anyone know how to do this?



GeeYouEye
Jan 22, 2004, 08:24 PM
Anyone?