<?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/"
	xmlns:series="http://unfoldingneurons.com/"
		>
<channel>
	<title>Comments on: Blocking TabBar Click/Change Events</title>
	<atom:link href="http://aaronhardy.com/flex/blocking-tabbar-clickchange-events/feed/" rel="self" type="application/rss+xml" />
	<link>http://aaronhardy.com/flex/blocking-tabbar-clickchange-events/</link>
	<description>For all your Aaron Hardy needs.</description>
	<lastBuildDate>Thu, 17 May 2012 03:52:23 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: iron</title>
		<link>http://aaronhardy.com/flex/blocking-tabbar-clickchange-events/comment-page-1/#comment-8086</link>
		<dc:creator>iron</dc:creator>
		<pubDate>Mon, 11 Oct 2010 16:34:18 +0000</pubDate>
		<guid isPermaLink="false">http://aaronhardy.com/?p=168#comment-8086</guid>
		<description>txs for this post, very useful, works fine and saved me a lot of work.</description>
		<content:encoded><![CDATA[<p>txs for this post, very useful, works fine and saved me a lot of work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin</title>
		<link>http://aaronhardy.com/flex/blocking-tabbar-clickchange-events/comment-page-1/#comment-7174</link>
		<dc:creator>Kevin</dc:creator>
		<pubDate>Wed, 11 Aug 2010 18:59:22 +0000</pubDate>
		<guid isPermaLink="false">http://aaronhardy.com/?p=168#comment-7174</guid>
		<description>All this time.... I actually thought I had tried it without the parentheses but apparently I did not.  That did the trick.  condition={tabChange}

Your explanation was spot on.  It was calling the function and getting the result.

Thanks!</description>
		<content:encoded><![CDATA[<p>All this time&#8230;. I actually thought I had tried it without the parentheses but apparently I did not.  That did the trick.  condition={tabChange}</p>
<p>Your explanation was spot on.  It was calling the function and getting the result.</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron Hardy</title>
		<link>http://aaronhardy.com/flex/blocking-tabbar-clickchange-events/comment-page-1/#comment-7171</link>
		<dc:creator>Aaron Hardy</dc:creator>
		<pubDate>Wed, 11 Aug 2010 18:43:23 +0000</pubDate>
		<guid isPermaLink="false">http://aaronhardy.com/?p=168#comment-7171</guid>
		<description>Kevin, try replacing this:

condition=”tabChange()&quot;

with this:

condition=”{tabChange}&quot;

As you have it, it will be executing the function tabChange() and sending the return value (in your case, false) into the condition property.  What you want is the actual function reference to be set into the condition property so it can be executed at a later time.  Let me know how that works out for you.

In response to your other question, you could implement your condition logic inside the same BlockableTabBar class, but I wouldn&#039;t recommend it.  Having the condition logic outside lets you keep the BlockableTabBar class generic and usable in many different contexts.</description>
		<content:encoded><![CDATA[<p>Kevin, try replacing this:</p>
<p>condition=”tabChange()&#8221;</p>
<p>with this:</p>
<p>condition=”{tabChange}&#8221;</p>
<p>As you have it, it will be executing the function tabChange() and sending the return value (in your case, false) into the condition property.  What you want is the actual function reference to be set into the condition property so it can be executed at a later time.  Let me know how that works out for you.</p>
<p>In response to your other question, you could implement your condition logic inside the same BlockableTabBar class, but I wouldn&#8217;t recommend it.  Having the condition logic outside lets you keep the BlockableTabBar class generic and usable in many different contexts.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin</title>
		<link>http://aaronhardy.com/flex/blocking-tabbar-clickchange-events/comment-page-1/#comment-7170</link>
		<dc:creator>Kevin</dc:creator>
		<pubDate>Wed, 11 Aug 2010 18:37:32 +0000</pubDate>
		<guid isPermaLink="false">http://aaronhardy.com/?p=168#comment-7170</guid>
		<description>I am trying to use BlockableTabBar and I am having trouble with &quot;condition.&quot; In my file where I am implementing the control i set condition=&quot;tabChange()&quot; where tabChange returns boolean. When I run my code I get TypeError: Error #1034: Type Coercion failed: cannot convert false to Function. 

I have BlockableTabBar as a separate AS class. Am I supposed to implement my logic in the class? I am very new to Flex development and on my current project I am handling mostly the .NET middle tier. 

Thanks, 
Kevin</description>
		<content:encoded><![CDATA[<p>I am trying to use BlockableTabBar and I am having trouble with &#8220;condition.&#8221; In my file where I am implementing the control i set condition=&#8221;tabChange()&#8221; where tabChange returns boolean. When I run my code I get TypeError: Error #1034: Type Coercion failed: cannot convert false to Function. </p>
<p>I have BlockableTabBar as a separate AS class. Am I supposed to implement my logic in the class? I am very new to Flex development and on my current project I am handling mostly the .NET middle tier. </p>
<p>Thanks,<br />
Kevin</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Doug</title>
		<link>http://aaronhardy.com/flex/blocking-tabbar-clickchange-events/comment-page-1/#comment-5646</link>
		<dc:creator>Doug</dc:creator>
		<pubDate>Thu, 15 Apr 2010 17:29:25 +0000</pubDate>
		<guid isPermaLink="false">http://aaronhardy.com/?p=168#comment-5646</guid>
		<description>Thank you very much, Aaron.</description>
		<content:encoded><![CDATA[<p>Thank you very much, Aaron.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron Hardy</title>
		<link>http://aaronhardy.com/flex/blocking-tabbar-clickchange-events/comment-page-1/#comment-5645</link>
		<dc:creator>Aaron Hardy</dc:creator>
		<pubDate>Thu, 15 Apr 2010 14:47:47 +0000</pubDate>
		<guid isPermaLink="false">http://aaronhardy.com/?p=168#comment-5645</guid>
		<description>I know something, but your best bet is to post your question to FlexCoders: http://tech.groups.yahoo.com/group/flexcoders/</description>
		<content:encoded><![CDATA[<p>I know something, but your best bet is to post your question to FlexCoders: <a href="http://tech.groups.yahoo.com/group/flexcoders/" rel="nofollow">http://tech.groups.yahoo.com/group/flexcoders/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Doug</title>
		<link>http://aaronhardy.com/flex/blocking-tabbar-clickchange-events/comment-page-1/#comment-5643</link>
		<dc:creator>Doug</dc:creator>
		<pubDate>Thu, 15 Apr 2010 13:56:04 +0000</pubDate>
		<guid isPermaLink="false">http://aaronhardy.com/?p=168#comment-5643</guid>
		<description>Hey, Aaron I was, too, brief with my description of my problem; however, another Flex expert has already solved my rollOver problem. Thank you so much. Do you know anything about loading RSS feed containing images and text from a remote Website to a Flex 3 application, and the content update everyday?</description>
		<content:encoded><![CDATA[<p>Hey, Aaron I was, too, brief with my description of my problem; however, another Flex expert has already solved my rollOver problem. Thank you so much. Do you know anything about loading RSS feed containing images and text from a remote Website to a Flex 3 application, and the content update everyday?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron Hardy</title>
		<link>http://aaronhardy.com/flex/blocking-tabbar-clickchange-events/comment-page-1/#comment-5634</link>
		<dc:creator>Aaron Hardy</dc:creator>
		<pubDate>Thu, 15 Apr 2010 02:55:50 +0000</pubDate>
		<guid isPermaLink="false">http://aaronhardy.com/?p=168#comment-5634</guid>
		<description>@Doug
I just did a simple test and the mouseover and mouseout events seem to be working fine even before clicking a link on a linkbar.</description>
		<content:encoded><![CDATA[<p>@Doug<br />
I just did a simple test and the mouseover and mouseout events seem to be working fine even before clicking a link on a linkbar.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Doug</title>
		<link>http://aaronhardy.com/flex/blocking-tabbar-clickchange-events/comment-page-1/#comment-5630</link>
		<dc:creator>Doug</dc:creator>
		<pubDate>Wed, 14 Apr 2010 17:37:46 +0000</pubDate>
		<guid isPermaLink="false">http://aaronhardy.com/?p=168#comment-5630</guid>
		<description>Hello, Aaron

In Flex 3, my mouseOvers &amp; mouseOuts on my LinkBar will not operate until the LinkButtons on the LinkBar have been clicked. Is there a way to get my Overs and Outs to operate after my page loads? My LinkBar is using a dataProvider to display the LinkButtons. Thank You.</description>
		<content:encoded><![CDATA[<p>Hello, Aaron</p>
<p>In Flex 3, my mouseOvers &amp; mouseOuts on my LinkBar will not operate until the LinkButtons on the LinkBar have been clicked. Is there a way to get my Overs and Outs to operate after my page loads? My LinkBar is using a dataProvider to display the LinkButtons. Thank You.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron Hardy</title>
		<link>http://aaronhardy.com/flex/blocking-tabbar-clickchange-events/comment-page-1/#comment-4690</link>
		<dc:creator>Aaron Hardy</dc:creator>
		<pubDate>Sat, 06 Feb 2010 02:46:33 +0000</pubDate>
		<guid isPermaLink="false">http://aaronhardy.com/?p=168#comment-4690</guid>
		<description>@Craig

Your method of finding the destination index works.  You can simplify it a bit: var selectedIndex:uint= TabBar(event.currentTarget).getChildIndex(event.target as DisplayObject);

Also, I tried redispatching the event like you were attempting to do before.  It works fine but you need to dispatch the event off the object that dispatched it in the first place rather than the tabbar itself.  Just do this: myEvent.target.dispatchEvent(myEvent);

As far as the LinkBar goes, it&#039;s essentially the same concept but should actually be easier because I don&#039;t think it has any &quot;simulated click trigger&quot; event to deal with.  I&#039;d start by overriding LinkBar&#039;s clickHandler() function.  Then I&#039;d only call super.clickHandler() if the conditional function returned true, that is, it&#039;s okay to proceed with the navigation.

Hope that helps.</description>
		<content:encoded><![CDATA[<p>@Craig</p>
<p>Your method of finding the destination index works.  You can simplify it a bit: var selectedIndex:uint= TabBar(event.currentTarget).getChildIndex(event.target as DisplayObject);</p>
<p>Also, I tried redispatching the event like you were attempting to do before.  It works fine but you need to dispatch the event off the object that dispatched it in the first place rather than the tabbar itself.  Just do this: myEvent.target.dispatchEvent(myEvent);</p>
<p>As far as the LinkBar goes, it&#8217;s essentially the same concept but should actually be easier because I don&#8217;t think it has any &#8220;simulated click trigger&#8221; event to deal with.  I&#8217;d start by overriding LinkBar&#8217;s clickHandler() function.  Then I&#8217;d only call super.clickHandler() if the conditional function returned true, that is, it&#8217;s okay to proceed with the navigation.</p>
<p>Hope that helps.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

