Re: Data not written immediately to nstextview
Re: Data not written immediately to nstextview
- Subject: Re: Data not written immediately to nstextview
- From: j o a r <email@hidden>
- Date: Thu, 18 Jan 2007 08:56:27 +0100
On Jan 18, 2007, at 8:14 AM, MANISH CHATURVEDI wrote:
But the data is not written (or shown) immediately in the
NSTextView, it is shown only after completion of the method that
contains this code segment. As the method performs a bulk of task,
NSTextView shows data after a significant delay.
This works per design, and is a significant advantage to the way
Cocoa triggers drawing updates (compared to, for example .NET). Views
that needs to be re-drawn are flagged as such (see "-[NSView
setNeedsDisplay:]") and redrawn at the end of the current event loop.
It's very unlikely that you would want to change this behaviour. If
you do, it is quite probable that you have an implementation where
you're blocking the main thread for too long, which would be really
bad for the user experience, and the over all performance of your
application.
That said, in the unlikely event that you do need to force a display
update, you can use the "-[NSView display]" method.
is there any problem in my code, or any property NSTextView not set
properly.
No, se above.
is there any threading concept.
Probably not, but that you even ask that question is cause for
concern...
I hope you're not updating your text view from a non-main thread?
j o a r
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden