I have a window sending data via NSStream to another app. Whenever I invoke another modal window, the data stops. Somehow NSStream is block by NSRunModalForWindow. The code is pretty standard, a snippet of the code,
[NSStream getStreamsToHost:host port:portNumber inputStream:&iStream outputStream:&oStream]; [iStream retain]; [oStream retain]; [iStream setDelegate:(id)self]; [oStream setDelegate:(id)self]; [iStream scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode]; [oStream scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode]; [iStream open]; [oStream open]; I am thinking of moving the whole NSStream code from NSWindowController to a thread but somehow I got a feeling is not correct. How does NSStream avoid blocking by other factors such as modal window ? _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com