<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: White Indeterminate Progress Indicator (AKA: White NSProgressIndicator)</title>
	<atom:link href="http://kdbdallas.com/2008/12/28/white-indeterminate-progress-indicator-aka-white-nsprogressindicator/feed/" rel="self" type="application/rss+xml" />
	<link>http://kdbdallas.com/2008/12/28/white-indeterminate-progress-indicator-aka-white-nsprogressindicator/</link>
	<description>Mac and iPhone Developer, Husband, Father, all in one</description>
	<lastBuildDate>Tue, 20 Apr 2010 03:50:04 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Johan Kool</title>
		<link>http://kdbdallas.com/2008/12/28/white-indeterminate-progress-indicator-aka-white-nsprogressindicator/comment-page-1/#comment-102</link>
		<dc:creator>Johan Kool</dc:creator>
		<pubDate>Thu, 08 Oct 2009 22:40:50 +0000</pubDate>
		<guid isPermaLink="false">http://kdbdallas.com/?p=151#comment-102</guid>
		<description>Thanks, useful code. Here is a small patch to get it to work too when setSpinning: is called from another thread.

- (void)setSpinning:(BOOL)value
{
	if (spinning != value) {
		spinning = value;

		if (value)
		{
			if (theTimer == nil)
			{
				theTimer = [[NSTimer timerWithTimeInterval:animationDelay target:self selector:@selector(animate:) userInfo:NULL repeats:YES] retain];
                // Add the timer to the main loop, because it&#039;s possible this indicator will get started from another thread
                [[NSRunLoop mainRunLoop] addTimer:theTimer forMode:NSDefaultRunLoopMode];
			}
			else
			{
				[theTimer fire];
			}
		}
		else
		{
			[theTimer invalidate];
            // Cleanup
            [theTimer release];
            theTimer = nil;
		}
	}
}</description>
		<content:encoded><![CDATA[<p>Thanks, useful code. Here is a small patch to get it to work too when setSpinning: is called from another thread.</p>
<p>- (void)setSpinning:(BOOL)value<br />
{<br />
	if (spinning != value) {<br />
		spinning = value;</p>
<p>		if (value)<br />
		{<br />
			if (theTimer == nil)<br />
			{<br />
				theTimer = [[NSTimer timerWithTimeInterval:animationDelay target:self selector:@selector(animate:) userInfo:NULL repeats:YES] retain];<br />
                // Add the timer to the main loop, because it&#8217;s possible this indicator will get started from another thread<br />
                [[NSRunLoop mainRunLoop] addTimer:theTimer forMode:NSDefaultRunLoopMode];<br />
			}<br />
			else<br />
			{<br />
				[theTimer fire];<br />
			}<br />
		}<br />
		else<br />
		{<br />
			[theTimer invalidate];<br />
            // Cleanup<br />
            [theTimer release];<br />
            theTimer = nil;<br />
		}<br />
	}<br />
}</p>
]]></content:encoded>
	</item>
</channel>
</rss>
