Opening dual NSStreams synchronously

2010-02-02 Thread Richard Penwell
Hello Devs, I'd like some feedback on my design here as I'm building an API that I hope will be of use to the community, and some of the finer nuances of Cocoa still escape me. I'm building a class called TDSConnection which is part of a object graph providing connectivity to the Tabular Data

Re: Opening dual NSStreams synchronously

2010-02-02 Thread Richard Penwell
In case anyone wants the solution to this puzzle ;-) while (([inputStream streamStatus] [outputStream streamStatus]) == NSStreamStatusOpening [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantFuture]]); That line will pump the asynchronous events and test

Re: Opening dual NSStreams synchronously

2010-02-02 Thread Jens Alfke
On Feb 2, 2010, at 10:56 AM, Richard Penwell wrote: while (([inputStream streamStatus] [outputStream streamStatus]) == NSStreamStatusOpening [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantFuture]]); There are a couple of problems here... (1) That

Re: Opening dual NSStreams synchronously

2010-02-02 Thread Richard Penwell
Very true on the overall method, I'd prefer to make the whole thing asynchronous, but thus far cannot figure out how to wrangle SenTestKit into handling test methods that pass when a delegate method is called... On Feb 2, 2010, at 2:18 PM, Jens Alfke wrote: On Feb 2, 2010, at 10:56 AM,

Re: Opening dual NSStreams synchronously

2010-02-02 Thread Jens Alfke
On Feb 2, 2010, at 11:27 AM, Richard Penwell wrote: Very true on the overall method, I'd prefer to make the whole thing asynchronous, but thus far cannot figure out how to wrangle SenTestKit into handling test methods that pass when a delegate method is called... I've done this in the