Re: NSProgressIndicator not animating when part of NSAnimation
Re: NSProgressIndicator not animating when part of NSAnimation
- Subject: Re: NSProgressIndicator not animating when part of NSAnimation
- From: Michael Vannorsdel <email@hidden>
- Date: Sun, 16 Aug 2009 21:42:58 -0600
I had this problem once when I had accidentally called
makeKeyAndOrderFront: on the window from a secondary thread. Animated
system controls and tracking rects would work.
On Aug 15, 2009, at 7:45 PM, Thomas Bauer wrote:
Thanks for your response.
I am not quite sure if I understand you correctly but here is what I
tried:
- Calling the whole code (starting the NSAnimation and the
ProgressIndicator animation) using a performSelectorOnMainThread
does not fix it.
- Calling the whole code using performSelector delayed does not fix
it.
- Calling the NSProgressIndicator startanimation alone on the main
thread does not fix it either.
However your response triggered an idea and this works:
[myViewNSAnimation startAnimation];
[myindicator performSelector:@selector(startAnimation:)
withObject:nil afterDelay:1.1];
Does the trick, but only if the delay is greater than the duration
of the NSAnimation.
In short, if I call the selector (even on the main thread) during
the NSAnimation is running, it does not work.
That would make some sense - but why the same thing works without
those tricks in awakefromnib does not make sense to me...
Because I would think that running it in awakefromnib and running it
using performSelectorOnMainThread should be somewhat identical?
While it is great that I have a workaround ... I would appreciate
any explaination on why it behaves that way.
Technically this does not make sense to me.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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