bug-gnustep
[Top][All Lists]
Advanced

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

GsTcpPort (NSDefaultRunLoopMode / _handleWindowNeedsDispaly:)


From: David Ayers
Subject: GsTcpPort (NSDefaultRunLoopMode / _handleWindowNeedsDispaly:)
Date: Fri, 05 Jul 2002 10:09:32 +0200

Finally (I think I got it)! I was on the wrong (or rather a different) track 
the whole time. But this should solve the flashing. Carefull, I haven't had the 
opertunity to test it, and won't until Saturday. But if I'm wrong, some one 
(Richard ?) might be able to tell my why before hand.


GsTcpPort.m

- (BOOL) connectToPort: (GSTcpPort*)aPort beforeDate: (NSDate*)when
{
...
  state = GS_H_TRYCON;
  l = [NSRunLoop currentRunLoop];
  [l addEvent: (void*)(gsaddr)desc
         type: ET_WDESC
      watcher: self
!     forMode: NSDefaultRunLoopMode];
  [l addEvent: (void*)(gsaddr)desc
         type: ET_EDESC
      watcher: self
!     forMode: NSDefaultRunLoopMode];
  while (state == GS_H_TRYCON && [when timeIntervalSinceNow] > 0)
    {
!     [l runMode: NSDefaultRunLoopMode beforeDate: when];
    }
  [l removeEvent: (void*)(gsaddr)desc
            type: ET_WDESC
!        forMode: NSDefaultRunLoopMode
             all: NO];
  [l removeEvent: (void*)(gsaddr)desc
            type: ET_EDESC
!        forMode: NSDefaultRunLoopMode
             all: NO];
...
}

I believe Occurences of NSDefaultRunLoopMode above should be replaced with 
NSConnectionReplyMode!

Cheers,
Dave

PS: I'll give you feedback as soon as I was able to actually test it.


reply via email to

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