Re: Wrapping an Interactive Unix Executable (update)
Re: Wrapping an Interactive Unix Executable (update)
- Subject: Re: Wrapping an Interactive Unix Executable (update)
- From: Harilaos Skiadas <email@hidden>
- Date: Fri, 17 Dec 2004 14:40:06 -0800 (PST)
- Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
>- (IBAction)translate:(id)sender
>{
> [toTranslator writeData:[[searchField
stringValue]
>dataUsingEncoding:NSASCIIStringEncoding]];
It is kind of funny, but you see, the difference when
using a text field instead of the terminal is that
when you press return, then that return is not part of
the string in the text field, so it is never sent to
the pipe.
Same thing had happened to me. Use:
[[searchField stringValue]
stringByAppendingString:@"\n"]
instead.
> [searchField selectText:nil];
>
> return;
>}
Of course, you don't need the return.
I hope this works, good luck.
Haris
PS: You should definitely familiarize yourself with
the debugger. You won't be able to go far without it.
Even a couple of breakpoints can go a long way.
__________________________________
Do you Yahoo!?
Yahoo! Mail - 250MB free storage. Do more. Manage less.
http://info.mail.yahoo.com/mail_250
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden