(main): Add port to run loop using new scheme.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1190 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Andrew McCallum 1996-03-18 19:41:17 +00:00
parent 894952afe3
commit f622747b24
2 changed files with 5 additions and 3 deletions

View file

@ -36,7 +36,8 @@ int main (int argc, char *argv[])
initWithObjectFunction: handle_incoming_packet]
autorelease]];
[in_port addToRunLoop: [RunLoop currentInstance] forMode: nil];
[[RunLoop currentInstance] addPort: in_port
forMode: RunLoopDefaultMode];
for (i = 0; i < 10; i++)
{

View file

@ -76,8 +76,9 @@ int main (int argc, char *argv[])
[[[ObjectFunctionInvocation alloc]
initWithObjectFunction: handle_incoming_packet]
autorelease]];
[port addToRunLoop: [RunLoop currentInstance] forMode: nil];
[[RunLoop currentInstance] run];
[[RunLoop currentInstance] addPort: port
forMode: RunLoopDefaultMode];
[RunLoop run];
#else
{
id packet;