discuss-gnustep
[Top][All Lists]
Advanced

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

NSTextField


From: David . Ayers
Subject: NSTextField
Date: Thu, 27 Jun 2002 17:04:27 +0200

Hello All,

Back to NSTextField's selectText: the DO call to the PasteBoardServer,
_handleWindowNeedsDisplay: and NSRunLoops's
performSelector:target:argument:order:modes:

I've spent a couple more days pondering which way to go. In NSApplication's run
method, it poll's the events using it's
nextEventMatchingMask:untilDate:inMode:deque method and then redisplays it's
windows through it's updateWindows method. Therefore the
_handleWindowNeedsDisplay: which is setup through a
performSelector:target:argument:order:modes: in NSViews setNeedsDisplayInRect:
(or rather in NSWindow's setViewsNeedsDisplay:) is more of a failsafe method of
displaying the views if the runloop is rerun during the sendEvent:  invocation.

Now this might very well be necessary, but maybe it would be better instead to
call displayIfNeeded only when its absolutly necessary. Considering the
sepration of "View Manipulation" and "Display", this "Display" should be avoided
upon rerun of the runloop, if we are still in "View Manipulation". Yet the rerun
could be invoked at an arbitrary time like the DO message to the pbs-Server
does, causing the displayIfNeeded to be invoked.

On the otherhand maybe using an lock/unlock mechanism per window for displaying
might be the better solution. (A flag (or counter for reentrancy) to be set
(incremeted) and cleared (decremented) during a "view manipulation transaction"
And allow displayIfNeeded only to do its thing if this flag is clear (the
counter is 0)).

I shortly considered configuring the connection to the PBS-Server to run in
NSConnectionReplayMode but this would only postpone the problem to a user
configured connection. (maybe even causing reentrancy problems for the
PBS-Server)

I'm still not sure but maybe some one will give thier 2 cents to it.

Dave

PS: Thanks for your cheerleading, Nicola :). I had just had the false impression
that I hadn't clarified the problem clearly earlier.




reply via email to

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