discuss-gnustep
[Top][All Lists]
Advanced

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

Re: a question using NSFileHandle


From: ]d
Subject: Re: a question using NSFileHandle
Date: Mon, 18 Feb 2002 08:51:06 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20020112

]d wrote:


[[NSNotificationCenter defaultCenter] addObserver:myObject selector:@selector(printHello) name:NSFileHandleDataAvailableNotification object:nil]; [fh waitForDataInBackgroundAndNotify];

- (void) printHello:(id)not {
       XEvent event;
       id fh = [not object];
       printf("in %d\n", [fh fileDescriptor]);
       while (XCheckMaskEvent(display, -1, &event)) {
                       printf("hello\n");
       }
       printf("out\n");
       [fh waitForDataInBackgroundAndNotify];
}

I blindly fix it to work resulted in the above code,
but still wonder if it is the right thing to do or not.
Thank you for every further suggestions in advance.




reply via email to

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