<?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: Deleting items in a List from an item renderer</title>
	<atom:link href="http://flexponential.com/2009/09/23/deleting-items-in-a-list-from-an-item-renderer/feed/" rel="self" type="application/rss+xml" />
	<link>http://flexponential.com/2009/09/23/deleting-items-in-a-list-from-an-item-renderer/</link>
	<description>Programming under the influence of Flex</description>
	<lastBuildDate>Thu, 17 May 2012 06:37:41 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
	<item>
		<title>By: Steven Shongrunden</title>
		<link>http://flexponential.com/2009/09/23/deleting-items-in-a-list-from-an-item-renderer/comment-page-1/#comment-12489</link>
		<dc:creator>Steven Shongrunden</dc:creator>
		<pubDate>Tue, 13 Mar 2012 18:13:12 +0000</pubDate>
		<guid isPermaLink="false">http://flexponential.com/?p=123#comment-12489</guid>
		<description>&lt;a href=&quot;#comment-12481&quot; rel=&quot;nofollow&quot;&gt;@jpeal&lt;/a&gt; - I believe the renderer above should work fine whether it is inline or not.  This is because the deleteItem() logic is in the renderer itself.  If you want to move this logic out of the renderer you might want to use the parentDocument property.  Or a more robust approach would be to have the renderer dispatch a custom event on its parent List and then setup a listener for that event.</description>
		<content:encoded><![CDATA[<p><a href="#comment-12481" rel="nofollow">@jpeal</a> &#8211; I believe the renderer above should work fine whether it is inline or not.  This is because the deleteItem() logic is in the renderer itself.  If you want to move this logic out of the renderer you might want to use the parentDocument property.  Or a more robust approach would be to have the renderer dispatch a custom event on its parent List and then setup a listener for that event.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jpeal</title>
		<link>http://flexponential.com/2009/09/23/deleting-items-in-a-list-from-an-item-renderer/comment-page-1/#comment-12481</link>
		<dc:creator>jpeal</dc:creator>
		<pubDate>Tue, 13 Mar 2012 13:16:56 +0000</pubDate>
		<guid isPermaLink="false">http://flexponential.com/?p=123#comment-12481</guid>
		<description>This is exactly what I want to accomplish, except that my itemrenderer is not an inline one.  How would you access and execute the deleteItem() function if it was not an inline itemrenderer?</description>
		<content:encoded><![CDATA[<p>This is exactly what I want to accomplish, except that my itemrenderer is not an inline one.  How would you access and execute the deleteItem() function if it was not an inline itemrenderer?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Lorenzo</title>
		<link>http://flexponential.com/2009/09/23/deleting-items-in-a-list-from-an-item-renderer/comment-page-1/#comment-11396</link>
		<dc:creator>Daniel Lorenzo</dc:creator>
		<pubDate>Sat, 04 Feb 2012 22:11:12 +0000</pubDate>
		<guid isPermaLink="false">http://flexponential.com/?p=123#comment-11396</guid>
		<description>&lt;a href=&quot;#comment-2543&quot; rel=&quot;nofollow&quot;&gt;@mzx &lt;/a&gt; 
You can use the &quot;is&quot; operator to verify the baseclass:

if (this.owner is DataGroup) { ...

if (this.owner is List) { ...

Maybe there is an interface for typecasting, or I think in that you can safely typecast the dataprovider like this:

var dp:IList = Object(this.owner).dataProvider as IList;</description>
		<content:encoded><![CDATA[<p><a href="#comment-2543" rel="nofollow">@mzx </a><br />
You can use the &#8220;is&#8221; operator to verify the baseclass:</p>
<p>if (this.owner is DataGroup) { &#8230;</p>
<p>if (this.owner is List) { &#8230;</p>
<p>Maybe there is an interface for typecasting, or I think in that you can safely typecast the dataprovider like this:</p>
<p>var dp:IList = Object(this.owner).dataProvider as IList;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Lorenzo</title>
		<link>http://flexponential.com/2009/09/23/deleting-items-in-a-list-from-an-item-renderer/comment-page-1/#comment-11395</link>
		<dc:creator>Daniel Lorenzo</dc:creator>
		<pubDate>Sat, 04 Feb 2012 22:02:06 +0000</pubDate>
		<guid isPermaLink="false">http://flexponential.com/?p=123#comment-11395</guid>
		<description>Here&#039;s a way to do it with a DataGroup, in the same context as the example above:

public function deleteItem():void {
    DataGroup( this.parent ).dataProvider.removeItemAt( this.itemIndex );
}</description>
		<content:encoded><![CDATA[<p>Here&#8217;s a way to do it with a DataGroup, in the same context as the example above:</p>
<p>public function deleteItem():void {<br />
    DataGroup( this.parent ).dataProvider.removeItemAt( this.itemIndex );<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Luciana Cuarelli</title>
		<link>http://flexponential.com/2009/09/23/deleting-items-in-a-list-from-an-item-renderer/comment-page-1/#comment-9866</link>
		<dc:creator>Luciana Cuarelli</dc:creator>
		<pubDate>Tue, 27 Dec 2011 10:31:39 +0000</pubDate>
		<guid isPermaLink="false">http://flexponential.com/?p=123#comment-9866</guid>
		<description>It&#039;s exactly what I was googling for :D
Thank you xD</description>
		<content:encoded><![CDATA[<p>It&#8217;s exactly what I was googling for <img src='http://flexponential.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /><br />
Thank you xD</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steven Shongrunden</title>
		<link>http://flexponential.com/2009/09/23/deleting-items-in-a-list-from-an-item-renderer/comment-page-1/#comment-2553</link>
		<dc:creator>Steven Shongrunden</dc:creator>
		<pubDate>Wed, 29 Dec 2010 19:22:54 +0000</pubDate>
		<guid isPermaLink="false">http://flexponential.com/?p=123#comment-2553</guid>
		<description>&lt;a href=&quot;#comment-2543&quot; rel=&quot;nofollow&quot;&gt;@mzx&lt;/a&gt; - Yes, this is officially documented in the DOM spec here: http://opensource.adobe.com/wiki/display/flexsdk/Gumbo+DOM+Tree+API

This blog post might also be interesting as it demonstrates the difference between parent and owner:
http://flexponential.com/2009/12/08/differences-between-ivisualelement-parent-and-ivisualelement-owner/</description>
		<content:encoded><![CDATA[<p><a href="#comment-2543" rel="nofollow">@mzx</a> &#8211; Yes, this is officially documented in the DOM spec here: <a href="http://opensource.adobe.com/wiki/display/flexsdk/Gumbo+DOM+Tree+API" rel="nofollow">http://opensource.adobe.com/wiki/display/flexsdk/Gumbo+DOM+Tree+API</a></p>
<p>This blog post might also be interesting as it demonstrates the difference between parent and owner:<br />
<a href="http://flexponential.com/2009/12/08/differences-between-ivisualelement-parent-and-ivisualelement-owner/" rel="nofollow">http://flexponential.com/2009/12/08/differences-between-ivisualelement-parent-and-ivisualelement-owner/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mzx</title>
		<link>http://flexponential.com/2009/09/23/deleting-items-in-a-list-from-an-item-renderer/comment-page-1/#comment-2543</link>
		<dc:creator>mzx</dc:creator>
		<pubDate>Wed, 29 Dec 2010 09:42:46 +0000</pubDate>
		<guid isPermaLink="false">http://flexponential.com/?p=123#comment-2543</guid>
		<description>nice, but is it anywhere documented that itemRenderer&#039;s owner is ( and still in later sdk&#039;s ) List control itself?</description>
		<content:encoded><![CDATA[<p>nice, but is it anywhere documented that itemRenderer&#8217;s owner is ( and still in later sdk&#8217;s ) List control itself?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: felix</title>
		<link>http://flexponential.com/2009/09/23/deleting-items-in-a-list-from-an-item-renderer/comment-page-1/#comment-1210</link>
		<dc:creator>felix</dc:creator>
		<pubDate>Wed, 02 Jun 2010 01:51:06 +0000</pubDate>
		<guid isPermaLink="false">http://flexponential.com/?p=123#comment-1210</guid>
		<description>yay! thanx for the tips!</description>
		<content:encoded><![CDATA[<p>yay! thanx for the tips!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

