Re: Fun with NSRunLoop
Re: Fun with NSRunLoop
- Subject: Re: Fun with NSRunLoop
- From: j o a r <email@hidden>
- Date: Wed, 15 Aug 2001 23:29:04 +0200
On Wednesday, August 15, 2001, at 11:02 , Bill Bumgarner wrote:
In this case, you likely only have one "event handler" in that you have
an NSConnection that is running. To cause the run loop to stop,
simply invalidate the connection. When the last "thing listening for
stuff to happen" is invalidated/removed, the Run loop will stop.
One way to get to all NSConnections could be this:
NSArray *connectionsArray = [NSConnection allConnections];
NSEnumerator *connectionsArrayEnumerator = [connectionsArray
objectEnumerator];
NSConnection *thisConnection;
while (thisConnection = [connectionsArrayEnumerator nextObject]) {
if ([thisConnection isValid]) {
[thisConnection invalidate];
}
}
Regards,
j o a r