discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Multi Thread applications with GNUstep


From: Richard Frith-Macdonald
Subject: Re: Multi Thread applications with GNUstep
Date: Wed, 1 Aug 2001 17:16:06 +0100

On Wednesday, August 1, 2001, at 04:27 PM, Pierre-Yves Rivaille wrote:

I'm developing a multithreaded application with GNUstep (i hope to
release an alpha version soon), and I'm facing a few problems.

There are two threasd: the main thread (with the AppKit runloop) and one
worker thread. I want to display the progress of the work being done by
the worker thread.

The problem I face is that whenever the AppKit thread is in a
NSEventTrackingRunLoopMode tracking loop (typically when you press
the mouse button on a NSButton, NSSlider, NSMenu), I can not
display the updates. (I've tried to do this using DO)

It looks like the proper way to do this is just to use
-setNeedsDisplay: in the working thread (at least, that is what I read in
MOSX doc:
http://developer.apple.com/techpubs/macosx/ReleaseNotes/ThreadSupport.html)
.
But GNUstep does not seems to be supporting this.

Do I miss something or should I try to implement this behaviour in
GNUstep ?

The problem is most likely that the control you have clicked on has grabbed things and *doesn't want* anything else messing with the display because it
is drawing directly (for efficiency) rather than using the auto-update
mechanism.  So I'm not sure that you should be able to update the display
elsewhere. It should be quite easy to modify the event code to ensure that the auto-update is done (so -setNeedsDisplay: would work), but I think careful reading of the documentation and consideration should be applied before doing it.




reply via email to

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