<?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: JLNDragEffectManager</title>
	<atom:link href="http://joshua.nozzi.name/source/jlndrageffectmanager/feed/" rel="self" type="application/rss+xml" />
	<link>http://joshua.nozzi.name</link>
	<description>Developer · UX Designer · Author</description>
	<lastBuildDate>Mon, 26 Dec 2011 23:52:09 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: jnozzi</title>
		<link>http://joshua.nozzi.name/source/jlndrageffectmanager/#comment-5</link>
		<dc:creator>jnozzi</dc:creator>
		<pubDate>Thu, 17 Jun 2010 13:55:04 +0000</pubDate>
		<guid isPermaLink="false">http://stage.nozzi.name/#comment-5</guid>
		<description>I&#039;m glad you found it useful.

Although the slide-back issue is mentioned in both the blog post and the comments of the demo app (in DragQueenDemoView.m), you&#039;re absolutely right that, in the case of NSTableView or NSOutlineView, you&#039;d need to subclass and override -dragImage:at:offset:event:pasteboard:source:slideBack: to achieve the same affect. This is more or less &lt;a href=&quot;/2009/11/drag-effect-in-action/&quot; rel=&quot;nofollow&quot;&gt;what I did in XTabulator 2&lt;/a&gt; and it works beautifully.

Thanks for writing. :-)</description>
		<content:encoded><![CDATA[<p>I&#8217;m glad you found it useful.</p>
<p>Although the slide-back issue is mentioned in both the blog post and the comments of the demo app (in DragQueenDemoView.m), you&#8217;re absolutely right that, in the case of NSTableView or NSOutlineView, you&#8217;d need to subclass and override -dragImage:at:offset:event:pasteboard:source:slideBack: to achieve the same affect. This is more or less <a href="/2009/11/drag-effect-in-action/" rel="nofollow">what I did in XTabulator 2</a> and it works beautifully.</p>
<p>Thanks for writing. <img src='http://joshua.nozzi.name/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Frederik</title>
		<link>http://joshua.nozzi.name/source/jlndrageffectmanager/#comment-3</link>
		<dc:creator>Frederik</dc:creator>
		<pubDate>Thu, 17 Jun 2010 05:50:03 +0000</pubDate>
		<guid isPermaLink="false">http://stage.nozzi.name/#comment-3</guid>
		<description>Fantastic class, thank you very much!

One note about using it with NSTableView/NSOutlineView: these classes never call mouseDragged:, so you will need to disable Cocoa’s &quot;slideBack&quot; feature by adding the following code to the table view subclass. Otherwise Cocoa will slide back the invisible 1x1 drag image, and since -draggedImage:endedAt:operation: doesn’t get called until *after* the drag operation is finished, this normally adds a noticeable delay between releasing the mouse and JLNDragEffectManager’s own &quot;slide back&quot; animation.

&lt;code lang=&quot;objc&quot;&gt;
- (void)dragImage:(NSImage *)anImage at:(NSPoint)imageLoc offset:(NSSize)mouseOffset 
		event:(NSEvent *)theEvent pasteboard:(NSPasteboard *)pboard 
		source:(id)sourceObject slideBack:(BOOL)slideBack
{
	// prevent slide back if using JLNDragEffectManager, because the 
	//  slide back delays the call of the &quot;end&quot; method above
	[super dragImage:anImage at:imageLoc offset:mouseOffset event:theEvent 
					pasteboard:pboard source:sourceObject slideBack:NO];
}
&lt;/code&gt;
</description>
		<content:encoded><![CDATA[<p>Fantastic class, thank you very much!</p>
<p>One note about using it with NSTableView/NSOutlineView: these classes never call mouseDragged:, so you will need to disable Cocoa’s &#8220;slideBack&#8221; feature by adding the following code to the table view subclass. Otherwise Cocoa will slide back the invisible 1&#215;1 drag image, and since -draggedImage:endedAt:operation: doesn’t get called until *after* the drag operation is finished, this normally adds a noticeable delay between releasing the mouse and JLNDragEffectManager’s own &#8220;slide back&#8221; animation.</p>
<div class="codecolorer-container objc mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>dragImage<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSImage_Class/"><span style="color: #400080;">NSImage</span></a> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>anImage at<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">NSPoint</span><span style="color: #002200;">&#41;</span>imageLoc offset<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>NSSize<span style="color: #002200;">&#41;</span>mouseOffset <br />
&nbsp; &nbsp; &nbsp; &nbsp; event<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSEvent_Class/"><span style="color: #400080;">NSEvent</span></a> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>theEvent pasteboard<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSPasteboard_Class/"><span style="color: #400080;">NSPasteboard</span></a> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>pboard <br />
&nbsp; &nbsp; &nbsp; &nbsp; source<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">id</span><span style="color: #002200;">&#41;</span>sourceObject slideBack<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">BOOL</span><span style="color: #002200;">&#41;</span>slideBack<br />
<span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #11740a; font-style: italic;">// prevent slide back if using JLNDragEffectManager, because the </span><br />
&nbsp; &nbsp; <span style="color: #11740a; font-style: italic;">// &nbsp;slide back delays the call of the &quot;end&quot; method above</span><br />
&nbsp; &nbsp; <span style="color: #002200;">&#91;</span>super dragImage<span style="color: #002200;">:</span>anImage at<span style="color: #002200;">:</span>imageLoc offset<span style="color: #002200;">:</span>mouseOffset event<span style="color: #002200;">:</span>theEvent <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pasteboard<span style="color: #002200;">:</span>pboard source<span style="color: #002200;">:</span>sourceObject slideBack<span style="color: #002200;">:</span><span style="color: #a61390;">NO</span><span style="color: #002200;">&#93;</span>;<br />
<span style="color: #002200;">&#125;</span></div></div>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Served from: joshua.nozzi.name @ 2012-01-15 03:22:26 by W3 Total Cache -->
