ontent-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
Hi,
You might also want to look at the cocoa dev tutorial:
http://cocoadevcentral.com/articles/000025.php - Wrapping UNIX
Commands
This is interesting but I'm not really looking to wrap a unix command
so the others seem more likely.
And these pages:
http://www.cocoadev.com/index.pl?NSPipe - NSPipe
http://www.cocoadev.com/index.pl?NSTask - NSTask
I was looking in to this area too - it's still on my todo list - if
you get anywhere please let me know I'll be interested on how to do
this myself.
This seems to work to pipe data into the program...
int main (int argc, const char * argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
NSFileHandle *fh = [[NSFileHandle alloc] init];
fh = [NSFileHandle fileHandleWithStandardInput];
NSData *inData = [[NSData alloc] init];
inData = [fh readDataToEndOfFile];
NSString *myString = [[NSString alloc] initWithData: inData
encoding: NSUTF8StringEncoding];
[inData release];
NSLog(@"[EMAIL PROTECTED]", myString);
[pool release];
return 0;
}
but now how to I add the ability to use my program on the shebang
line? Is this not considered standard in?
___
#!/path/to/myProgram
and have the input data here?
___
_______________________________________________
Discuss-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnustep