Re: How to make a blue (active) progressbar within a hotloop?
Re: How to make a blue (active) progressbar within a hotloop?
- Subject: Re: How to make a blue (active) progressbar within a hotloop?
- From: "Michael Ash" <email@hidden>
- Date: Thu, 8 Jun 2006 14:26:39 -0400
On 6/8/06, Theodore H. Smith <email@hidden> wrote:
Hi list,
I have some code which has a hot loop in it.
I want to open up a window, during the hot loop, display a progress
bar during the loop, and then close the window.
My current attempt works, but the window seems to not get an activate
event, or something like that, because all the controls are disabled
as if it's not the key window. I am actually calling
[w makeKeyAndOrderFront:0];
on it!
Any idea how to do this progress bar during a hotloop?
I'm thinking of just starting from scratch, not even trying to fix my
progress code as I have no idea what is wrong with it (it's only
small anyhow), and doing it a different way.
Put your window on-screen and make it modal by using NSApp's
beginModalSessionForWindow: method. Then whenever you 'idle', which
would probably be when you update your progress bar, use
runModalSession: to let events get processed and windows get updated.
As a bonus, not only will things update properly but you will no
longer get the Spinning Pizza of Death while the window is up, and
it's easy to implement things like a Cancel button if you should so
desire.
Mike
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden