discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSNotification and NSRunLoop


From: Yen-Ju Chen
Subject: Re: NSNotification and NSRunLoop
Date: Wed, 29 Oct 2003 13:13:01 -0500




From: "Chris B. Vetter" <chrisv@web4inc.com>
To: discuss-gnustep@gnu.org
Subject: Re: NSNotification and NSRunLoop
Date: Wed, 29 Oct 2003 09:54:46 -0800

On Wed, 29 Oct 2003 06:18:51 +0000
Richard Frith-Macdonald <richard@brainstorm.co.uk> wrote:
> Yes ... events  only arrive while a run loop is running ... so you
> need to run the runloop within your while loop.
[...]

I was playing with sockets the other day and ran into a similar problem,
Yen-Ju was having (with respect to NSRunLoop and NSNotification).

Basically I did the same as you suggested (put NSRunLoop inside a loop)
and never received any notifications, until the while() finished. When I
put the while() in a separate method, added it to a timer and fired that
one off, it worked... Weird.


 I put the NSRunLoop in the while() and it works.
 I did try fire the while() using NSTimer, but it won't work.
 My situation is a little bit complicated.
 Application A will use NSTask to launch Tool B (containing while loop).
 Application A need to send NSNotification to Tool B.
 There is no NSRunLoop in B (as least I didn't use any).
 I guess that's the reason the NSTimer doesn't really work.

 Yen-Ju

--
Chris



_______________________________________________
Discuss-gnustep mailing list
Discuss-gnustep@gnu.org
http://mail.gnu.org/mailman/listinfo/discuss-gnustep

_________________________________________________________________
Enjoy MSN 8 patented spam control and more with MSN 8 Dial-up Internet Service. Try it FREE for one month! http://join.msn.com/?page=dept/dialup





reply via email to

[Prev in Thread] Current Thread [Next in Thread]