Re: GUI not responding possibly because of NSRunLoop, what can I do?
Re: GUI not responding possibly because of NSRunLoop, what can I do?
- Subject: Re: GUI not responding possibly because of NSRunLoop, what can I do?
- From: "A.M." <email@hidden>
- Date: Sun, 5 Aug 2007 21:51:15 -0400
On Aug 5, 2007, at 19:02 , Devraj Mukherjee wrote:
Hi everyone,
I am writing a Cocoa based app that uses NetSocket from Blackhole
media to read and write from a socket and based on the socket events I
'd like to popup various GUI components.
My GUI components work, no issues there, but since I am running an
[[NSRunLoop currentLoop] run] it listens and responds to socket events
and the GUI is inactive (I can t click the buttons etc on it)
I am guessing the problem is the NSRunLoop part.
Any suggestions on where I should look to get a socket / GUI
application running properly?
I encountered the same problem using NetSocket. Not only will you see
the spinning beachball while processing data, but because NSRunLoop
doesn't round-robin the mach port handling, user input gets handled
after all NetSocket processing has ceased.
The unfortunate solution is to use your own thread to process socket
communications, in which case, the main benefit of NetSocket is lost
anyway.
Cheers,
M
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden