[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Redirecting standard output to a file
From: |
Michael Hopkins |
Subject: |
Redirecting standard output to a file |
Date: |
Sun, 29 Jun 2008 12:15:48 +0100 |
User-agent: |
Unison/1.8.1 |
Hi all
I have a question about using the classes in base to redirect standard
output to a file without too much hassle or re-writing of code. I have
classes that print themselves to standard output like this:
[ someObject show ];
..but would like to be able to redirect this behaviour within code and
possibly in response to user input. Something like...
[ outputFile appendedWith:[ someObject show ]];
I suspect that NSPipe and/or NSFileHandle might be involved but welcome
any tips.
TIA
Michael
--
______________________________________________
Hopkins Research Touch the Future
______________________________________________
- Redirecting standard output to a file,
Michael Hopkins <=