Re: NSProgressIndicator acting wonky
Re: NSProgressIndicator acting wonky
- Subject: Re: NSProgressIndicator acting wonky
- From: j o a r <email@hidden>
- Date: Sun, 6 Oct 2002 23:55:10 +0200
On Sunday, Oct 6, 2002, at 23:01 Europe/Stockholm, Gerben Wierda wrote:
I tried a 10 sec sleep between start and stop animation
How did you do that, you just put a sleep() in there? That probably
wouldn't do any good. Sometimes the runloop needs to run to an end but
if that were the case here, and I'm not saying that I think it is,
you'd need to delay, not sleep. Look at the performSelector: methods in
NSObject or NSRunLoop.h.
Before you proceed with that I would suggest you try to reproduce this
problem in a new sample project with just this code and nothing else -
it makes troubleshooting so much easier.
and noticed that windowDidLoad is called when the window has not been
ordered out yet! So, I needed to add
[[self window] makeKeyAndOrderFront:nil];
before the start/stop animation.
I'm confused, the window was _not_ ordered out? Then why did you need
to order it to front?
I think you're not using the Cocoa terminology correctly. "Order out"
is hiding the window and "order front" is showing it on screen. Read on
->
Should the fact that windowDidLoad is called before the window is
actually loaded be considered a cocoa bug?
The windowDidLoad method is called when the window is loaded from the
nib file. This is not related to it being on screen or not. So, no -
it's not a bug. If you want it to be put on screen as soon as it's
loaded from the nib file there's a checkbox for that in IB - or - you
can do like you did now and place it on screen manually. Don't forget
that NSWindowController has a "showWindow:" method for that particular
purpose.
j o a r
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.