<?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: Cocoa Tutorial: File Copy With Progress Indicator</title>
	<atom:link href="http://www.cimgf.com/2008/05/03/cocoa-tutorial-file-copy-with-progress-indicator/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cimgf.com/2008/05/03/cocoa-tutorial-file-copy-with-progress-indicator/</link>
	<description>Taglines are for Windows programmers</description>
	<lastBuildDate>Mon, 05 Dec 2011 10:55:51 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: sqllyw</title>
		<link>http://www.cimgf.com/2008/05/03/cocoa-tutorial-file-copy-with-progress-indicator/comment-page-1/#comment-646</link>
		<dc:creator>sqllyw</dc:creator>
		<pubDate>Thu, 12 Jun 2008 15:38:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.cimgf.com/?p=116#comment-646</guid>
		<description>&lt;p&gt;I tried this with tiger, it works with following minor change:&lt;/p&gt;

&lt;p&gt;double val;
CFNumberGetValue(bytesCompleted, kCFNumberDoubleType, &amp;val);
if (progressIndicator) {
    [progressIndicator setDoubleValue:val];
    [progressIndicator displayIfNeeded];
}&lt;/p&gt;

&lt;p&gt;if you copy one big file, this works very well, but if you copy a batch of files, the display seems confusing as multiple files are being copied in the same time, how to schedule the copying in such a way that only one file is being copied at one time?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I tried this with tiger, it works with following minor change:</p>

<p>double val;
CFNumberGetValue(bytesCompleted, kCFNumberDoubleType, &amp;val);
if (progressIndicator) {
    [progressIndicator setDoubleValue:val];
    [progressIndicator displayIfNeeded];
}</p>

<p>if you copy one big file, this works very well, but if you copy a batch of files, the display seems confusing as multiple files are being copied in the same time, how to schedule the copying in such a way that only one file is being copied at one time?</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Long Pointers &#187; That Sucking Sound Is Java Killing Your Soul</title>
		<link>http://www.cimgf.com/2008/05/03/cocoa-tutorial-file-copy-with-progress-indicator/comment-page-1/#comment-596</link>
		<dc:creator>Long Pointers &#187; That Sucking Sound Is Java Killing Your Soul</dc:creator>
		<pubDate>Fri, 16 May 2008 12:25:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.cimgf.com/?p=116#comment-596</guid>
		<description>&lt;p&gt;[...] Cocoa Tutorial: File Copy With Progress Indicator [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] Cocoa Tutorial: File Copy With Progress Indicator [...]</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Devon</title>
		<link>http://www.cimgf.com/2008/05/03/cocoa-tutorial-file-copy-with-progress-indicator/comment-page-1/#comment-591</link>
		<dc:creator>Devon</dc:creator>
		<pubDate>Sun, 04 May 2008 15:12:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.cimgf.com/?p=116#comment-591</guid>
		<description>&lt;p&gt;Sorry for the stupid trackback thing, I&#039;ve disabled it from my site.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Sorry for the stupid trackback thing, I&#8217;ve disabled it from my site.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: jediknil</title>
		<link>http://www.cimgf.com/2008/05/03/cocoa-tutorial-file-copy-with-progress-indicator/comment-page-1/#comment-590</link>
		<dc:creator>jediknil</dc:creator>
		<pubDate>Sun, 04 May 2008 03:19:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.cimgf.com/?p=116#comment-590</guid>
		<description>&lt;p&gt;Second what hennk said. What if, for some crazy reason, you wanted to have TWO progress indicators? &lt;em&gt;gasp&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Seriously, though, globals are generally bad, but what seems really awkward here is the limitation of one progress indicator, period. Especially since there&#039;s a context parameter (a standard Cocoa/Carbon callback pattern) that you could be using.&lt;/p&gt;

&lt;p&gt;Separately, it might not be a bad idea to use FSPathCopyObjectAsync() instead of FSCopyObjectAsync(), since in Cocoa usually you have paths rather than FSRefs, and creating an FSRef requires going through -fileSystemRepresentation anyway. (Probably it would be the same code executed underneath, but it&#039;s less to think about.)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Second what hennk said. What if, for some crazy reason, you wanted to have TWO progress indicators? <em>gasp</em></p>

<p>Seriously, though, globals are generally bad, but what seems really awkward here is the limitation of one progress indicator, period. Especially since there&#8217;s a context parameter (a standard Cocoa/Carbon callback pattern) that you could be using.</p>

<p>Separately, it might not be a bad idea to use FSPathCopyObjectAsync() instead of FSCopyObjectAsync(), since in Cocoa usually you have paths rather than FSRefs, and creating an FSRef requires going through -fileSystemRepresentation anyway. (Probably it would be the same code executed underneath, but it&#8217;s less to think about.)</p>]]></content:encoded>
	</item>
	<item>
		<title>By: CiarÃ¡n Walsh</title>
		<link>http://www.cimgf.com/2008/05/03/cocoa-tutorial-file-copy-with-progress-indicator/comment-page-1/#comment-589</link>
		<dc:creator>CiarÃ¡n Walsh</dc:creator>
		<pubDate>Sat, 03 May 2008 21:19:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.cimgf.com/?p=116#comment-589</guid>
		<description>&lt;p&gt;You could also make the AppDelegate a singleton, and add an accessor method for the progress indicator. E.g. [[AppDelegate sharedInstance] progressIndicator]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>You could also make the AppDelegate a singleton, and add an accessor method for the progress indicator. E.g. [[AppDelegate sharedInstance] progressIndicator]</p>]]></content:encoded>
	</item>
	<item>
		<title>By: hennk</title>
		<link>http://www.cimgf.com/2008/05/03/cocoa-tutorial-file-copy-with-progress-indicator/comment-page-1/#comment-588</link>
		<dc:creator>hennk</dc:creator>
		<pubDate>Sat, 03 May 2008 17:45:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.cimgf.com/?p=116#comment-588</guid>
		<description>&lt;p&gt;Instead of accessing the progress indicator via a static pointer, you can just use the void *info field of the FSFileOperationClientContext struct, and passing either the AppDelegate or the progress indicator itself.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Instead of accessing the progress indicator via a static pointer, you can just use the void *info field of the FSFileOperationClientContext struct, and passing either the AppDelegate or the progress indicator itself.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Asynchronous callbacks for copying large files &#124; Devon&#8217;s Cocoa Blog</title>
		<link>http://www.cimgf.com/2008/05/03/cocoa-tutorial-file-copy-with-progress-indicator/comment-page-1/#comment-587</link>
		<dc:creator>Asynchronous callbacks for copying large files &#124; Devon&#8217;s Cocoa Blog</dc:creator>
		<pubDate>Sat, 03 May 2008 11:35:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.cimgf.com/?p=116#comment-587</guid>
		<description>&lt;p&gt;[...] Not really Cocoa APIs but useful none the less. http://www.cimgf.com/2008/05/03/cocoa-tutorial-file-copy-with-progress-indicator/ [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] Not really Cocoa APIs but useful none the less. <a href="http://www.cimgf.com/2008/05/03/cocoa-tutorial-file-copy-with-progress-indicator/" rel="nofollow">http://www.cimgf.com/2008/05/03/cocoa-tutorial-file-copy-with-progress-indicator/</a> [...]</p>]]></content:encoded>
	</item>
</channel>
</rss>

