Re: Ho do I flush an NSView immediately?
- From: matt@xxxxxxxxxxx (matt neuburg)
- Date: Wed, 15 Mar 2006 22:53:12 GMT
Eric Albert <ejalbert@xxxxxxxxxxxxxxx> wrote:
In article <1hc75qs.xb9d3w3yro2kN%matt@xxxxxxxxxxx>,
matt@xxxxxxxxxxx (matt neuburg) wrote:
Michael Ash <mike@xxxxxxxxxxx> wrote:
Steve Edwards <gfx@xxxxxxxxxxx> wrote:
Hi,
Is there a way of flushing all drawing in an NSView to be displayed
immediately, regardless of the event loop?
Another person has already answered the direct question, but I want to
jump in and say that you shouldn't be doing this in the first place. The
only reason you'd need this is if you have a long-running method that
blocks your runloop. You should not have such a method. You should return
control to your runloop frequently, either by using timers, threads, or a
modal session. Failing to do so will result in the Spinning Pizza of
Death, which users frequently take as a sign of a crash, and other bad
consquences.
I don't completely agree. For example, I have a CoreData application
that takes time to load the data on startup. I am not in control of this
(it's all being done by Apple's code behind the scenes), and the
Spinning Pizza shows. When I complained about this to Apple, they said,
"The Spinning Pizza is simply the modern equivalent of the old hourglass
cursor; it just means the program is busy. Users are wrong to associate
this with the program having frozen up."
Whoever told you that was wrong. Please file a bug report and send me
the bug number.
There is apparently no bug to file. However, I was wrong, it wasn't an
Apple person. But as this thread points out, Apple does show the SPOD
during long startup times of its own apps, even when there is a splash
screen.
<http://www.cocoabuilder.com/archive/message/cocoa/2006/1/23/155066>
m.
--
matt neuburg, phd = matt@xxxxxxxxxxx, http://www.tidbits.com/matt/
Tiger - http://www.takecontrolbooks.com/tiger-customizing.html
AppleScript - http://www.amazon.com/gp/product/0596102119
Read TidBITS! It's free and smart. http://www.tidbits.com
.
- Follow-Ups:
- Re: Ho do I flush an NSView immediately?
- From: Eric Albert
- Re: Ho do I flush an NSView immediately?
- References:
- Ho do I flush an NSView immediately?
- From: Steve Edwards
- Re: Ho do I flush an NSView immediately?
- From: Michael Ash
- Re: Ho do I flush an NSView immediately?
- From: matt neuburg
- Re: Ho do I flush an NSView immediately?
- From: Eric Albert
- Ho do I flush an NSView immediately?
- Prev by Date: Re: Beginner developer questions
- Next by Date: Re: Ho do I flush an NSView immediately?
- Previous by thread: Re: Ho do I flush an NSView immediately?
- Next by thread: Re: Ho do I flush an NSView immediately?
- Index(es):
Relevant Pages
|
Loading