<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Shashank kulkarni's Weblog</title>
	<atom:link href="http://shashankkulkarni.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://shashankkulkarni.com</link>
	<description>Flex with Shashank</description>
	<lastBuildDate>Wed, 30 Nov 2011 12:02:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='shashankkulkarni.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Shashank kulkarni's Weblog</title>
		<link>http://shashankkulkarni.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://shashankkulkarni.com/osd.xml" title="Shashank kulkarni&#039;s Weblog" />
	<atom:link rel='hub' href='http://shashankkulkarni.com/?pushpress=hub'/>
		<item>
		<title>Unrecognized Windows Sockets error: 0: JVM_Bind Flex, the workaround</title>
		<link>http://shashankkulkarni.com/2010/08/21/unrecognized-windows-sockets-error-0-jvm_bind-flex-the-workaround/</link>
		<comments>http://shashankkulkarni.com/2010/08/21/unrecognized-windows-sockets-error-0-jvm_bind-flex-the-workaround/#comments</comments>
		<pubDate>Sat, 21 Aug 2010 15:24:56 +0000</pubDate>
		<dc:creator>shashankkulkarni</dc:creator>
				<category><![CDATA[Flex(Amazing Errors)]]></category>

		<guid isPermaLink="false">http://shashankkulkarni.wordpress.com/?p=271</guid>
		<description><![CDATA[Ohoooo , Its again the unsolved one, Sadly a page to Flex(Amazing Errors). Its been happening with Flex Builder on my  machine mostly when i tried to do the debug of my code and it simply  stops my working (i.e. it only disables my debugging functionality) , sometimes till i restart my machine. Error I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shashankkulkarni.com&amp;blog=3545189&amp;post=271&amp;subd=shashankkulkarni&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Ohoooo , Its again the unsolved one, Sadly a page to Flex(Amazing Errors).</p>
<p>Its been happening with Flex Builder on my  machine mostly when i tried to do the debug of my code and it simply  stops my working (i.e. it only disables my debugging functionality) , sometimes till i restart my machine.</p>
<p>Error I am getting: <strong>&#8221; Unrecognized Windows Sockets error: 0: JVM_Bind &#8220;</strong></p>
<p>My Environment Details is :</p>
<p>Windows 7</p>
<p>Flex Builder (Eclipse Plug-in ) ( Flex Builder 3)</p>
<p>JBoss server running inside the Flex Builder environment</p>
<p>Workarounds i tried most of the time are :</p>
<ul>
<li>Switching the Server mode to debug, sometimes help.</li>
<li>Closing all the Java instances apart from my Flex Builder sometimes helps.</li>
</ul>
<p>If both of above does not work , Solution is <strong>&#8220;Leave with the Pain of debugger functionality unavailability&#8221;</strong></p>
<p>But to me the query is that what the hell is happening with my Flex Builder?</p>
<p>Adobe forums are with no help about this topic, with the two query seems to be unresolved on the forums. I haven&#8217;t found any definite solution on it. If u have one please don&#8217;t forget to comment it, It will be great help</p>
<p><a href="http://forums.adobe.com/message/15429" target="_blank">http://forums.adobe.com/message/15429</a></p>
<p><a href="http://forums.adobe.com/thread/682171" target="_blank">http://forums.adobe.com/thread/682171</a></p>
<p>It certainly is not the happy coding way with the above scenario, I really feel Adobe needs to address this one.</p>
<p>Any links, comments or suggestions  are highly welcomed</p>
<p>Best Luck.</p>
<p><strong>Thanks and regards,</strong></p>
<p><strong>Shashank Kulkarni</strong></p>
<p>Feel free to comment on the post <img src="https://s-ssl.wordpress.com/wp-includes/images/smilies/icon_smile.gif" alt=":)" /></p>
<br />Filed under: <a href='http://shashankkulkarni.com/category/flexamazing-errors/'>Flex(Amazing Errors)</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shashankkulkarni.wordpress.com/271/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shashankkulkarni.wordpress.com/271/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shashankkulkarni.wordpress.com/271/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shashankkulkarni.wordpress.com/271/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/shashankkulkarni.wordpress.com/271/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/shashankkulkarni.wordpress.com/271/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/shashankkulkarni.wordpress.com/271/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/shashankkulkarni.wordpress.com/271/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shashankkulkarni.wordpress.com/271/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shashankkulkarni.wordpress.com/271/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shashankkulkarni.wordpress.com/271/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shashankkulkarni.wordpress.com/271/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shashankkulkarni.wordpress.com/271/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shashankkulkarni.wordpress.com/271/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shashankkulkarni.com&amp;blog=3545189&amp;post=271&amp;subd=shashankkulkarni&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://shashankkulkarni.com/2010/08/21/unrecognized-windows-sockets-error-0-jvm_bind-flex-the-workaround/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/040bba77afa61996772c4c353cb2f3f0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shank</media:title>
		</media:content>

		<media:content url="https://s-ssl.wordpress.com/wp-includes/images/smilies/icon_smile.gif" medium="image">
			<media:title type="html">:)</media:title>
		</media:content>
	</item>
		<item>
		<title>Validating if the url exists or not on Client side with FLEX</title>
		<link>http://shashankkulkarni.com/2010/07/29/validating-if-the-url-exists-or-not-on-client-side-with-flex/</link>
		<comments>http://shashankkulkarni.com/2010/07/29/validating-if-the-url-exists-or-not-on-client-side-with-flex/#comments</comments>
		<pubDate>Thu, 29 Jul 2010 13:24:35 +0000</pubDate>
		<dc:creator>shashankkulkarni</dc:creator>
				<category><![CDATA[Best of Flex Utillity]]></category>

		<guid isPermaLink="false">http://shashankkulkarni.wordpress.com/?p=8</guid>
		<description><![CDATA[Yup, Quite interesting isn&#8217;t it ? Mission: Validate URL Existance on client side. Expected Result: Anyhow create POC of a code with the efforts to check the possibility of verifying URL existence from Flex i.e. from client side only. Result: . I think i managed to crack it with a simple solution, When code not deployed [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shashankkulkarni.com&amp;blog=3545189&amp;post=8&amp;subd=shashankkulkarni&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Yup, Quite interesting isn&#8217;t it ?</p>
<p><strong>Mission</strong>: Validate URL Existance on client side.</p>
<p><strong>Expected Result:</strong> Anyhow create POC of a code with the efforts to check the possibility of verifying URL existence from Flex i.e. from client side only.</p>
<p><strong>Result: </strong>. I think i managed to crack it with a simple solution, When code not deployed works very smooth and gives result as expected.</p>
<p>On Local Environment Without server deployment of code</p>
<p>Result is great !</p>
<p><img class="alignnone size-medium wp-image-184" title="success_Final" src="http://shashankkulkarni.files.wordpress.com/2010/07/success_final.jpg?w=300&#038;h=160" alt="" width="300" height="160" /></p>
<p>But at last Buck Stops at &#8220;Security Sandbox Error&#8221; when we deployed it on to the server.</p>
<p><a href="http://shashankkulkarni.files.wordpress.com/2010/07/security_error_final1.jpg"><img class="alignnone size-full wp-image-186" title="security_Error_Final" src="http://shashankkulkarni.files.wordpress.com/2010/07/security_error_final1.jpg?w=645" alt=""   /></a></p>
<p><strong>Path Followed:</strong></p>
<p><strong>Knowing flash.net package</strong> : The flash.net package contains classes for sending and receiving from the network, such as URL downloading and Flash Remoting.</p>
<p><a href="http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/flash/net/package-detail.html" target="_blank">http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/flash/net/package-detail.html</a></p>
<p><strong>Understand HTTP response status meanings</strong></p>
<p><a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html" target="_blank">http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html</a></p>
<p>With Some 2-3 days reading i just went on to build one example with URL existence verification application.</p>
<p>If Somebody is intrested to solve this puzzle, take the below code.</p>
<p><strong>Project Hierarchy:</strong></p>
<p>src-assets-HttpCodes.xml</p>
<p>src-ValidateURL.mxml</p>
<p>Lets Walk Through the code, I am sure the written code is pretty simple to understand so wont be elaborating it.</p>
<p>Code for &#8220;<strong>ValidateURL.mxml</strong>&#8220;</p>
<p><pre class="brush: css;">

&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;mx:Application xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot;
xmlns:net=&quot;flash.net.*&quot;
layout=&quot;absolute&quot;
creationComplete=&quot;httpIOError.send();&quot;&gt;

&lt;mx:Script&gt;
&lt;![CDATA[

import mx.controls.Alert;
import mx.utils.ObjectUtil;
import mx.collections.ArrayCollection;
import mx.rpc.events.ResultEvent;
import mx.rpc.events.FaultEvent;
import flash.net.*;

private var httpCode:int;

private var errorCodesAC:ArrayCollection = new ArrayCollection();

private function loadURL():void
{
var urlReq:URLRequest = new URLRequest('http://'+ urlString.text);
urlStream.load(urlReq);
}

private function checkUrl(e:HTTPStatusEvent):void
{
httpCode=e.status;
}

private function ioErrorHandler(e:IOErrorEvent):void
{
for(var i:int=0;i&lt;errorCodesAC.length;i++)
{
if(httpCode==errorCodesAC[i].number)
{
responseText.text = &quot;Status Code: &quot;+httpCode.toString() + &quot;\nError Details: \n&quot;+errorCodesAC[i].details;
}
}
}

private function returnSuccess(e:Event):void
{
responseText.text = &quot;Status Code: &quot;+httpCode.toString() + &quot;\nURL is valid.&quot;
}

private function securityErrorHandler(e:SecurityErrorEvent):void
{
Alert.show(ObjectUtil.toString(e),&quot;Security Error Details&quot;);
}

private function faultHandler(e:FaultEvent):void
{
Alert.show(ObjectUtil.toString(e));
}

private function resultHandler(e:ResultEvent):void
{
errorCodesAC = e.result.HttpStatus.statusCodes.statusCode
}

]]&gt;
&lt;/mx:Script&gt;

&lt;mx:HTTPService id=&quot;httpIOError&quot; url=&quot;assets/HttpCodes.xml&quot; result=&quot;resultHandler(event)&quot; fault=&quot;faultHandler(event)&quot;/&gt;

&lt;net:URLStream  id=&quot;urlStream&quot;  complete=&quot;returnSuccess(event)&quot; httpStatus=&quot;checkUrl(event)&quot;
ioError=&quot;ioErrorHandler(event)&quot; securityError=&quot;securityErrorHandler(event)&quot; /&gt;

&lt;mx:Label x=&quot;135&quot; y=&quot;30&quot; text=&quot;Enter Url to be validated:&quot;/&gt;
&lt;mx:Button x=&quot;321&quot; y=&quot;84&quot; label=&quot;Check URL&quot; click=&quot;loadURL()&quot;/&gt;
&lt;mx:TextInput id=&quot;urlString&quot;  x=&quot;288&quot; y=&quot;28&quot;/&gt;
&lt;mx:Text x=&quot;288&quot; y=&quot;58&quot; text=&quot;eg: www.shashankkulkarni.wordpress.com&quot;/&gt;
&lt;mx:TextArea  id=&quot;responseText&quot; x=&quot;135&quot; y=&quot;133&quot; height=&quot;93&quot; width=&quot;414&quot; editable=&quot;false&quot; wordWrap=&quot;true&quot;/&gt;
&lt;mx:Label x=&quot;135&quot; y=&quot;107&quot; text=&quot;Response Description:&quot;/&gt;
&lt;/mx:Application&gt;

</pre></p>
<p>﻿﻿ <strong>“HttpCodes.xml” </strong>is as below</p>
<p><pre class="brush: css;">

&lt;HttpStatus&gt;

&lt;statusCodes&gt;

&lt;statusCode number=&quot;400&quot;&gt;
&lt;details&gt;
Unable to understand request.[Bad Request]
&lt;/details&gt;
&lt;/statusCode&gt;

&lt;statusCode number=&quot;401&quot;&gt;
&lt;details&gt;
User authentication required. [Unauthorized Request]
&lt;/details&gt;
&lt;/statusCode&gt;

&lt;statusCode number=&quot;403&quot;&gt;
&lt;details&gt;
Server refuses the response. [Forbidden Request]
&lt;/details&gt;
&lt;/statusCode&gt;

&lt;statusCode number=&quot;404&quot;&gt;
&lt;details&gt;
Page Not Found. [Page Not Found ]
&lt;/details&gt;
&lt;/statusCode&gt;

&lt;statusCode number=&quot;407&quot;&gt;
&lt;details&gt;
Proxy Authentication required. [Proxy Authentication]
&lt;/details&gt;
&lt;/statusCode&gt;

&lt;statusCode number=&quot;408&quot;&gt;
&lt;details&gt;
Request failed to reach server within specified time. [Request Timeout]
&lt;/details&gt;
&lt;/statusCode&gt;

&lt;statusCode number=&quot;500&quot;&gt;
&lt;details&gt;
Unexpected condition occured. [Internal Server Error]
&lt;/details&gt;
&lt;/statusCode&gt;

&lt;statusCode number=&quot;501&quot;&gt;
&lt;details&gt;
Functionality required is not supported. [Functionality not supported]
&lt;/details&gt;
&lt;/statusCode&gt;

&lt;statusCode number=&quot;502&quot;&gt;
&lt;details&gt;
Invalid response received by server. [Bad Gateway]
&lt;/details&gt;
&lt;/statusCode&gt;

&lt;statusCode number=&quot;503&quot;&gt;
&lt;details&gt;
Service is not available temporarily.[Service Unavailable]
&lt;/details&gt;
&lt;/statusCode&gt;

&lt;statusCode number=&quot;504&quot;&gt;
&lt;details&gt;
Timely response not received. [Gateway Timeout]
&lt;/details&gt;
&lt;/statusCode&gt;

&lt;statusCode number=&quot;0&quot;&gt;
&lt;details&gt;
Input stream is not well Formatted [IOError]
&lt;/details&gt;
&lt;/statusCode&gt;

&lt;statusCode number=&quot;200&quot;&gt;
&lt;details&gt;
Yes! This URL exists. [Success]
&lt;/details&gt;
&lt;/statusCode&gt;

&lt;/statusCodes&gt;

&lt;/HttpStatus&gt;

</pre></p>
<p>I gone through details of Sandbox Security restriction with Flash player ( <a href="http://www.adobe.com/devnet/flashplayer/articles/flash_player_9_security.pdf" target="_blank">http://www.adobe.com/devnet/flashplayer/articles/flash_player_9_security.pdf </a>) but unfortunatly could not solve it to success,  i really feel this should have been done from Flex itself.</p>
<p>I would have been happy to see it working, But I guess some more understanding is needed on my part. I am still finding the missing things.</p>
<p>There must be some way to DO it ???? Still searching the answer, If some body finds it&#8230; Just ping it down here. I will be glad to resolve it.</p>
<p>Any suggestions are welcomed.</p>
<p>Best Luck &amp; Happy coding <img src="https://s-ssl.wordpress.com/wp-includes/images/smilies/icon_smile.gif" alt=":)" /></p>
<p><strong>Thanks and regards</strong></p>
<p><strong>Shashank Kulkarni</strong></p>
<p>Feel free to comment on the post <img src="https://s-ssl.wordpress.com/wp-includes/images/smilies/icon_smile.gif" alt=":)" /></p>
<br />Filed under: <a href='http://shashankkulkarni.com/category/best-of-flex-utillity/'>Best of Flex Utillity</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shashankkulkarni.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shashankkulkarni.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shashankkulkarni.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shashankkulkarni.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/shashankkulkarni.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/shashankkulkarni.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/shashankkulkarni.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/shashankkulkarni.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shashankkulkarni.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shashankkulkarni.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shashankkulkarni.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shashankkulkarni.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shashankkulkarni.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shashankkulkarni.wordpress.com/8/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shashankkulkarni.com&amp;blog=3545189&amp;post=8&amp;subd=shashankkulkarni&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://shashankkulkarni.com/2010/07/29/validating-if-the-url-exists-or-not-on-client-side-with-flex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/040bba77afa61996772c4c353cb2f3f0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shank</media:title>
		</media:content>

		<media:content url="http://shashankkulkarni.files.wordpress.com/2010/07/success_final.jpg?w=300" medium="image">
			<media:title type="html">success_Final</media:title>
		</media:content>

		<media:content url="http://shashankkulkarni.files.wordpress.com/2010/07/security_error_final1.jpg" medium="image">
			<media:title type="html">security_Error_Final</media:title>
		</media:content>

		<media:content url="https://s-ssl.wordpress.com/wp-includes/images/smilies/icon_smile.gif" medium="image">
			<media:title type="html">:)</media:title>
		</media:content>

		<media:content url="https://s-ssl.wordpress.com/wp-includes/images/smilies/icon_smile.gif" medium="image">
			<media:title type="html">:)</media:title>
		</media:content>
	</item>
		<item>
		<title>Could not resolve  to a component implementation&#8230; Simple solution steps</title>
		<link>http://shashankkulkarni.com/2010/07/16/could-not-resolve-to-a-component-implementation-simple-solution-steps/</link>
		<comments>http://shashankkulkarni.com/2010/07/16/could-not-resolve-to-a-component-implementation-simple-solution-steps/#comments</comments>
		<pubDate>Fri, 16 Jul 2010 07:37:15 +0000</pubDate>
		<dc:creator>shashankkulkarni</dc:creator>
				<category><![CDATA[Flex(Amazing Errors)]]></category>

		<guid isPermaLink="false">http://shashankkulkarni.wordpress.com/?p=164</guid>
		<description><![CDATA[Just installed Adobe Flash Builder 4 Plug-in to my Eclipse installation at different location but amusingly My Existing Flex 3.4 SDK  stops working after first restart of Eclipse. IT started foul crying “Could not resolve &#60;mx:AdvancedDataGrid&#62; to a component implementation. ”  and I was stuck…..  I restarted my Flex Builder but no Luck ,Then  on [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shashankkulkarni.com&amp;blog=3545189&amp;post=164&amp;subd=shashankkulkarni&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Just installed Adobe Flash Builder 4 Plug-in to my Eclipse installation at different location but amusingly My Existing Flex 3.4 SDK  stops working after first restart of Eclipse. IT started foul crying “Could not resolve &lt;mx:AdvancedDataGrid&gt; to a component implementation. ”  and I was stuck…..  I restarted my Flex Builder but no Luck ,Then  on doing some Googling I just went to Adobe Site for Flex 3 Release notes at  <a href="http://www.adobe.com/support/documentation/en/flex/3/releasenotes_flex3_sdk.html" target="_blank">http://www.adobe.com/support/documentation/en/flex/3/releasenotes_flex3_sdk.html</a> which says,</p>
<p><strong>Using The Data Visualization Components with Flex SDK</strong></p>
<p>“A new version of the data visualization libraries needs to be downloaded and installed into the SDK 3 installation to leverage features such as charts and the Advanced DataGrid”</p>
<p>It just gave me a direction that somehow my Existing Eclipse based Flex 3.4 SDK has lost two library files namely</p>
<p>1. <strong>“datavisualization.swc”</strong></p>
<p>Location:  C:\Program Files\Adobe\Flex Builder 3 Plug-in\sdks\3.4.0.9271\frameworks\libs</p>
<p>2.  <strong>“datavisualization_rb.swc”</strong></p>
<p>Location :</p>
<p>C:\Program Files\Adobe\Flex Builder 3 Plug-in\sdks\3.4.0.9271\frameworks\locale\en_US</p>
<p>(Note: Please refer your native installation path)</p>
<p><strong>The library can be downloaded from the main Flex download page:</strong><br />
<a href="http://www.adobe.com/products/flex/flexdownloads/" target="_blank">http://www.adobe.com/products/flex/flexdownloads/</a></p>
<p>Steps to Resolve:</p>
<p><strong> </strong></p>
<ol>
<li>Goto C:\Program Files\Adobe\Flex Builder 3 Plug-in\sdks\3.4.0.9271\frameworks\libs and check for <strong>“datavisualization.swc”</strong></li>
<li>Goto</li>
</ol>
<p>C:\Program Files\Adobe\Flex Builder 3 Plug-in\sdks\3.4.0.9271\frameworks\locale\en_US</p>
<p>Check for <strong>“datavisualization_rb.swc”</strong></p>
<p>3. Download these from<a href="http://www.adobe.com/cfusion/entitlement/index.cfm?e=flex3sdk" target="_blank"> http://www.adobe.com/cfusion/entitlement/index.cfm?e=flex3sdk</a></p>
<p>Which is located under heading “ <strong>ADOBE FLEX 3.5 DATA VISUALIZATION COMPONENTS FOR FLEX BUILDER</strong> ”</p>
<p>Unzip ‘datavisualization_SDK3.5.zip’ which will extract SDK 3 installation</p>
<ul>
<li>datavisualization.swc into the frameworks\libs folder</li>
<li>the datavisualization RSL into the frameworks\rsls folder</li>
<li>datavisualization_rb.swc into the appropriate frameworks\locale\&lt;locale&gt; folder</li>
</ul>
<p>Now get those SWC and place to your installation location</p>
<p>If it Still not work try to toggle between SDK s from Project Properties – Flex Compiler option and Restart your installation.</p>
<p>Hope it will work out for you ! If still does not work just drop a comment to resolve</p>
<p>Best Luck &amp; Happy coding <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>Thanks and regards</strong></p>
<p><strong>Shashank Kulkarni</strong></p>
<p>Feel free to comment on the post <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br />Filed under: <a href='http://shashankkulkarni.com/category/flexamazing-errors/'>Flex(Amazing Errors)</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shashankkulkarni.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shashankkulkarni.wordpress.com/164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shashankkulkarni.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shashankkulkarni.wordpress.com/164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/shashankkulkarni.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/shashankkulkarni.wordpress.com/164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/shashankkulkarni.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/shashankkulkarni.wordpress.com/164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shashankkulkarni.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shashankkulkarni.wordpress.com/164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shashankkulkarni.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shashankkulkarni.wordpress.com/164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shashankkulkarni.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shashankkulkarni.wordpress.com/164/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shashankkulkarni.com&amp;blog=3545189&amp;post=164&amp;subd=shashankkulkarni&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://shashankkulkarni.com/2010/07/16/could-not-resolve-to-a-component-implementation-simple-solution-steps/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/040bba77afa61996772c4c353cb2f3f0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shank</media:title>
		</media:content>
	</item>
		<item>
		<title>How Clone() method works and Why to Write it?</title>
		<link>http://shashankkulkarni.com/2010/03/30/how-clone-method-works-and-why-to-write-it/</link>
		<comments>http://shashankkulkarni.com/2010/03/30/how-clone-method-works-and-why-to-write-it/#comments</comments>
		<pubDate>Tue, 30 Mar 2010 12:21:00 +0000</pubDate>
		<dc:creator>shashankkulkarni</dc:creator>
				<category><![CDATA[Flex(Amazing Errors)]]></category>

		<guid isPermaLink="false">http://shashankkulkarni.wordpress.com/?p=138</guid>
		<description><![CDATA[Small round up to Events basic, I think that is important  As we know &#8220;Event&#8221; class is used as the base class for the creation of Event objects, which are passed as parameters to event listeners when an event occurs. So to make avail the Event Object and its properties we always extends Event Basically [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shashankkulkarni.com&amp;blog=3545189&amp;post=138&amp;subd=shashankkulkarni&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Small round up to Events basic, I think that is important  <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>As we know &#8220;Event&#8221; class is used as the base class for the creation of Event objects, which are passed as parameters to event listeners when an event occurs. So to make avail the Event Object and its properties we always <strong>extends Event</strong></p>
<p>Basically in Event class(flash.events.Event class) there is one method called as clone()</p>
<p><strong>How clone() method works?</strong><br />
clone() method duplicates an instance of an Event subclass. Returns a new Event object that is a copy of the original instance of the Event object.<br />
<strong><br />
Why To write clone() method?</strong><br />
When creating your own custom Event class, we must override the inherited Event.clone() method in order for it to duplicate the properties of your custom class.<br />
<strong><br />
What if I don&#8217;t override clone() method?</strong><br />
This works fine if implementation doesn&#8217;t re-dispatch the event, but as soon as we <strong>re-dispatch </strong>the event (by calling dispatchEvent(event) in a handler that is handling event), we get a TypeError: Error #1034: Type Coercion failed: cannot convert flash.events::Event@28ef5b1 to events.</p>
<p>Lets Produce the error <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> <span style="color:#000000;"> </span></p>
<p>Main Application Code<br />
<pre class="brush: css;">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;mx:Application xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot; layout=&quot;absolute&quot; xmlns:local=&quot;*&quot; creationComplete=&quot;onCreationComplete()&quot;&gt;
	&lt;mx:Script&gt;
		&lt;![CDATA[
			import events.DemoCloneImportance;
			import mx.controls.Alert;
			private function onCreationComplete():void
			{
				demoCloneDispatcher.addEventListener(DemoCloneImportance.CLONE_EVENT,cloneDemoHandler);
				this.addEventListener(DemoCloneImportance.CLONE_EVENT,cloneRedispatchHandler);
			}
			
			private function cloneDemoHandler(event:DemoCloneImportance):void
			{
				Alert.show('In Dispatch Handler');
				this.dispatchEvent(event);		
			}
			
			private function cloneRedispatchHandler(event:DemoCloneImportance):void
			{
				Alert.show('In Redispatcher Handler');
			}
			
		]]&gt;
	&lt;/mx:Script&gt;

	&lt;local:CloneInvokerComponent id=&quot;demoCloneDispatcher&quot;/&gt;
	
&lt;/mx:Application&gt;
</pre></p>
<p><strong>Component Class is as follows:</strong></p>
<p><!--CloneInvokerComponent.mxml--></p>
<p><pre class="brush: css;">

&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;!--CloneInvokerComponent.mxml--&gt;
&lt;mx:VBox xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot; width=&quot;400&quot; height=&quot;300&quot;&gt;
	&lt;mx:Script&gt;
		&lt;![CDATA[
			import events.DemoCloneImportance;
		]]&gt;
	&lt;/mx:Script&gt;
&lt;mx:Metadata&gt;
	[Event(name=&quot;CloneEventDemo&quot;, type=&quot;events.DemoCloneImportance&quot;)]
&lt;/mx:Metadata&gt;
	&lt;mx:Button label=&quot;Dispatch Event&quot; id=&quot;btnDispatch&quot; click=&quot;dispatchEvent(new DemoCloneImportance(DemoCloneImportance.CLONE_EVENT,true))&quot;/&gt;
&lt;/mx:VBox&gt;
</pre></p>
<p><strong>Wrong Implementation of Event Class, (Without overriding clone() method )Must avoid it <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  </strong></p>
<p><pre class="brush: css;">
package event
{
import flash.events.Event;

public class DemoCloneImportance extends Event
{
public function DemoCloneImportance(type:String, bubbles:Boolean=false, cancelable:Boolean=false)
{
super(type, bubbles, cancelable);
}

public static const CLONE_EVENT:String = 'CloneEventDemo'		// Override the inherited clone() method.

}

}
</pre></p>
<p>Run the Application and we get Runtime error (Visible if Flash Debugger installed)</p>
<p><strong>Now To Resolve it make Custom Event class implementation right <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </strong></p>
<p><pre class="brush: css;">
package event
{
import flash.events.Event;

public class DemoCloneImportance extends Event
{
public function DemoCloneImportance(type:String, bubbles:Boolean=false, cancelable:Boolean=false)
{
super(type, bubbles, cancelable);
}

public static const CLONE_EVENT:String = 'CloneEventDemo'		// Override the inherited clone() method.

override public function clone():Event {
return new DemoCloneImportance(type, true,false);
}

}

}</pre></p>
<p>This is something very basic but i think most important also <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong> </strong></p>
<p>Best Luck &amp; Happy coding <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>Thanks and regards</strong></p>
<p><strong>Shashank Kulkarni</strong></p>
<p>Feel free to comment on the post <img src="https://s-ssl.wordpress.com/wp-includes/images/smilies/icon_smile.gif" alt=":)" /></p>
<br />Filed under: <a href='http://shashankkulkarni.com/category/flexamazing-errors/'>Flex(Amazing Errors)</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shashankkulkarni.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shashankkulkarni.wordpress.com/138/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shashankkulkarni.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shashankkulkarni.wordpress.com/138/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/shashankkulkarni.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/shashankkulkarni.wordpress.com/138/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/shashankkulkarni.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/shashankkulkarni.wordpress.com/138/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shashankkulkarni.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shashankkulkarni.wordpress.com/138/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shashankkulkarni.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shashankkulkarni.wordpress.com/138/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shashankkulkarni.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shashankkulkarni.wordpress.com/138/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shashankkulkarni.com&amp;blog=3545189&amp;post=138&amp;subd=shashankkulkarni&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://shashankkulkarni.com/2010/03/30/how-clone-method-works-and-why-to-write-it/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/040bba77afa61996772c4c353cb2f3f0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shank</media:title>
		</media:content>

		<media:content url="https://s-ssl.wordpress.com/wp-includes/images/smilies/icon_smile.gif" medium="image">
			<media:title type="html">:)</media:title>
		</media:content>
	</item>
		<item>
		<title>Flex application not working without debug version of Flash Player</title>
		<link>http://shashankkulkarni.com/2009/08/27/flex-application-not-working-without-debug-version-of-flash-player/</link>
		<comments>http://shashankkulkarni.com/2009/08/27/flex-application-not-working-without-debug-version-of-flash-player/#comments</comments>
		<pubDate>Thu, 27 Aug 2009 19:35:58 +0000</pubDate>
		<dc:creator>shashankkulkarni</dc:creator>
				<category><![CDATA[Flex(Amazing Errors)]]></category>
		<category><![CDATA[Flex app not loading]]></category>
		<category><![CDATA[Flex app not working]]></category>
		<category><![CDATA[Flex app not working without debug version of Flash Player]]></category>
		<category><![CDATA[Flex application not loading]]></category>
		<category><![CDATA[Flex application not running]]></category>
		<category><![CDATA[Flex application not starting]]></category>
		<category><![CDATA[Flex application not working]]></category>

		<guid isPermaLink="false">http://shashankkulkarni.wordpress.com/?p=87</guid>
		<description><![CDATA[Recently, I was having a requirement to develop the Flex Log management functionality. After doing lots of research and investing a time for 3 to four days I successfully managed the things to achieve the flex logging Mechanism which can log Line Number, Function Name, Class name into log File. After delivering the functionality I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shashankkulkarni.com&amp;blog=3545189&amp;post=87&amp;subd=shashankkulkarni&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Recently, I was having a requirement to develop the Flex Log management functionality. After doing lots of research and investing a time for 3 to four days <strong>I successfully managed the things to achieve the flex logging Mechanism which can log Line Number, Function Name, Class name into log File.</strong></p>
<p>After delivering the functionality I was happy that I have done it  Its really a nice feeling. I was hoping for appreciation but result was bit different I have received a clients mail saying that on some of the machines <span style="color:#0000ff;"><span style="text-decoration:underline;">Flex app not working without debug version of Flash Player</span> </span>, It was really an Head scratching experience when application just stopped running with a white background in screen with clock display.  I was quite surprised that application which were running perfectly well on my PC, wasn&#8217;t displayed properly on some of the PCs.</p>
<p>Hmm.. No Clues at all. I must say Adobe Sometimes handles such situation in very ugly, and with very unprofessional manner, its a horrible handling of such situation by Adobe Flex Framework Developers must criticized them for such things.</p>
<p>After lots of efforts and lots of revision to the newly added code, after doing everything finally the application showed up on one of the problematic machine when I changed the Flash Player version from standard one to debug.</p>
<p><strong>Scenario and Solution</strong></p>
<p>I was using following code</p>
<p>//Call To The Function traceDetails(new Error())</p>
<p>private function traceDetails(err:Error):void { <strong>err.getStackTrace();</strong> } On My part i was using the method &#8220;getStackTrace()&#8221; Here the thing to remember is that <strong>getStackTrace() method is only available with Flash Debugger and Not With Flash player</strong>. So wherever i do not have Flash Debugger installed my application stops running.</p>
<p><strong>So Things to do</strong></p>
<p>1. Check if You’re using any <strong>API call that are only available in Flash Debugger and Not in Flash player</strong> (If You found Try commenting that line Application will start running).</p>
<p>2. Solutions may be <strong>Install Flash Debugger Version </strong>wherever you are running your application but not feasible considering end user because your application is not loaded successfully and you cannot prompt user.</p>
<p>3. <strong>In wrapper class put a check with JavaScript for Flash Debugger version </strong>availability and if it is not available through JavaScript Message Saying you need to have flash layer Debugger version installed along with link to install it J</p>
<p>4. Simply before your Flash Debugger API calls Check <strong>if(Capabilities.isDebugger)</strong> only then use those API or Skip those lines.</p>
<p>I am sure this will solve many peoples problem.</p>
<p>Following thread discussed the same problem</p>
<p><strong> </strong></p>
<p><a href="http://stackoverflow.com/questions/1137223/flex-app-not-working-without-debug-version-of-flash-player">http://stackoverflow.com/questions/1137223/flex-app-not-working-without-debug-version-of-flash-player</a></p>
<p>Another Example how developer suffer due to some mismanaged framework things</p>
<p>http://stackoverflow.com/questions/867788/compile-flex-application-without-debug-optimisation-options-for-flex-compiler</p>
<p><strong> </strong></p>
<p>Best Luck &amp; Happy coding <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>Thanks and regards</strong></p>
<p><strong>Shashank Kulkarni</strong></p>
<p>Feel free to comment on the post <img src="http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif" alt=":)" /></p>
<br />Posted in Flex(Amazing Errors) Tagged: Flex app not loading, Flex app not working, Flex app not working without debug version of Flash Player, Flex application not loading, Flex application not running, Flex application not starting, Flex application not working <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shashankkulkarni.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shashankkulkarni.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shashankkulkarni.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shashankkulkarni.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/shashankkulkarni.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/shashankkulkarni.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/shashankkulkarni.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/shashankkulkarni.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shashankkulkarni.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shashankkulkarni.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shashankkulkarni.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shashankkulkarni.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shashankkulkarni.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shashankkulkarni.wordpress.com/87/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shashankkulkarni.com&amp;blog=3545189&amp;post=87&amp;subd=shashankkulkarni&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://shashankkulkarni.com/2009/08/27/flex-application-not-working-without-debug-version-of-flash-player/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/040bba77afa61996772c4c353cb2f3f0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shank</media:title>
		</media:content>

		<media:content url="http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif" medium="image">
			<media:title type="html">:)</media:title>
		</media:content>
	</item>
		<item>
		<title>Compilation Error: An internal build error has occurred. Right-click for more information.</title>
		<link>http://shashankkulkarni.com/2009/07/30/compilation-error-an-internal-build-error-has-occurred-right-click-for-more-information/</link>
		<comments>http://shashankkulkarni.com/2009/07/30/compilation-error-an-internal-build-error-has-occurred-right-click-for-more-information/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 15:35:47 +0000</pubDate>
		<dc:creator>shashankkulkarni</dc:creator>
				<category><![CDATA[Flex(Amazing Errors)]]></category>
		<category><![CDATA[Compilation Error: An internal build error has occurred. Right-click for more information.]]></category>
		<category><![CDATA[Compilation Error: Classes must not be nested]]></category>
		<category><![CDATA[Flex compilation error]]></category>
		<category><![CDATA[no line number on compilation error]]></category>
		<category><![CDATA[Parameter initializer unknown or is not a compile-time constant.]]></category>

		<guid isPermaLink="false">http://shashankkulkarni.wordpress.com/?p=83</guid>
		<description><![CDATA[This is another chapter to the amazing errors, which does not leave behind any signals how to solve it, and more interestingly what is the exact reason for it. When we have a pretty large code base where many developers check in and check out the code regularly, it is very hard to find the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shashankkulkarni.com&amp;blog=3545189&amp;post=83&amp;subd=shashankkulkarni&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is another chapter to the amazing errors, which does not leave behind any signals how to solve it, and more interestingly what is the exact reason for it.</p>
<p>When we have a pretty large code base where many developers check in and check out the code regularly, it is very hard to find the exact cause of the error which comes while compiling the code. Same thing happened with me and to find the exact cause and the solution for it took a lot of time and interestingly and amazed feeling why it is happening so,</p>
<p>For Demo let’s compile the following code,</p>
<p><strong>Case 1: Error :An internal build error has occurred. Right-click for more information</strong></p>
<p><pre class="brush: css;">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;mx:Application xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot; layout=&quot;absolute&quot;
creationComplete=&quot;init()&quot;&gt;

&lt;mx:Script&gt;
&lt;![CDATA[
private function init():void{
var type:String;
switch(type) {
/* case &quot;test&quot;:
break; */
}
}

]]&gt;

&lt;/mx:Script&gt;

&lt;mx:Label text=&quot;Blank Switch&quot;/&gt;
&lt;/mx:Application&gt;
</pre></p>
<p>While Compiling we get the Compilation error as “An internal build error has occurred. Right-click for more information.” No line number in error and we start scratching our head. But <strong>solution is simple just </strong><strong>remove the switch block </strong>and application will get compiled again and we can move on with coding.</p>
<p><strong>Case 2: Error : </strong><strong>Classes must not be nested.</strong></p>
<p>Replace the init() method and compile the code we get the error <strong>Classes must not be nested. </strong>same problem here but at least this time we will get the error at function call so it is bit easier to track</p>
<p><strong>private</strong> <strong>function</strong> init():<strong>void</strong> {</p>
<p><strong>var</strong> type:String;</p>
<p><strong>switch</strong>(type)  {</p>
<p><strong>case</strong> <strong>&#8220;hi&#8221;</strong>:</p>
<p><em>//var i:int = i+1;</em></p>
<p><strong>break</strong>;</p>
<p>}</p>
<p>}</p>
<p>]]&gt;</p>
<p><strong>solution is simple just </strong><strong>remove the switch block </strong>and application will get compiled again and we can move on with coding.</p>
<p>Same Problem is been discussed here as common problem but some times it becomes hard to find it so.</p>
<p><a href="http://learn.adobe.com/wiki/display/Flex/Flex+Builder+3+Compiler+Errors">http://learn.adobe.com/wiki/display/Flex/Flex+Builder+3+Compiler+Errors</a></p>
<p><strong>Case 3: 1047: Parameter initializer unknown or is not a compile-time constant.</strong></p>
<p>Possible Solutions:</p>
<p>Checking the constant at function argument,Constructor is one of the big cause of such error,</p>
<p>like</p>
<p>package</p>
<p>{</p>
<p>public class Test {</p>
<p>//Constants is Class</p>
<p>//public class Constant{    public static const  LOGINNAME:String=&#8221;test&#8221;       }</p>
<p>public function Test(<strong>s:Sting=Constants.LOGINNAME</strong>){           <strong><br />
</strong></p>
<p>}//Function test Ends Here</p>
<p>}//Class Ends Here</p>
<p>}</p>
<p><strong>Solution: </strong>Here if  we replace <strong>s:Sting=Constants.LOGINNAME by </strong><strong>s:Sting=&#8221;test&#8221; Error is resolved<br />
</strong></p>
<p><strong> </strong><strong>1047: Parameter initializer unknown or is not a compile-time constant. Error will be solved. Note that for error to display we must instatiate the Test class</strong></p>
<p>Some other reasons :</p>
<p>Missing semicolon in Anycode where you have defined constants and Forgot to enter the Semicolon.</p>
<p>Especially if you use ArrayCollection in Constant you mest give a semicolon or else be ready for Unexpeted error.</p>
<p>See if Server is in restart mode then some times project doesnot get cleaned up properly and deployed properly so check Server status as &#8220;Started&#8221; and clean project it will do for you.</p>
<p>Thanks and regards</p>
<p>Shashank Kulkarni</p>
<p>Feel free to comment on the post <img src="http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif" alt=":)" /></p>
<br />Posted in Flex(Amazing Errors) Tagged: Compilation Error: An internal build error has occurred. Right-click for more information., Compilation Error: Classes must not be nested, Flex compilation error, no line number on compilation error, Parameter initializer unknown or is not a compile-time constant. <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shashankkulkarni.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shashankkulkarni.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shashankkulkarni.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shashankkulkarni.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/shashankkulkarni.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/shashankkulkarni.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/shashankkulkarni.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/shashankkulkarni.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shashankkulkarni.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shashankkulkarni.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shashankkulkarni.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shashankkulkarni.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shashankkulkarni.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shashankkulkarni.wordpress.com/83/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shashankkulkarni.com&amp;blog=3545189&amp;post=83&amp;subd=shashankkulkarni&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://shashankkulkarni.com/2009/07/30/compilation-error-an-internal-build-error-has-occurred-right-click-for-more-information/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/040bba77afa61996772c4c353cb2f3f0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shank</media:title>
		</media:content>

		<media:content url="http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif" medium="image">
			<media:title type="html">:)</media:title>
		</media:content>
	</item>
		<item>
		<title>Adobe Flex Builder 3 is Free</title>
		<link>http://shashankkulkarni.com/2009/04/08/adobe-flex-builder-3-is-free/</link>
		<comments>http://shashankkulkarni.com/2009/04/08/adobe-flex-builder-3-is-free/#comments</comments>
		<pubDate>Wed, 08 Apr 2009 08:42:57 +0000</pubDate>
		<dc:creator>shashankkulkarni</dc:creator>
				<category><![CDATA[FLEX]]></category>
		<category><![CDATA[Adobe Flex Builder Trail Version Link]]></category>
		<category><![CDATA[Flex builder Download links]]></category>
		<category><![CDATA[Free Flex Builder Link]]></category>

		<guid isPermaLink="false">http://shashankkulkarni.wordpress.com/?p=70</guid>
		<description><![CDATA[After making Flex SDK open source ADOBE have bounce back again for Unemployeed Developers with Free Flex builder 3. Its really a great initiative by ADOBE to cache in the opportunity for spreding the Flex among the common masses. Link to Flex Builder version  for UnEmployeed professionals : https://freeriatools.adobe.com/learnflex/ Link to Flex Builder version for [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shashankkulkarni.com&amp;blog=3545189&amp;post=70&amp;subd=shashankkulkarni&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>After making Flex SDK open source ADOBE have bounce back again for Unemployeed Developers with Free Flex builder 3.</p>
<p>Its really a great initiative by ADOBE to cache in the opportunity for spreding the Flex among the common masses.</p>
<ol>
<li>Link to Flex Builder version  for UnEmployeed professionals : <a href="https://freeriatools.adobe.com/learnflex/">https://freeriatools.adobe.com/learnflex/</a></li>
<li>Link to Flex Builder version for Student/Institutes/Faculty/Labs : <a href="https://freeriatools.adobe.com/flex/">https://freeriatools.adobe.com/flex/</a></li>
<li>Link to Flex Builder version For 60 Days Trial  For Other : <a href="http://www.adobe.com/cfusion/entitlement/index.cfm?e=flex3email">http://www.adobe.com/cfusion/entitlement/index.cfm?e=flex3email</a></li>
</ol>
<p>Happy Coding with Flex Builder <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Thanks and regards</p>
<p>Shashank Kulkarni</p>
<p>Feel free to comment on the post <img src="http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif" alt=":)" /></p>
<br />Posted in FLEX Tagged: Adobe Flex Builder Trail Version Link, Flex builder Download links, Free Flex Builder Link <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shashankkulkarni.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shashankkulkarni.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shashankkulkarni.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shashankkulkarni.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/shashankkulkarni.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/shashankkulkarni.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/shashankkulkarni.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/shashankkulkarni.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shashankkulkarni.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shashankkulkarni.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shashankkulkarni.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shashankkulkarni.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shashankkulkarni.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shashankkulkarni.wordpress.com/70/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shashankkulkarni.com&amp;blog=3545189&amp;post=70&amp;subd=shashankkulkarni&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://shashankkulkarni.com/2009/04/08/adobe-flex-builder-3-is-free/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/040bba77afa61996772c4c353cb2f3f0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shank</media:title>
		</media:content>

		<media:content url="http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif" medium="image">
			<media:title type="html">:)</media:title>
		</media:content>
	</item>
		<item>
		<title>Unit Testing with FlexUnit</title>
		<link>http://shashankkulkarni.com/2009/03/05/49/</link>
		<comments>http://shashankkulkarni.com/2009/03/05/49/#comments</comments>
		<pubDate>Thu, 05 Mar 2009 12:53:59 +0000</pubDate>
		<dc:creator>shashankkulkarni</dc:creator>
				<category><![CDATA[FLEX]]></category>
		<category><![CDATA[Flex Unit]]></category>
		<category><![CDATA[Flex Unit Framework]]></category>
		<category><![CDATA[Flex Unit Framework *.ppt]]></category>
		<category><![CDATA[Unit Testing]]></category>
		<category><![CDATA[Unit Testing Framework in Flex]]></category>
		<category><![CDATA[unit Testing in Flex]]></category>
		<category><![CDATA[Unit Testing with FlexUnit]]></category>

		<guid isPermaLink="false">http://shashankkulkarni.wordpress.com/2009/03/05/49/</guid>
		<description><![CDATA[Before Reading this documentation. Its been a simple effort by me to share the information whatever i have with all of the world through internet. So whatever written is all what i had understood from the FlexUnit Framework it may have some mistakes so sorry for those. But Please do inform me if you find [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shashankkulkarni.com&amp;blog=3545189&amp;post=49&amp;subd=shashankkulkarni&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Before Reading this documentation. Its been a simple effort by me to share the information whatever i have with all of the world through internet. So whatever written is all what i had understood from the FlexUnit Framework it may have some mistakes so sorry for those. But Please do inform me if you find something wrong with it ,so that this can be of great help to everybody who navigates to this page.</p>
<p>This is the First big document which i have made and published so Please do comment if you think you can help me or give me a some suggestions.</p>
<p>Thanks in Advance.</p>
<p><strong>Some Definitions</strong><strong> </strong></p>
<ul>
<li><strong>Code coverage : </strong>Code coverage is a measure used in <a title="Software testing" href="http://en.wikipedia.org/wiki/Software_testing" target="_parent">software testing</a>. It describes the degree to which the <a title="Source code" href="http://en.wikipedia.org/wiki/Source_code" target="_parent">source code</a> of a <a title="Computer program" href="http://en.wikipedia.org/wiki/Computer_program" target="_parent">program</a> has been tested. It is a form of testing that inspects the code directly and is therefore a form of <a title="White box testing" href="http://en.wikipedia.org/wiki/White_box_testing" target="_parent">white box testing</a> (Testing done only on internal specification).</li>
<li><strong>Test harness</strong> or <strong>automated test framework</strong> : It is a collection of software and test data configured to test a program unit by running it under varying conditions and monitoring its behavior and outputs.</li>
</ul>
<p style="text-align:left;">The typical objectives of a test harness are to:</p>
<p style="text-align:left;">Ø Automate the testing process.</p>
<p style="text-align:left;">Ø Execute test suites of test cases.</p>
<p style="text-align:left;">Ø Generate associated test reports.</p>
<p style="text-align:left;">A test harness typically provides the following benefits:</p>
<p style="text-align:left;">Ø Increased productivity due to automation of the testing process.</p>
<p style="text-align:left;">Ø Increased probability that <a title="Regression testing" href="http://en.wikipedia.org/wiki/Regression_testing" target="_parent">regression testing</a> will occur.</p>
<p style="text-align:left;">Ø Increased quality of software components and application.</p>
<ul>
<li><strong>Regression</strong> : Regressions occur whenever software functionality that was previously working correctly stops working as intended. Typically regressions occur as an <a title="Unintended consequence" href="http://en.wikipedia.org/wiki/Unintended_consequence" target="_parent">unintended </a><a title="Unintended consequence" href="http://en.wikipedia.org/wiki/Unintended_consequence" target="_parent">consequence</a> of program changes.</li>
<li><strong>Test Case :</strong> A test case in software engineering is a set of conditions or variables under which a tester will determine whether a application meets specifications. Test cases are often referred to as <strong><a title="Test script" href="http://en.wikipedia.org/wiki/Test_script" target="_parent">test scripts</a></strong>, particularly when written. Written test cases are usually collected into <a title="Test suite" href="http://en.wikipedia.org/wiki/Test_suite" target="_parent">test suites</a>.</li>
<li><strong>Test Oracle</strong> : The mechanism for determining whether a software program or system has passed or failed a test . In some settings an oracle could be a use case or Requirement. It may take many test cases to determine that a software program or system is functioning correctly.</li>
<li><strong>Mock objects</strong> : mock objects are simulated objects that mimic the behavior of real objects in controlled ways. In a <a title="Unit test" href="http://en.wikipedia.org/wiki/Unit_test" target="_parent">unit test</a>, mock objects can <a title="Simulation" href="http://en.wikipedia.org/wiki/Simulation" target="_parent">simulate</a> the behavior of complex, real (non-mock) objects and are therefore useful when a real object is impractical or impossible to incorporate into a unit test.</li>
<li><strong>Feature creep</strong> : It is the proliferation of features in a product where extra features go beyond the basic function of the product and so can result in over-complication rather than simple, elegant design.</li>
</ul>
<p><strong>Unit testing</strong><strong> </strong><strong> </strong></p>
<p><strong>What is Unit and Unit testing?</strong><strong> </strong></p>
<ul>
<li><strong> </strong>Unit testing is a method of testing that verifies the individual units of source code are working properly. A unit is the smallest testable part of an application. In Flex, this means a function, or  more appropriately a method as Flex/ActionScript is an object oriented language.</li>
<li>Unlike many other forms of software testing, unit tests are usually completed by the developer.</li>
<li>The developer tests code at a low level to make sure each method is performing as expected. In theory, if each function is working properly at a low level then the higher levels of integrtion  testing should have fewer errors.<strong> </strong></li>
</ul>
<p><strong>Why ?</strong></p>
<p>To ensures that new additions or changes to a project do not introduce bugs or modify expected behavior.</p>
<ul>
<li>To enables large teams to work in tandem without introducing bugs and confirm that small individual parts of a program, down to specific methods, all return the expected results.</li>
</ul>
<p><strong> </strong><strong>When ?</strong></p>
<p><strong> </strong><strong> </strong>Before writing a code for any functionality we should pass a unit test for every functionality.</p>
<p><strong>Reasons for Unit Testing</strong></p>
<ol>
<li>Tests Reduce Bugs in New Features</li>
<li>Tests Are Good Documentation</li>
<li>Tests Reduce the Cost of Change</li>
<li>Tests Improve Design</li>
<li>Tests Allow Refactoring</li>
<li>Tests Defend Against Other Programmers to make unwanted changes</li>
<li>Testing Forces You to Slow Down and Think which gives clean and simple design</li>
<li>Tests Reduce Fear of worrying about breaking existing code as you add new features<strong>.</strong></li>
</ol>
<p><strong>FlexUnit</strong></p>
<p><strong> </strong>“FlexUnit is an open source framework created by Adobe for unit testing in Flex”</p>
<p>The FlexUnit Framework allows you to create test cases and synchronous tests and evaluate test suites in a test harness application that provides a visual display of all the tests in that test suite.</p>
<p><strong>The visual display has a very clear Representation for</strong></p>
<ul>
<li>Number of Tests Run, Time Taken to Run Tests, Average assertions made per Test, Number of Errors, Failures and so on</li>
<li>It has Filter Option for results and Search functionality</li>
<li>Table View representation where we can check Result, Assrtion , expected and Actual</li>
</ul>
<p>We can Handle Events and Test Visual Components with FlexUnit</p>
<p><strong> </strong><strong>How to include FlexUnit ?</strong></p>
<p>FlexUnit is available for download on Google Code at <a href="http://code.google.com/p/as3flexunitlib/" target="_parent">http://code.google.com/p/as3flexunitlib/.After</a> you extract the file from the zip, you will find a flexunit.swc in the bin directory. You need to add this library to your project</p>
<p><strong>Important API</strong></p>
<ul>
<li><strong>TestRunnerBase</strong>() : TestRunnerBase is the default graphical test runner included with the FlexUnit Framework.</li>
</ul>
<p>Property : test ( To Add the Suite ) , startTest and</p>
<p>Event : TestCompleteEvent</p>
<ul>
<li><strong>TestSuite</strong> : TestSuite to hold the collection of tests to be run.</li>
</ul>
<p>Property : addTest , testCount(): getTestMethodNames():</p>
<ul>
<li><strong>TestCase</strong> –It defines the fixture in which to run multiple tests it inherits Assert class which provides all types of assertions(Assuptions)<strong>.</strong></li>
</ul>
<p><strong>Assertion Types</strong></p>
<ul>
<li><strong>assertEquals</strong> &#8211; Asserts that 2 values are equal.</li>
<li><strong>assertFalse</strong> &#8211; Asserts that a condition is false The first argument can be the message when the assertion fails.</li>
<li><strong>assertMatch</strong> &#8211; Asserts that a string matches a regexp.</li>
<li><strong>assertNoMatch</strong> &#8211; Asserts that a string doesn&#8217;t match a regexp.</li>
<li><strong>assertNotNull</strong> &#8211; Asserts that an object is not null.</li>
<li><strong>assertNotUndefined</strong> &#8211; Asserts that an object is not undefined.</li>
<li><strong>assertNull</strong> &#8211; Asserts that an object is null.</li>
<li><strong>assertStrictlyEquals</strong> &#8211; Asserts that two objects are strickly identical The first argument can be the message when the assertion fails Assert</li>
<li><strong>assertTrue</strong> &#8211; Asserts that a condition is true The first argument can be the message when the assertion fails Assert</li>
<li><strong>assertUndefined</strong> &#8211; Asserts that an object is undefined.</li>
</ul>
<p><strong>Steps in Writing the TestCases</strong><strong> </strong></p>
<ul>
<li>Write a single test</li>
<li>Implement just enough code to get the test to compile</li>
<li>Run the test and see it fail</li>
<li>Implement just enough code to get the test to pass</li>
<li>Run the test and see it pass</li>
<li>Refactor for clarity</li>
<li>Repeat</li>
</ul>
<p><strong> </strong><strong>Unit Testing Example</strong></p>
<p><strong>Problem :</strong>We have to make functionality of checking an opening Balance for Account. If Account is of Type saving , then the Opening balance will be 1000 and if it is of type Current Account then opening balance is 5000.</p>
<p><strong> </strong>FlexUnit is available for download on Google Code at <a href="http://code.google.com/p/as3flexunitlib/" target="_parent">http://code.google.com/p/as3flexunitlib/</a>. After you extract the file from the zip, you will find a flexunit.swc in the bin directory.</p>
<p>Now lets start a TDD process <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<ol>
<li>Create a project say TDD</li>
<li>flexunit.swc add this library to your project</li>
<li>In src Create Two Folders as testCases and utils</li>
<li>Our Application level file will be TDD .mxml</li>
</ol>
<p><strong>Step 1 : </strong></p>
<p>In TDD.mxml Create an Object of TestRunnerBase Class Give it name as &#8220;testRunner&#8221; Code will look like this</p>
<p>&lt;flexunit:TestRunnerBase width=&#8221;100%&#8221; height=&#8221;100%&#8221; /&gt;</p>
<p>Write Two Function as</p>
<p><em> </em><em>//Assigns a testSuite to the TestRunnerBase which we will start executing</em></p>
<p><em>//Called from CreationComplete Event of Application</em><strong> </strong></p>
<p><strong>private</strong> <strong>function</strong> onCreationComplete():<strong>void</strong></p>
<p>{</p>
<p>testRunner.test = createSuite();</p>
<p>testRunner.startTest();</p>
<p>}</p>
<p><strong>private</strong> <strong>function</strong> createSuite():TestSuite{</p>
<p><strong>var</strong> testSuite:TestSuite = <strong>new</strong> TestSuite();</p>
<p><strong>return</strong> testSuite;</p>
<p>}<strong> </strong></p>
<p><strong>Step 2 : </strong></p>
<p>Create a class AccountManagerTest Extends TestCase within the package testCases.Write a method “testOpeningBalance” where We will write a test cases for</p>
<p>/**</p>
<p>* Account types are</p>
<p>* s &#8211; Saving Account with minBalance = 500;</p>
<p>* c &#8211; Current Account with minBalance = 1000;</p>
<p>*</p>
<p>*/</p>
<p><strong> </strong><strong>public</strong> <strong>function</strong> testOpeningBalance():<strong>void</strong></p>
<p>{</p>
<p>}</p>
<p><strong>Step 3 : </strong></p>
<p>Create a class <em>AccountManager.</em></p>
<p>Write a two methods <strong> </strong><strong> </strong></p>
<p><strong>openAccount</strong>() &#8211; It will create a account with given type with required respective opening balance.<strong> </strong><strong> </strong></p>
<p><strong>getMinBalance</strong>() &#8211; It will return the balance of the particular Instance which we will test in our test case method testOpeningBalance method of AccountManagerTest.</p>
<p><strong> </strong><strong>The Code should look like :</strong></p>
<p><strong> </strong><strong>private</strong> <strong>var</strong> balance:int = 0;</p>
<p><strong>private</strong> <strong>var</strong> _type:String;</p>
<p><strong>public</strong> <strong>function</strong> openAccount(type:String):<strong>void</strong></p>
<p>{</p>
<p>_type = type.toLowerCase();</p>
<p>}</p>
<p><strong>public</strong> <strong>function</strong> getMinBalance():Number{</p>
<p><strong>return</strong> balance;</p>
<p>}</p>
<p><strong>Step 4 :</strong></p>
<p>Add the Tests to the testOpeningBalance method of AccountManagerTest class as</p>
<p><strong>public</strong> <strong>function</strong> testOpeningBalance():<strong>void</strong></p>
<p>{</p>
<p><strong>var</strong> validatedeposite:AccountManager = <strong>new</strong> AccountManager();</p>
<p>validatedeposite.openAccount(<strong>&#8220;S&#8221;</strong>);</p>
<p>assertEquals(<strong>&#8220;Balance after Opening Saving Account is 1000&#8243;</strong>, 1000, validatedeposite.getMinBalance());</p>
<p>validatedeposite.openAccount(<strong>&#8220;C&#8221;</strong>);</p>
<p>assertEquals(<strong>&#8220;Balance after Opening Current Account is 5000&#8243;</strong>, 5000, validatedeposite.getMinBalance());</p>
<p>}</p>
<p>Now Run The Project see that the Test Case Fails</p>
<p><strong>Step 5 :</strong></p>
<p>Now implement just enough code so that the testCase Passes.</p>
<p>For this rewrite the method openAccount() in <em>AccountManager</em> class so that the testCase passes.</p>
<p>The Code looks like this,<strong> </strong></p>
<p><strong>public</strong> <strong>function</strong> openAccount(type:String):<strong>void</strong></p>
<p>{</p>
<p>_type = type.toLowerCase();</p>
<p><strong>if</strong>(_type==<strong>&#8216;s&#8217;</strong>)</p>
<p>{</p>
<p>balance = 1000;</p>
<p>}<strong>else</strong> <strong>if</strong>(_type==<strong>&#8216;c&#8217;</strong>)</p>
<p>{</p>
<p>balance = 5000;</p>
<p>}</p>
<p>}</p>
<p>Run the Project again Test Case Passes</p>
<p>Now I guess You are Rocking with Flex Unit Hurrey.</p>
<p><span style="text-decoration:underline;"><strong>Download Links are As Follows</strong></span></p>
<p><a title="Flex Unit Sample Application" href="http://shashankkulkarni.files.wordpress.com/2009/03/flexunit.doc" target="_blank">flexUnit Sample Application zipped and renamed</a></p>
<p>(Download the file and rename .doc by .zip)</p>
<p><strong>All Flex Unit Resources can be found at</strong></p>
<p><a title="Flex Unit Resources" href="https://opensource.adobe.com/wiki/display/flexunit/Developer+Documentation" target="_blank"><strong>http://opensource.adobe.com/wiki/display/flexunit/Developer+Documentation</strong> </a></p>
<p>Say Cheese</p>
<p>Thanks and regards</p>
<p>Shashank Kulkarni.</p>
<p>Feel free to comment on the post <img src="http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif" alt=":)" /></p>
<a name="pd_a_1451676"></a><div class="PDS_Poll" id="PDI_container1451676" style="display:inline-block;"></div><div id="PD_superContainer"></div><noscript><a href="http://polldaddy.com/poll/1451676">Take Our Poll</a></noscript>
<p><a class="alignleft" title="Download FlexUnit Presentation" href="http://shashankkulkarni.files.wordpress.com/2009/03/flexunit.ppt" target="_blank">Download FlexUnit Presentation</a></p>
<br />Posted in FLEX Tagged: Flex Unit, Flex Unit Framework, Flex Unit Framework *.ppt, Unit Testing, Unit Testing Framework in Flex, unit Testing in Flex, Unit Testing with FlexUnit <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shashankkulkarni.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shashankkulkarni.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shashankkulkarni.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shashankkulkarni.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/shashankkulkarni.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/shashankkulkarni.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/shashankkulkarni.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/shashankkulkarni.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shashankkulkarni.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shashankkulkarni.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shashankkulkarni.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shashankkulkarni.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shashankkulkarni.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shashankkulkarni.wordpress.com/49/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shashankkulkarni.com&amp;blog=3545189&amp;post=49&amp;subd=shashankkulkarni&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://shashankkulkarni.com/2009/03/05/49/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/040bba77afa61996772c4c353cb2f3f0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shank</media:title>
		</media:content>

		<media:content url="http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif" medium="image">
			<media:title type="html">:)</media:title>
		</media:content>
	</item>
		<item>
		<title>Adding ToolTip to Datagrid and Combobox</title>
		<link>http://shashankkulkarni.com/2008/09/27/adding-tooltip-to-datagrid-and-combobox/</link>
		<comments>http://shashankkulkarni.com/2008/09/27/adding-tooltip-to-datagrid-and-combobox/#comments</comments>
		<pubDate>Sat, 27 Sep 2008 13:18:09 +0000</pubDate>
		<dc:creator>shashankkulkarni</dc:creator>
				<category><![CDATA[Best of Flex Utillity]]></category>
		<category><![CDATA[Adding ToolTip to Datagrid and Combobox]]></category>

		<guid isPermaLink="false">http://shashankkulkarni.wordpress.com/?p=27</guid>
		<description><![CDATA[Adding Tool Tips to Datagrid and Combobox Guess How Can we do it  ,,, Dont Worry we have solution just check this   just add the property itemRenderer=”mx.controls.Label” and Your Done Best Luck Thanks and regards Shashank Kulkarni Feel free to mail me shashank.pawan@gmail.com Posted in Best of Flex Utillity Tagged: Adding ToolTip to Datagrid [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shashankkulkarni.com&amp;blog=3545189&amp;post=27&amp;subd=shashankkulkarni&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div class="entry">
<div class="snap_preview">
<p>Adding Tool Tips to Datagrid and Combobox <img class="wp-smiley" src="https://s-ssl.wordpress.com/wp-includes/images/smilies/icon_smile.gif" alt=")" /> Guess How Can we do it  ,,, Dont Worry we have solution just check this <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   just add the property itemRenderer=”mx.controls.Label” and Your Done</p>
<p><pre class="brush: css;">
&lt;?xml version=”1.0″ encoding=”utf-8″?&gt;

&lt;!– Adding Tooltips to Data grid and Combobox –&gt;
&lt;mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml”
layout=”vertical”
verticalAlign=”middle”
backgroundColor=”white”&gt;

&lt;mx:XML id=”cmbDP”&gt;
&lt;nodes&gt;
&lt;node Alphabets=”Akola”/&gt;
&lt;node Alphabets=”Buldhana”/&gt;
&lt;node Alphabets=”Chikhli”/&gt;
&lt;node Alphabets=”Dhule”/&gt;
&lt;node Alphabets=”Elora”/&gt;
&lt;/nodes&gt;
&lt;/mx:XML&gt;

&lt;mx:XML id=”dataGridDP”&gt;
&lt;nodes&gt;
&lt;node Alphabets=”A” A-ZString=”The quick brown fox jumped over the lazy dog” /&gt;
&lt;node Alphabets=”B” A-ZString=”The quick brown fox jumped over the lazy dog” /&gt;
&lt;node Alphabets=”C” A-ZString=”The quick brown fox jumped over the lazy dog” /&gt;
&lt;node Alphabets=”D” A-ZString=”The quick brown fox jumped over the lazy dog” /&gt;
&lt;node Alphabets=”E” A-ZString=”The quick brown fox jumped over the lazy dog” /&gt;
&lt;/nodes&gt;
&lt;/mx:XML&gt;

&lt;mx:DataGrid id=”dataGrid”
dataProvider=”{dataGridDP.node}”
width=”300″
height=”200″&gt;
&lt;mx:columns&gt;
&lt;mx:DataGridColumn dataField=”@Alphabets” itemRenderer=”mx.controls.Label”
headerText=”Alphabets”
headerRenderer=”mx.controls.Label” /&gt;
&lt;mx:DataGridColumn dataField=”@A-ZString” itemRenderer=”mx.controls.Label”
headerText=”Lines Containing the A-Z Alphabets Check it”
headerRenderer=”mx.controls.Label” &gt;

&lt;/mx:DataGridColumn&gt;

&lt;/mx:columns&gt;
&lt;/mx:DataGrid&gt;

&lt;mx:ComboBox id=”cmb”  width=”60″ toolTip=”{cmb.selectedLabel}” labelField=”@Alphabets” dataProvider=”{cmbDP.node}” itemRenderer=”mx.controls.Label”/&gt;

&lt;/mx:Application&gt;
</pre></p>
<p>Best Luck<br />
<strong>Thanks and regards</strong></p>
<p><strong>Shashank Kulkarni</strong></p>
<p>Feel free to mail me <img class="wp-smiley" src="https://s-ssl.wordpress.com/wp-includes/images/smilies/icon_smile.gif" alt=")" /> <a href="mailto:shashank.pawan@gmail.com"><span style="color:#666666;">shashank.pawan@gmail.com</span></a></div>
</div>
<br />Posted in Best of Flex Utillity Tagged: Adding ToolTip to Datagrid and Combobox <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shashankkulkarni.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shashankkulkarni.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shashankkulkarni.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shashankkulkarni.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/shashankkulkarni.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/shashankkulkarni.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/shashankkulkarni.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/shashankkulkarni.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shashankkulkarni.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shashankkulkarni.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shashankkulkarni.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shashankkulkarni.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shashankkulkarni.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shashankkulkarni.wordpress.com/27/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shashankkulkarni.com&amp;blog=3545189&amp;post=27&amp;subd=shashankkulkarni&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://shashankkulkarni.com/2008/09/27/adding-tooltip-to-datagrid-and-combobox/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/040bba77afa61996772c4c353cb2f3f0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shank</media:title>
		</media:content>

		<media:content url="https://s-ssl.wordpress.com/wp-includes/images/smilies/icon_smile.gif" medium="image">
			<media:title type="html">)</media:title>
		</media:content>

		<media:content url="https://s-ssl.wordpress.com/wp-includes/images/smilies/icon_smile.gif" medium="image">
			<media:title type="html">)</media:title>
		</media:content>
	</item>
		<item>
		<title>Searching an item within Array, Arraycollection</title>
		<link>http://shashankkulkarni.com/2008/08/26/searching-an-item-within-array-arraycollection/</link>
		<comments>http://shashankkulkarni.com/2008/08/26/searching-an-item-within-array-arraycollection/#comments</comments>
		<pubDate>Tue, 26 Aug 2008 14:07:15 +0000</pubDate>
		<dc:creator>shashankkulkarni</dc:creator>
				<category><![CDATA[Best of Flex Utillity]]></category>
		<category><![CDATA[Arraycollection]]></category>
		<category><![CDATA[Searching an item within Array]]></category>
		<category><![CDATA[Searching the litem within list item]]></category>

		<guid isPermaLink="false">http://shashankkulkarni.wordpress.com/?p=23</guid>
		<description><![CDATA[Searching Within the Array We all know Array and Arraycollection provides the facilities of doing sort in themselves but some times there are needs to search the Array/Arraycollection depending on the entered search term. So that is something which we need to implement. So here is the simple logic to search the item in the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shashankkulkarni.com&amp;blog=3545189&amp;post=23&amp;subd=shashankkulkarni&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal"><strong>Searching Within the Array</strong></p>
<p class="MsoNormal">We all know Array and Arraycollection provides the facilities of doing sort in themselves but some times there are needs to search the Array/Arraycollection depending on the entered search term. So that is something which we need to implement. So here is the simple logic to search the item in the Array/Arraycollection</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">&lt;?xml version=&#8221;1.0&#8243;?&gt;</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">&lt;mx:Application</span><span style="font-size:10pt;font-family:&quot;"> xmlns:mx=&#8221;</span><span style="font-size:10pt;font-family:&quot;">http://www.adobe.com/2006/mxml</span><span style="font-size:10pt;font-family:&quot;">&#8221; layout=&#8221;</span><span style="font-size:10pt;font-family:&quot;">absolute</span><span style="font-size:10pt;font-family:&quot;">&#8221; initialize=&#8221;initApp()&#8221;</span><span style="font-size:10pt;font-family:&quot;">&gt;</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;"><span> </span></span><span style="font-size:10pt;font-family:&quot;">&lt;!&#8211;Shashank Kulkarni&#8211;&gt;</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;"><span> </span></span><span style="font-size:10pt;font-family:&quot;">&lt;mx:Script&gt;</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;"><span> </span>&lt;![CDATA[</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;"><span> </span><span> </span></span><strong><span style="font-size:10pt;font-family:&quot;">import</span></strong><span style="font-size:10pt;font-family:&quot;"> mx.utils.StringUtil;</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;"><span> </span><span> </span></span><strong><span style="font-size:10pt;font-family:&quot;">import</span></strong><span style="font-size:10pt;font-family:&quot;"> mx.utils.ObjectUtil;</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;"><span> </span><span> </span></span><strong><span style="font-size:10pt;font-family:&quot;">import</span></strong><span style="font-size:10pt;font-family:&quot;"> mx.controls.Alert;</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;"><span> </span></span><strong><span style="font-size:10pt;font-family:&quot;">import</span></strong><span style="font-size:10pt;font-family:&quot;"> mx.collections.ArrayCollection;</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;"><span> </span></span><span style="font-size:10pt;font-family:&quot;"><span> </span></span><strong><span style="font-size:10pt;font-family:&quot;">private</span></strong><span style="font-size:10pt;font-family:&quot;"> </span><strong><span style="font-size:10pt;font-family:&quot;">var</span></strong><span style="font-size:10pt;font-family:&quot;"> arr:Array= </span><strong><span style="font-size:10pt;font-family:&quot;">new</span></strong><span style="font-size:10pt;font-family:&quot;"> Array(</span><strong><span style="font-size:10pt;font-family:&quot;">'Shashank'</span></strong><span style="font-size:10pt;font-family:&quot;">, </span><strong><span style="font-size:10pt;font-family:&quot;">'Tushar'</span></strong><span style="font-size:10pt;font-family:&quot;">, </span><strong><span style="font-size:10pt;font-family:&quot;">'Ashish'</span></strong><span style="font-size:10pt;font-family:&quot;">,</span><strong><span style="font-size:10pt;font-family:&quot;">'Kailas'</span></strong><span style="font-size:10pt;font-family:&quot;">,</span><strong><span style="font-size:10pt;font-family:&quot;">'Rahul'</span></strong><span style="font-size:10pt;font-family:&quot;">,</span><strong><span style="font-size:10pt;font-family:&quot;">'Pankaj'</span></strong><span style="font-size:10pt;font-family:&quot;">,</span><strong><span style="font-size:10pt;font-family:&quot;">'Shrikant'</span></strong><span style="font-size:10pt;font-family:&quot;">,</span><strong><span style="font-size:10pt;font-family:&quot;">'Amol'</span></strong><span style="font-size:10pt;font-family:&quot;">,</span><strong><span style="font-size:10pt;font-family:&quot;">'pravin'</span></strong><span style="font-size:10pt;font-family:&quot;">);</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;"><span> </span>[</span><strong><span style="font-size:10pt;font-family:&quot;">Bindable</span></strong><span style="font-size:10pt;font-family:&quot;">]</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;"><span> </span></span><strong><span style="font-size:10pt;font-family:&quot;">private</span></strong><span style="font-size:10pt;font-family:&quot;"> </span><strong><span style="font-size:10pt;font-family:&quot;">var</span></strong><span style="font-size:10pt;font-family:&quot;"> ac:ArrayCollection= </span><strong><span style="font-size:10pt;font-family:&quot;">new</span></strong><span style="font-size:10pt;font-family:&quot;"> ArrayCollection([{Name:</span><strong><span style="font-size:10pt;font-family:&quot;">'Shashank'</span></strong><span style="font-size:10pt;font-family:&quot;">}, {Name:</span><strong><span style="font-size:10pt;font-family:&quot;">'Tushar'</span></strong><span style="font-size:10pt;font-family:&quot;">}, {Name:</span><strong><span style="font-size:10pt;font-family:&quot;">'Ashish'</span></strong><span style="font-size:10pt;font-family:&quot;">},{Name:</span><strong><span style="font-size:10pt;font-family:&quot;">'Kailas'</span></strong><span style="font-size:10pt;font-family:&quot;">},{Name:</span><strong><span style="font-size:10pt;font-family:&quot;">'Rahul'</span></strong><span style="font-size:10pt;font-family:&quot;">},{Name:</span><strong><span style="font-size:10pt;font-family:&quot;">'Pankaj'</span></strong><span style="font-size:10pt;font-family:&quot;">},{Name:</span><strong><span style="font-size:10pt;font-family:&quot;">'Shrikant'</span></strong><span style="font-size:10pt;font-family:&quot;">},{Name:</span><strong><span style="font-size:10pt;font-family:&quot;">'Amol'</span></strong><span style="font-size:10pt;font-family:&quot;">},{Name:</span><strong><span style="font-size:10pt;font-family:&quot;">'pravin'</span></strong><span style="font-size:10pt;font-family:&quot;">}]);</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;"><span> </span></span><span style="font-size:10pt;font-family:&quot;"><span> </span></span><strong><span style="font-size:10pt;font-family:&quot;">private</span></strong><span style="font-size:10pt;font-family:&quot;"> </span><strong><span style="font-size:10pt;font-family:&quot;">var</span></strong><span style="font-size:10pt;font-family:&quot;"> resultAC:Array;</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;"> </span><span style="font-size:10pt;font-family:&quot;"> </span><strong><span style="font-size:10pt;font-family:&quot;">private</span></strong><span style="font-size:10pt;font-family:&quot;"> </span><strong><span style="font-size:10pt;font-family:&quot;">function</span></strong><span style="font-size:10pt;font-family:&quot;"> initApp():</span><strong><span style="font-size:10pt;font-family:&quot;">void</span></strong></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">{</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">dgList.dataProvider = ac;</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">txtResult.text = </span><strong><span style="font-size:10pt;font-family:&quot;">&#8221;</span></strong><span style="font-size:10pt;font-family:&quot;">;</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">txiSearch.text = </span><strong><span style="font-size:10pt;font-family:&quot;">&#8221;</span></strong><span style="font-size:10pt;font-family:&quot;">;</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">}</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;"> </span><span style="font-size:10pt;font-family:&quot;"> </span><strong><span style="font-size:10pt;font-family:&quot;">private</span></strong><span style="font-size:10pt;font-family:&quot;"> </span><strong><span style="font-size:10pt;font-family:&quot;">function</span></strong><span style="font-size:10pt;font-family:&quot;"> search():</span><strong><span style="font-size:10pt;font-family:&quot;">void</span></strong></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">{</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">resultAC =<span> </span></span><strong><span style="font-size:10pt;font-family:&quot;">new</span></strong><span style="font-size:10pt;font-family:&quot;"> Array();</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;"> </span><strong><span style="font-size:10pt;font-family:&quot;">for</span></strong><span style="font-size:10pt;font-family:&quot;">(</span><strong><span style="font-size:10pt;font-family:&quot;">var</span></strong><span style="font-size:10pt;font-family:&quot;"> i:int=0;i&lt;arr.length;i++)</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">{</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;"> </span><strong><span style="font-size:10pt;font-family:&quot;">var</span></strong><span style="font-size:10pt;font-family:&quot;"> tempArr:Array = </span><strong><span style="font-size:10pt;font-family:&quot;">new</span></strong><span style="font-size:10pt;font-family:&quot;"> Array();</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;"> </span><span style="font-size:10pt;font-family:&quot;"> </span><strong><span style="font-size:10pt;font-family:&quot;">var</span></strong><span style="font-size:10pt;font-family:&quot;"> str:String = String(arr[i]).toLowerCase();</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;"> </span><span style="font-size:10pt;font-family:&quot;">tempArr = str.match(StringUtil.trim(txiSearch.text).toLowerCase());</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;"> </span><strong><span style="font-size:10pt;font-family:&quot;">if</span></strong><span style="font-size:10pt;font-family:&quot;">(tempArr!=</span><strong><span style="font-size:10pt;font-family:&quot;">null</span></strong><span style="font-size:10pt;font-family:&quot;">)</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">{</span></p>
<p class="MsoNormal"><strong><span style="font-size:10pt;font-family:&quot;">if</span></strong><span style="font-size:10pt;font-family:&quot;">(tempArr.index==0)</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">{</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">resultAC.push({Name:arr[i]});</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">}</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">}</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">}</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">assignValues();</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">}</span></p>
<p class="MsoNormal"> <strong><span style="font-size:10pt;font-family:&quot;">private</span></strong><span style="font-size:10pt;font-family:&quot;"> </span><strong><span style="font-size:10pt;font-family:&quot;">function</span></strong><span style="font-size:10pt;font-family:&quot;"> searchAc():</span><strong><span style="font-size:10pt;font-family:&quot;">void</span></strong></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">{</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">resultAC =<span> </span></span><strong><span style="font-size:10pt;font-family:&quot;">new</span></strong><span style="font-size:10pt;font-family:&quot;"> Array();</span></p>
<p class="MsoNormal"><strong><span style="font-size:10pt;font-family:&quot;">for</span></strong><span style="font-size:10pt;font-family:&quot;">(</span><strong><span style="font-size:10pt;font-family:&quot;">var</span></strong><span style="font-size:10pt;font-family:&quot;"> i:int=0;i&lt;ac.length;i++)</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">{</span></p>
<p class="MsoNormal"><strong><span style="font-size:10pt;font-family:&quot;">var</span></strong><span style="font-size:10pt;font-family:&quot;"> tempArr:Array = </span><strong><span style="font-size:10pt;font-family:&quot;">new</span></strong><span style="font-size:10pt;font-family:&quot;"> Array();</span></p>
<p class="MsoNormal"> <strong><span style="font-size:10pt;font-family:&quot;">var</span></strong><span style="font-size:10pt;font-family:&quot;"> str:String = String(ac[i].Name).toLowerCase();</span></p>
<p class="MsoNormal"> <span style="font-size:10pt;font-family:&quot;">tempArr = str.match(StringUtil.trim(txiSearch.text).toLowerCase());</span></p>
<p class="MsoNormal"> <strong><span style="font-size:10pt;font-family:&quot;">if</span></strong><span style="font-size:10pt;font-family:&quot;">(tempArr!=</span><strong><span style="font-size:10pt;font-family:&quot;">null</span></strong><span style="font-size:10pt;font-family:&quot;">)</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">{</span></p>
<p class="MsoNormal"><strong><span style="font-size:10pt;font-family:&quot;">if</span></strong><span style="font-size:10pt;font-family:&quot;">(tempArr.index==0)</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">{</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;"> </span><span style="font-size:10pt;font-family:&quot;">resultAC.push({Name:ac[i].Name});</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">}</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">}</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">}</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">assignValues();</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">}</span> </p>
<p class="MsoNormal"><strong><span style="font-size:10pt;font-family:&quot;">private</span></strong><span style="font-size:10pt;font-family:&quot;"> </span><strong><span style="font-size:10pt;font-family:&quot;">function</span></strong><span style="font-size:10pt;font-family:&quot;"> assignValues():</span><strong><span style="font-size:10pt;font-family:&quot;">void</span></strong></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">{</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">dgList.dataProvider = resultAC;</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">txtResult.text = </span><strong><span style="font-size:10pt;font-family:&quot;">&#8221;</span></strong><span style="font-size:10pt;font-family:&quot;">;</span></p>
<p class="MsoNormal"><strong><span style="font-size:10pt;font-family:&quot;">for</span></strong><span style="font-size:10pt;font-family:&quot;">(</span><strong><span style="font-size:10pt;font-family:&quot;">var</span></strong><span style="font-size:10pt;font-family:&quot;"> j:int=0;j&lt;resultAC.length;j++)</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">{</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">txtResult.text = txtResult.text + ObjectUtil.toString(resultAC[j].Name);</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">}</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">}</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">]]&gt;</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">&lt;/mx:Script&gt;</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">&lt;mx:Label</span><span style="font-size:10pt;font-family:&quot;"> text=&#8221;</span><span style="font-size:10pt;font-family:&quot;">Enter Search Term :</span><span style="font-size:10pt;font-family:&quot;">&#8221; x=&#8221;</span><span style="font-size:10pt;font-family:&quot;">116</span><span style="font-size:10pt;font-family:&quot;">&#8221; y=&#8221;</span><span style="font-size:10pt;font-family:&quot;">26</span><span style="font-size:10pt;font-family:&quot;">&#8220;</span><span style="font-size:10pt;font-family:&quot;">/&gt;</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">&lt;mx:TextInput</span><span style="font-size:10pt;font-family:&quot;"> id=&#8221;</span><span style="font-size:10pt;font-family:&quot;">txiSearch</span><span style="font-size:10pt;font-family:&quot;">&#8221; x=&#8221;</span><span style="font-size:10pt;font-family:&quot;">284</span><span style="font-size:10pt;font-family:&quot;">&#8221; y=&#8221;</span><span style="font-size:10pt;font-family:&quot;">24</span><span style="font-size:10pt;font-family:&quot;">&#8221; enter=&#8221;search()&#8221;</span><span style="font-size:10pt;font-family:&quot;">/&gt;</span></p>
<p class="MsoNormal"> <span style="font-size:10pt;font-family:&quot;">&lt;mx:Button</span><span style="font-size:10pt;font-family:&quot;"> id=&#8221;</span><span style="font-size:10pt;font-family:&quot;">Search</span><span style="font-size:10pt;font-family:&quot;">&#8221; label=&#8221;</span><span style="font-size:10pt;font-family:&quot;">Search Array Item</span><span style="font-size:10pt;font-family:&quot;">&#8221; click=&#8221;search()&#8221; x=&#8221;</span><span style="font-size:10pt;font-family:&quot;">114</span><span style="font-size:10pt;font-family:&quot;">&#8221; y=&#8221;</span><span style="font-size:10pt;font-family:&quot;">65</span><span style="font-size:10pt;font-family:&quot;">&#8220;</span><span style="font-size:10pt;font-family:&quot;">/&gt;</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">&lt;mx:Button</span><span style="font-size:10pt;font-family:&quot;"> id=&#8221;</span><span style="font-size:10pt;font-family:&quot;">SearchAc</span><span style="font-size:10pt;font-family:&quot;">&#8221; label=&#8221;</span><span style="font-size:10pt;font-family:&quot;">Search ArrayCollection Item</span><span style="font-size:10pt;font-family:&quot;">&#8221; click=&#8221;searchAc()&#8221;<span> </span>x=&#8221;</span><span style="font-size:10pt;font-family:&quot;">280</span><span style="font-size:10pt;font-family:&quot;">&#8221; y=&#8221;</span><span style="font-size:10pt;font-family:&quot;">65</span><span style="font-size:10pt;font-family:&quot;">&#8220;</span><span style="font-size:10pt;font-family:&quot;">/&gt;</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">&lt;mx:Text</span><span style="font-size:10pt;font-family:&quot;"> x=&#8221;</span><span style="font-size:10pt;font-family:&quot;">174</span><span style="font-size:10pt;font-family:&quot;">&#8221; y=&#8221;</span><span style="font-size:10pt;font-family:&quot;">139</span><span style="font-size:10pt;font-family:&quot;">&#8221; id=&#8221;</span><span style="font-size:10pt;font-family:&quot;">txtResult</span><span style="font-size:10pt;font-family:&quot;">&#8220;</span><span style="font-size:10pt;font-family:&quot;">/&gt;</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">&lt;mx:Label</span><span style="font-size:10pt;font-family:&quot;"> x=&#8221;</span><span style="font-size:10pt;font-family:&quot;">477</span><span style="font-size:10pt;font-family:&quot;">&#8221; y=&#8221;</span><span style="font-size:10pt;font-family:&quot;">26</span><span style="font-size:10pt;font-family:&quot;">&#8221; text=&#8221;</span><span style="font-size:10pt;font-family:&quot;">Searches Within Array On Direct Enter</span><span style="font-size:10pt;font-family:&quot;">&#8220;</span><span style="font-size:10pt;font-family:&quot;">/&gt;</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">&lt;mx:DataGrid</span><span style="font-size:10pt;font-family:&quot;"> x=&#8221;</span><span style="font-size:10pt;font-family:&quot;">153</span><span style="font-size:10pt;font-family:&quot;">&#8221; y=&#8221;</span><span style="font-size:10pt;font-family:&quot;">195</span><span style="font-size:10pt;font-family:&quot;">&#8221; id=&#8221;</span><span style="font-size:10pt;font-family:&quot;">dgList</span><span style="font-size:10pt;font-family:&quot;">&#8220;</span><span style="font-size:10pt;font-family:&quot;">&gt;</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">&lt;mx:columns&gt;</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">&lt;mx:DataGridColumn</span><span style="font-size:10pt;font-family:&quot;"> headerText=&#8221;</span><span style="font-size:10pt;font-family:&quot;">Name</span><span style="font-size:10pt;font-family:&quot;">&#8221; dataField=&#8221;</span><span style="font-size:10pt;font-family:&quot;">Name</span><span style="font-size:10pt;font-family:&quot;">&#8220;</span><span style="font-size:10pt;font-family:&quot;">/&gt;</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">&lt;/mx:columns&gt;</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">&lt;/mx:DataGrid&gt;</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;">&lt;mx:Button</span><span style="font-size:10pt;font-family:&quot;"> x=&#8221;</span><span style="font-size:10pt;font-family:&quot;">341</span><span style="font-size:10pt;font-family:&quot;">&#8221; y=&#8221;</span><span style="font-size:10pt;font-family:&quot;">247</span><span style="font-size:10pt;font-family:&quot;">&#8221; label=&#8221;</span><span style="font-size:10pt;font-family:&quot;">Refresh</span><span style="font-size:10pt;font-family:&quot;">&#8221; click=&#8221;initApp()&#8221;</span><span style="font-size:10pt;font-family:&quot;">/&gt;</span></p>
<p class="MsoNormal"> <span style="font-size:10pt;font-family:&quot;">&lt;/mx:Application&gt;</span></p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
<p>Best Luck   <img class="wp-smiley" src="http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif" alt=")" width="15" height="15" /></p>
<p><strong>Thanks and regards</strong></p>
<p><strong>Shashank Kulkarni</strong></p>
<p>Feel free to mail me <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  <a href="mailto:shashank.pawan@gmail.com"><span style="color:#666666;">shashank.pawan@gmail.com</span></a></p>
<p class="MsoNormal"> </p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/shashankkulkarni.wordpress.com/23/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/shashankkulkarni.wordpress.com/23/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shashankkulkarni.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shashankkulkarni.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shashankkulkarni.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shashankkulkarni.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/shashankkulkarni.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/shashankkulkarni.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/shashankkulkarni.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/shashankkulkarni.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shashankkulkarni.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shashankkulkarni.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shashankkulkarni.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shashankkulkarni.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shashankkulkarni.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shashankkulkarni.wordpress.com/23/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shashankkulkarni.com&amp;blog=3545189&amp;post=23&amp;subd=shashankkulkarni&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://shashankkulkarni.com/2008/08/26/searching-an-item-within-array-arraycollection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/040bba77afa61996772c4c353cb2f3f0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">shank</media:title>
		</media:content>

		<media:content url="http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif" medium="image">
			<media:title type="html">)</media:title>
		</media:content>
	</item>
	</channel>
</rss>
