Re: More on NSTask and output to NSTextView
Re: More on NSTask and output to NSTextView
- Subject: Re: More on NSTask and output to NSTextView
- From: Koen van der Drift <email@hidden>
- Date: Sat, 12 Jun 2004 12:58:47 -0400
Hi,
Still struggling a little bit with getting this to work. I use an
NSThread to retrieve and display the data from the task:
[NSThread detachNewThreadSelector:@selector(getData:) toTarget:self
withObject:nil];
where the getData method retrieves the data and displays it. This works
fine, but I noticed that sometimes not all output is displayed. So I
created a small test project that runs the command "ls -la -R /Library"
and displays the output. I added the possiblilty to use a thread to
display the data by using the flag USE_THREAD. If that flag is on,
than (on my system) the output is very short. However, if I set the
flag to 0, the textview shows all data, but I am unable to cancel the
task.
I would appreciate it if someone could have a look at the code and see
if they can reproduce this, and even better, spot the error I made. You
can find it at
http://home.earthlink.net/~kvddrift/software/threadTest.tar.gz
many thanks,
- Koen.
_______________________________________________
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.