NSPipe
NSPipe
- Subject: NSPipe
- From: Daniel Todd Currie <email@hidden>
- Date: Thu, 10 Jun 2004 15:47:15 -0700
I am using the CLI calculator "bc" to evaluate some simple user-input
mathematical expressions from an NSTextField via an NSTask. The
problem is that a parse error note gets printed to the console when the
user types something that doesn't parse, like:
3*(
Since I am sending the bc task every time the control text is updated,
there will naturally be some parse errors as the user types in their
expression; I can't use a formatter in this case to limit user input.
I don't really want to accumulate lists of parse errors in the console
log, so what I have done is the following:
calculatorTask = [[NSTask alloc] init];
[calculatorTask setStandardError:[NSPipe pipe]];
This sends the parse error notes to some undefined pipe, which is fine
for me, but what is it actually doing? Since the pipe I have created
there is autoreleased, does that mean that the parse error note will
just be released as well? Will these error notes accumulate somewhere
else? I'm new to NSTasks/NSPipes, so please forgive my undoubtedly
simple question. TIAA,
-- Daniel Todd Currie
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.