discuss-gnustep
[Top][All Lists]
Advanced

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

Re: NSTextField


From: Stefan Böhringer
Subject: Re: NSTextField
Date: 28 Jun 2002 13:08:39 +0200

I see your problem now. The question is what triggers the
setNeedsDisplay:YES call which in turn causes the flickering. Is it the
drawing of the selection? Perhaps a delayedPerform: could help to
postpone the redrawing. Then again I do not know about the point in time
when delayedPerform: methods are executed.
Another question is what is flickering after all. If it is the whole
window this indicates that redrawing is too extensive and should perhaps
be optimized in the first place.

Best wishes,

        Stefan

On Fri, 2002-06-28 at 12:22, David Ayers wrote:
> Hi Stefan,
> 
> --------------------------------------------------------------------------
> 2002 Jun 28 - 09:06
> Stefan Böhringer <stefan.boehringer@ruhr-uni-bochum.de> 
> --------------------------------------------------------------------------
> >It might be prudent if you do extensive view manipulation which may
> >potentially span several iterations of the runloop to remove a superview
> >from the views being manipulated from the view hierarchy. Then you do
> >your manipulation and readd the removed view afterwards.
> >
> 
> Well in this case it is a call to becomeFirstResponder (makeFirstResponder:) 
> and then a mouseDown: which are invoked through in sendEvent of NSWindow upon 
> a mouse click in the anNSTextField. This hardly seems like an extensive view 
> manipulation :) It does span a runloop though because of a message to the 
> pasteboard server which takes the selection during 
> -becomeFirstResponder(selectText:) which I am proposing which is causing the 
> flash. So if you ever use NSRunLoops 
> performSelector:target:argmument:order:modes: realize that any subsequent 
> call to a anNSTextFields selectText: or any other method which might invoke a 
> DO method, will cause a runloop iteration executing your scheduled 
> invocation, before your current event is processed!
> 




reply via email to

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