<?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>Charlie&#039;s Flex Blog</title>
	<atom:link href="http://charliesflexblog.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://charliesflexblog.wordpress.com</link>
	<description>painfully learning flex, actionscript, and sqlite</description>
	<lastBuildDate>Wed, 31 Mar 2010 12:31:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='charliesflexblog.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Charlie&#039;s Flex Blog</title>
		<link>http://charliesflexblog.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://charliesflexblog.wordpress.com/osd.xml" title="Charlie&#039;s Flex Blog" />
	<atom:link rel='hub' href='http://charliesflexblog.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Weird SQLite ADL crash UPDATE</title>
		<link>http://charliesflexblog.wordpress.com/2010/03/31/weird-sqlite-adl-crash-update/</link>
		<comments>http://charliesflexblog.wordpress.com/2010/03/31/weird-sqlite-adl-crash-update/#comments</comments>
		<pubDate>Wed, 31 Mar 2010 12:31:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[1]]></category>

		<guid isPermaLink="false">http://charliesflexblog.wordpress.com/?p=47</guid>
		<description><![CDATA[So now that I&#8217;ve tracked down the location of the bug, the question is what is the cause? I tried the original query directly in the SQLite manager, and it threw a weird error: misuse of aggregate So I removed the SUM from the query, and it worked fine. Except that using SUM against the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=charliesflexblog.wordpress.com&amp;blog=11337048&amp;post=47&amp;subd=charliesflexblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>So now that I&#8217;ve tracked down the location of the bug, the question is what is the cause? I tried the original query directly in the SQLite manager, and it threw a weird error:</p>
<p>misuse of aggregate</p>
<p>So I removed the SUM from the query, and it worked fine. Except that using SUM against the same column works fine in other queries, so I know it&#8217;s not a SUM issue. It&#8217;s just the error message SQLite decided to show me, to throw me off its trail&#8230;anyway, here&#8217;s what I found.</p>
<p>I frequently rename columns, like Select SUM(FileDuration) as &#8216;duration&#8217;. In this case, I have a Group By FileName, and I want the sum of the file durations for each grouped filename. In theory, that&#8217;s not a problem.</p>
<p>In practice, SQLite doesn&#8217;t like it when you use the alias &#8216;duration&#8217; for comparisons in the Where clause, like</p>
<p>&#8221; AND duration &gt; 0 &#8220;.</p>
<p>I changed that to<br />
And FileDuration &gt; 0, and the error went away.</p>
<p>Interestingly, using the alias in the Order By clause works fine</p>
<p>Order by duration DESC</p>
<p>So the rule is this: use the original column name for comparisons in the WHERE clause, and leave the alias out of it. I have no idea why.</p>
<br />Filed under: <a href='http://charliesflexblog.wordpress.com/category/1/'>1</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/charliesflexblog.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/charliesflexblog.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/charliesflexblog.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/charliesflexblog.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/charliesflexblog.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/charliesflexblog.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/charliesflexblog.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/charliesflexblog.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/charliesflexblog.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/charliesflexblog.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/charliesflexblog.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/charliesflexblog.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/charliesflexblog.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/charliesflexblog.wordpress.com/47/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=charliesflexblog.wordpress.com&amp;blog=11337048&amp;post=47&amp;subd=charliesflexblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://charliesflexblog.wordpress.com/2010/03/31/weird-sqlite-adl-crash-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/11b432e30c1149ad5057db42638391ba?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">charliecrystle</media:title>
		</media:content>
	</item>
		<item>
		<title>Weird ADL Crash with SQL Execute</title>
		<link>http://charliesflexblog.wordpress.com/2010/03/31/weird-adl-crash-with-sql-execute/</link>
		<comments>http://charliesflexblog.wordpress.com/2010/03/31/weird-adl-crash-with-sql-execute/#comments</comments>
		<pubDate>Wed, 31 Mar 2010 12:17:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[1]]></category>

		<guid isPermaLink="false">http://charliesflexblog.wordpress.com/?p=44</guid>
		<description><![CDATA[So, I&#8217;m about 4500 lines of code into this project. And this morning, I start getting a hard crash of ADL&#8211;windows terminating the process, etc, etc. Nasty stuff.  This isn&#8217;t the one where ADL doesn&#8217;t properly terminate and hangs in memory until you kill it in Task Manager. Nah. Worse. I think I&#8217;m hosed because [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=charliesflexblog.wordpress.com&amp;blog=11337048&amp;post=44&amp;subd=charliesflexblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>So, I&#8217;m about 4500 lines of code into this project. And this morning, I start getting a hard crash of ADL&#8211;windows terminating the process, etc, etc. Nasty stuff.  This isn&#8217;t the one where ADL doesn&#8217;t properly terminate and hangs in memory until you kill it in Task Manager. Nah.</p>
<p>Worse.</p>
<p>I think I&#8217;m hosed because it&#8217;s crashing during the init processes, and can&#8217;t debug or run the app. I just updated Java, so I&#8217;m thinking it&#8217;s that. Wrong&#8211;I&#8217;m looking for external reasons because it feels, well, just wrong that it would be in code, because I&#8217;ve never experienced the debugger outright crashing and the app failing to run.</p>
<p>Until today.</p>
<p>For some reason I decide to step through the code. And it lets me do it. So I track down the line where it crashes, and it&#8217;s a sql execute statement. It won&#8217;t let me step into the function, so I comment it out, and the app runs, no crashes, except now I don&#8217;t have data for 25% of the app.</p>
<p>I just found the issue: SQLite doesn&#8217;t like my application of the SUM function. I removed it, uncommented the offending line, and voila, it works.</p>
<p>Except I need the SUM, so I need to figure that out.</p>
<p>The point is, though, that if SQLite doesn&#8217;t like something, AIR &amp; ADL shouldn&#8217;t crash. Dear Mr Adobe, please fix this.</p>
<br />Filed under: <a href='http://charliesflexblog.wordpress.com/category/1/'>1</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/charliesflexblog.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/charliesflexblog.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/charliesflexblog.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/charliesflexblog.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/charliesflexblog.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/charliesflexblog.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/charliesflexblog.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/charliesflexblog.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/charliesflexblog.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/charliesflexblog.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/charliesflexblog.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/charliesflexblog.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/charliesflexblog.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/charliesflexblog.wordpress.com/44/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=charliesflexblog.wordpress.com&amp;blog=11337048&amp;post=44&amp;subd=charliesflexblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://charliesflexblog.wordpress.com/2010/03/31/weird-adl-crash-with-sql-execute/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/11b432e30c1149ad5057db42638391ba?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">charliecrystle</media:title>
		</media:content>
	</item>
		<item>
		<title>Trace an Array Collection Contents</title>
		<link>http://charliesflexblog.wordpress.com/2010/03/31/trace-an-array-collection-contents/</link>
		<comments>http://charliesflexblog.wordpress.com/2010/03/31/trace-an-array-collection-contents/#comments</comments>
		<pubDate>Wed, 31 Mar 2010 09:57:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[1]]></category>

		<guid isPermaLink="false">http://charliesflexblog.wordpress.com/?p=42</guid>
		<description><![CDATA[This is one of those things I wish I had known, oh, 5 months ago when I started. Let&#8217;s see&#8230;you populate an array collection, and it&#8217;s not quite working the way you want, so you want to see the contents of it. Typically I&#8217;d create a loop, assign each row to an object, and trace [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=charliesflexblog.wordpress.com&amp;blog=11337048&amp;post=42&amp;subd=charliesflexblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is one of those things I wish I had known, oh, 5 months ago when I started. Let&#8217;s see&#8230;you populate an array collection, and it&#8217;s not quite working the way you want, so you want to see the contents of it. Typically I&#8217;d create a loop, assign each row to an object, and trace the object contents.</p>
<p>No need, apparently.</p>
<p>trace(myAC)</p>
<p>Yep. That&#8217;s it.</p>
<p>Nowhere in the documentation&#8211;at least that I could find. And it&#8217;s dead simple, and gives a great view of the number of items and the contents.</p>
<p>Here&#8217;s another way if you want to get more granular:</p>
<p><span style="color:#008000;">//the arraycollection contains two columns&#8211;filename and filedate. You can use dot notation, but the column names<br />
</span><span style="color:#008000;"><span style="color:#008000;">//will not appear as you type. The object column names have to match the array column names or Flex will throw a</span>n error. </span></p>
<div id="_mcePaste"><span style="color:#3366ff;">for (i=0; i &lt; myAC.length;i++)</span></div>
<div id="_mcePaste"><span style="color:#3366ff;">{</span></div>
<div id="_mcePaste"><span style="color:#3366ff;"> var row:Object = myAC.source[i];</span></div>
<div id="_mcePaste"><span style="color:#3366ff;"> myFile= &#8220;file_&#8221; + i + row.filename + row.filedate;</span></div>
<div><span style="color:#3366ff;"><br />
</span></div>
<div><span style="color:#3366ff;">}</span></div>
<br />Filed under: <a href='http://charliesflexblog.wordpress.com/category/1/'>1</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/charliesflexblog.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/charliesflexblog.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/charliesflexblog.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/charliesflexblog.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/charliesflexblog.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/charliesflexblog.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/charliesflexblog.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/charliesflexblog.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/charliesflexblog.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/charliesflexblog.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/charliesflexblog.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/charliesflexblog.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/charliesflexblog.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/charliesflexblog.wordpress.com/42/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=charliesflexblog.wordpress.com&amp;blog=11337048&amp;post=42&amp;subd=charliesflexblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://charliesflexblog.wordpress.com/2010/03/31/trace-an-array-collection-contents/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/11b432e30c1149ad5057db42638391ba?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">charliecrystle</media:title>
		</media:content>
	</item>
		<item>
		<title>The Price of Trust</title>
		<link>http://charliesflexblog.wordpress.com/2010/03/15/the-price-of-trust/</link>
		<comments>http://charliesflexblog.wordpress.com/2010/03/15/the-price-of-trust/#comments</comments>
		<pubDate>Mon, 15 Mar 2010 10:02:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[1]]></category>

		<guid isPermaLink="false">http://charliesflexblog.wordpress.com/?p=39</guid>
		<description><![CDATA[$499. You work all winter, work nights and weekends, test and retest, and then go to sign you application, and what do you find? Verisign charges $499 for a certificate. https://www.verisign.com/code-signing/content-signing-certificates/adobe-air/index.html?sl=productdetails The price of trust. The price of trust is friction in the developer cycle. Adobe should simply subsidize it through its developer program. Filed [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=charliesflexblog.wordpress.com&amp;blog=11337048&amp;post=39&amp;subd=charliesflexblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>$499.</p>
<p>You work all winter, work nights and weekends, test and retest, and then go to sign you application, and what do you find? Verisign charges $499 for a certificate.</p>
<p><a href="https://www.verisign.com/code-signing/content-signing-certificates/adobe-air/index.html?sl=productdetails">https://www.verisign.com/code-signing/content-signing-certificates/adobe-air/index.html?sl=productdetails</a></p>
<p>The price of trust.</p>
<p>The price of trust is friction in the developer cycle. Adobe should simply subsidize it through its developer program.</p>
<br />Filed under: <a href='http://charliesflexblog.wordpress.com/category/1/'>1</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/charliesflexblog.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/charliesflexblog.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/charliesflexblog.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/charliesflexblog.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/charliesflexblog.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/charliesflexblog.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/charliesflexblog.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/charliesflexblog.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/charliesflexblog.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/charliesflexblog.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/charliesflexblog.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/charliesflexblog.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/charliesflexblog.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/charliesflexblog.wordpress.com/39/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=charliesflexblog.wordpress.com&amp;blog=11337048&amp;post=39&amp;subd=charliesflexblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://charliesflexblog.wordpress.com/2010/03/15/the-price-of-trust/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/11b432e30c1149ad5057db42638391ba?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">charliecrystle</media:title>
		</media:content>
	</item>
		<item>
		<title>Numeric Sorting Flex AdvancedDataGrid Problem Solved</title>
		<link>http://charliesflexblog.wordpress.com/2010/02/05/numeric-sorting-flex-advanceddatagrid-problem-solved/</link>
		<comments>http://charliesflexblog.wordpress.com/2010/02/05/numeric-sorting-flex-advanceddatagrid-problem-solved/#comments</comments>
		<pubDate>Fri, 05 Feb 2010 02:12:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://charliesflexblog.wordpress.com/?p=34</guid>
		<description><![CDATA[ANSWER: when you create the sort field, explicitly set the ignoreCase property to false. The bug in Adobe's code is that it assumes that if this is set to true, you must be trying to sort text, so it finds the first text column and sorts on that, and then ignores the direction. If it's set to false, it doesn't treat it as text. Here's the kicker: the default value is TRUE! (AdvancedDataGrid numeric sort issue)
<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=charliesflexblog.wordpress.com&amp;blog=11337048&amp;post=34&amp;subd=charliesflexblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>[UPDATE: I was wrong. This doesn't work.]</strong></p>
<p>This is one that sucked up about 8 hours of research, because the doc is soooo great. Ugh.</p>
<p>I have an AdvancedDataGrid, and populate it with data in an array collection derived from some SQL results. The query returns 3 columns: two are text, one is an int. The int is the id for the table; because id in an autoincrement field is an indicator of sequence of creation of a record, i.e. the latest entry is the highest id number, I want to sort on that field. Great!</p>
<p>To do this, you have to sort the array collection(AC) first, then assign the ADG.dataprovider to the sorted AC. So I coded in my imperfect way, but the grid kept displaying the results in alphabetical order on the grouped field, and not in descending order on the sort field. Fun.</p>
<p>So I looked for an explicit sort call I could make to coerce the sort. Doesn&#8217;t work. After searching forever, I found something from 2007 on a remote island of a <a href="http://old.nabble.com/Problem-with-setting-initial-sort-of-AdvancedDataGrid-via-data-provider.-td14029892.html#a14180606">dev sit</a>e, dug through some code, and found the answer, and even that wasn&#8217;t very clear.</p>
<p>ANSWER: when you create the sort field, explicitly set the <em>ignoreCase</em> property to false. The bug in Adobe&#8217;s code is that it assumes that if this is set to true, you must be trying to sort text, so it finds the first text column and sorts on that, and then ignores the direction. If it&#8217;s set to false, it doesn&#8217;t treat it as text. Here&#8217;s the kicker: the default value is TRUE!</p>
<p>Given you don&#8217;t have to declare default values, you&#8217;re set up for failure. So do this:</p>
<p>//create a new sortfield<br />
var dataSortField:SortField = new SortField();</p>
<p><strong>dataSortField.name = &#8220;id&#8221;, <span style="color:#0000ff;">false</span>, Boolean </strong>;  // id matches column in sqlite<br />
dataSortField.numeric = true;<br />
dataSortField.descending= true;</p>
<div>//create new Sort, give it the sort field to target</div>
<div>var numericDataSort:Sort = new Sort();</div>
<div id="_mcePaste">numericDataSort.fields = [dataSortField];</div>
<div id="_mcePaste">tempAC.sort=numericDataSort;//tempAC is an ArrayCollection populated with data from result.data</div>
<div id="_mcePaste">tempAC.refresh(); //applies it</div>
<p>This is one of those frustrating, poorly documented issues Adobe has with Flex. I really expect to be able to find answers a lot easier than this. I hope this post saved you some pain!</p>
<br />Filed under: <a href='http://charliesflexblog.wordpress.com/category/air/'>AIR</a>, <a href='http://charliesflexblog.wordpress.com/category/flex/'>Flex</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/charliesflexblog.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/charliesflexblog.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/charliesflexblog.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/charliesflexblog.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/charliesflexblog.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/charliesflexblog.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/charliesflexblog.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/charliesflexblog.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/charliesflexblog.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/charliesflexblog.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/charliesflexblog.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/charliesflexblog.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/charliesflexblog.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/charliesflexblog.wordpress.com/34/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=charliesflexblog.wordpress.com&amp;blog=11337048&amp;post=34&amp;subd=charliesflexblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://charliesflexblog.wordpress.com/2010/02/05/numeric-sorting-flex-advanceddatagrid-problem-solved/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/11b432e30c1149ad5057db42638391ba?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">charliecrystle</media:title>
		</media:content>
	</item>
		<item>
		<title>SQLITE, FLEX Insert, Check for Duplicates</title>
		<link>http://charliesflexblog.wordpress.com/2010/01/19/sqlite-flex-insert-check-for-duplicates/</link>
		<comments>http://charliesflexblog.wordpress.com/2010/01/19/sqlite-flex-insert-check-for-duplicates/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 03:16:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[AIR]]></category>

		<guid isPermaLink="false">http://charliesflexblog.wordpress.com/?p=29</guid>
		<description><![CDATA[I had a long few hours trying to fix something that wasn&#8217;t broken. Yah&#8211;one of those days. But on a tip from a friend I learned something new. Here is is: sql = &#8220;insert into tag(tagName, tagNumber, tagThing) select :tagName, :tagNumber, :tagThing where 1 &#62; ( select count(tagName) from tag where tagName =:tagname)&#8221;; The caps [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=charliesflexblog.wordpress.com&amp;blog=11337048&amp;post=29&amp;subd=charliesflexblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I had a long few hours trying to fix something that wasn&#8217;t broken. Yah&#8211;one of those days. But on a tip from a friend I learned something new. Here is is:</p>
<div id="_mcePaste">sql = &#8220;insert into tag(tagName, tagNumber, tagThing) select :tagName, :tagNumber, :tagThing where 1 &gt; ( select count(tagName) from tag where tagName =:tagname)&#8221;;</div>
<div></div>
<div>The caps don&#8217;t signify anything. Basically this looks for a value in the table, and if it finds it, it doesn&#8217;t insert, and if it doesn&#8217;t find it, it inserts.</div>
<br />Posted in AIR  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/charliesflexblog.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/charliesflexblog.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/charliesflexblog.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/charliesflexblog.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/charliesflexblog.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/charliesflexblog.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/charliesflexblog.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/charliesflexblog.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/charliesflexblog.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/charliesflexblog.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/charliesflexblog.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/charliesflexblog.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/charliesflexblog.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/charliesflexblog.wordpress.com/29/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=charliesflexblog.wordpress.com&amp;blog=11337048&amp;post=29&amp;subd=charliesflexblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://charliesflexblog.wordpress.com/2010/01/19/sqlite-flex-insert-check-for-duplicates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/11b432e30c1149ad5057db42638391ba?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">charliecrystle</media:title>
		</media:content>
	</item>
		<item>
		<title>Create Directory, Create File, Write to File in Flex/Actionscript</title>
		<link>http://charliesflexblog.wordpress.com/2010/01/18/create-directory-create-file-write-to-file-in-flexactionscript/</link>
		<comments>http://charliesflexblog.wordpress.com/2010/01/18/create-directory-create-file-write-to-file-in-flexactionscript/#comments</comments>
		<pubDate>Mon, 18 Jan 2010 20:55:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[AIR]]></category>

		<guid isPermaLink="false">http://charliesflexblog.wordpress.com/?p=26</guid>
		<description><![CDATA[I built this little app to learn how to write to a file using Flex and ActionScript. Simple, and of course not complete. I open the file synchronously; it makes more sense to me to do it async. Regardless, this should work to help you get started: &#60;?xml version=&#8221;1.0&#8243; encoding=&#8221;utf-8&#8243;?&#62; &#60;mx:WindowedApplication xmlns:mx=&#8221;http://www.adobe.com/2006/mxml&#8221; layout=&#8221;absolute&#8221;&#62; &#60;mx:Script&#62; &#60;![CDATA[ [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=charliesflexblog.wordpress.com&amp;blog=11337048&amp;post=26&amp;subd=charliesflexblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="_mcePaste"><span style="color:#808080;">I built this little app to learn how to write to a file using Flex and ActionScript. Simple, and of course not complete. I open the file synchronously; it makes more sense to me to do it async. Regardless, this should work to help you get started: </span></div>
<div><span style="color:#808080;"><br />
</span></div>
<div><span style="color:#808080;">&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;utf-8&#8243;?&gt;</span></div>
<div id="_mcePaste"><span style="color:#808080;">&lt;mx:WindowedApplication xmlns:mx=&#8221;http://www.adobe.com/2006/mxml&#8221; layout=&#8221;absolute&#8221;&gt;</span></div>
<div id="_mcePaste"><span style="color:#808080;">&lt;mx:Script&gt;</span></div>
<div id="_mcePaste"><span style="color:#808080;">&lt;![CDATA[</span></div>
<div id="_mcePaste"><span style="color:#808080;">import flash.filesystem.FileMode;</span></div>
<div id="_mcePaste"><span style="color:#808080;">import flash.filesystem.FileStream;</span></div>
<div id="_mcePaste"><span style="color:#808080;">import flash.filesystem.File;</span></div>
<div id="_mcePaste"><span style="color:#808080;"><br />
</span></div>
<div><span style="color:#808080;">private function fileWrite():void</span></div>
<div id="_mcePaste"><span style="color:#808080;">{//create a directory</span></div>
<div style="padding-left:30px;"><span style="color:#808080;"> var newDir:File=File.desktopDirectory.resolvePath("test");</span></div>
<div id="_mcePaste" style="padding-left:30px;"><span style="color:#808080;">newDir.createDirectory();</span></div>
<div style="padding-left:30px;"><span style="color:#808080;"><br />
</span></div>
<div style="padding-left:30px;"><span style="color:#808080;">//create the file</span></div>
<div style="padding-left:30px;"><span style="color:#808080;">var myfile:File = newDir.resolvePath("test.txt");</span></div>
<div id="_mcePaste" style="padding-left:30px;"><span style="color:#808080;">//open a filestream object</span></div>
<div style="padding-left:30px;"><span style="color:#808080;">var fs:FileStream = new FileStream();</span></div>
<div id="_mcePaste" style="padding-left:30px;"><span style="color:#808080;"><br />
</span></div>
<div style="padding-left:30px;"><span style="color:#808080;">//open the file; you can use WRITE, UPDATE, or APPEND to write content, with different effect (read doc)</span></div>
<div style="padding-left:30px;"><span style="color:#808080;">fs.open(myfile, FileMode.APPEND);</span></div>
<div id="_mcePaste" style="padding-left:30px;"><span style="color:#808080;"><br />
</span></div>
<div style="padding-left:30px;"><span style="color:#808080;">//write the contents</span></div>
<div style="padding-left:30px;"><span style="color:#808080;">fs.writeUTFBytes("||test it is a test is a tester")</span></div>
<div id="_mcePaste" style="padding-left:30px;"><span style="color:#808080;"><br />
</span></div>
<div style="padding-left:30px;"><span style="color:#808080;">//show the native path. sorry I didn't give better feedback in the app for debugging, but hey. it's free. </span></div>
<div style="padding-left:30px;"><span style="color:#808080;">l.text=myfile.nativePath;</span></div>
<div id="_mcePaste" style="padding-left:30px;"><span style="color:#808080;">fs.close();</span></div>
<div id="_mcePaste"><span style="color:#808080;">}</span></div>
<div id="_mcePaste"><span style="color:#808080;">]]&gt;</span></div>
<div id="_mcePaste"><span style="color:#808080;">&lt;/mx:Script&gt;</span></div>
<div id="_mcePaste"><span style="color:#808080;">&lt;mx:Button x=&#8221;65&#8243; y=&#8221;111&#8243; label=&#8221;write file&#8221; width=&#8221;134&#8243; click=&#8221;{fileWrite()}&#8221;/&gt;</span></div>
<div id="_mcePaste"><span style="color:#808080;">&lt;mx:Label x=&#8221;65&#8243; y=&#8221;71&#8243; width=&#8221;498&#8243; id=&#8221;l&#8221;/&gt;</span></div>
<div id="_mcePaste"><span style="color:#808080;">&lt;/mx:WindowedApplication&gt;</span></div>
<br />Posted in AIR  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/charliesflexblog.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/charliesflexblog.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/charliesflexblog.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/charliesflexblog.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/charliesflexblog.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/charliesflexblog.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/charliesflexblog.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/charliesflexblog.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/charliesflexblog.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/charliesflexblog.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/charliesflexblog.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/charliesflexblog.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/charliesflexblog.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/charliesflexblog.wordpress.com/26/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=charliesflexblog.wordpress.com&amp;blog=11337048&amp;post=26&amp;subd=charliesflexblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://charliesflexblog.wordpress.com/2010/01/18/create-directory-create-file-write-to-file-in-flexactionscript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/11b432e30c1149ad5057db42638391ba?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">charliecrystle</media:title>
		</media:content>
	</item>
		<item>
		<title>Simulate Keyboard Event in Flex/Actionscript</title>
		<link>http://charliesflexblog.wordpress.com/2010/01/15/simulate-keyboard-event-in-flexactionscript/</link>
		<comments>http://charliesflexblog.wordpress.com/2010/01/15/simulate-keyboard-event-in-flexactionscript/#comments</comments>
		<pubDate>Fri, 15 Jan 2010 18:18:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[AIR]]></category>

		<guid isPermaLink="false">http://charliesflexblog.wordpress.com/?p=23</guid>
		<description><![CDATA[I have a C# object that needs to listen for user input in my AIR app. There are a few hacks to do this, and one of them is this: have the object listen for an OS keyboard event, which AIR can trigger if 1) the user hits a key on the keyboard, or if [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=charliesflexblog.wordpress.com&amp;blog=11337048&amp;post=23&amp;subd=charliesflexblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="_mcePaste">I have a C# object that needs to listen for user input in my AIR app. There are a few hacks to do this, and one of them is this: have the object listen for an OS keyboard event, which AIR can trigger if 1) the user hits a key on the keyboard, or if 2) the code simulates the keyboard input, which passes through to the OS. Pretty simple.</div>
<div></div>
<div>Here&#8217;s how I&#8217;m doing it:</div>
<div></div>
<div>private function keygen(key:uint):void</div>
<div id="_mcePaste">{</div>
<div id="_mcePaste">var keyCode:uint = new uint;</div>
<div id="_mcePaste">var kEvent:KeyboardEvent=new KeyboardEvent(KeyboardEvent.KEY_DOWN,true,false,keyCode);</div>
<div>keyCode=key;</div>
<div id="_mcePaste">kEvent.commandKey=kEvent.controlKey</div>
<div id="_mcePaste">Alert.show(kEvent.charCode.toString());</div>
<div id="_mcePaste">}</div>
<div>&#8230;</div>
<div>&lt;mx:Button x=&#8221;425&#8243; y=&#8221;8.95&#8243; label=&#8221;generate key combo&#8221; id=&#8221;key&#8221; click=&#8221;{keygen(78)}&#8221;/&gt;</div>
<div></div>
<div>78 is the keyCode for n.</div>
<div></div>
<br />Posted in AIR  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/charliesflexblog.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/charliesflexblog.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/charliesflexblog.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/charliesflexblog.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/charliesflexblog.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/charliesflexblog.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/charliesflexblog.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/charliesflexblog.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/charliesflexblog.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/charliesflexblog.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/charliesflexblog.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/charliesflexblog.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/charliesflexblog.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/charliesflexblog.wordpress.com/23/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=charliesflexblog.wordpress.com&amp;blog=11337048&amp;post=23&amp;subd=charliesflexblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://charliesflexblog.wordpress.com/2010/01/15/simulate-keyboard-event-in-flexactionscript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/11b432e30c1149ad5057db42638391ba?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">charliecrystle</media:title>
		</media:content>
	</item>
		<item>
		<title>Fixing Flex Debugging Problems</title>
		<link>http://charliesflexblog.wordpress.com/2010/01/14/fixing-flex-debugging-problems/</link>
		<comments>http://charliesflexblog.wordpress.com/2010/01/14/fixing-flex-debugging-problems/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 20:30:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[AIR]]></category>

		<guid isPermaLink="false">http://charliesflexblog.wordpress.com/?p=21</guid>
		<description><![CDATA[I&#8217;ve noticed that Flex sometimes doesn&#8217;t debug as expected, or behave as expected. If you try to run your app, and it doesn&#8217;t run, it likely means one of a few thigns, I think: there&#8217;s an existing instance of adl.exe (the debugger) running. Simply open your OS task manager and end the instance. I keep [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=charliesflexblog.wordpress.com&amp;blog=11337048&amp;post=21&amp;subd=charliesflexblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve noticed that Flex sometimes doesn&#8217;t debug as expected, or behave as expected. If you try to run your app, and it doesn&#8217;t run, it likely means one of a few thigns, I think:</p>
<ul>
<li>there&#8217;s an existing instance of adl.exe (the debugger) running. Simply open your OS task manager and end the instance. I keep the task manager open because this is a frequent issue; the debugger hasn&#8217;t shut down after closing the app. If you explicitly stop the debugger from within flex by clicking on the red square, you won&#8217;t have this issue much.</li>
<li>there&#8217;s a bug in your code, likely in something outside of the main file. Shutting down and restarting sometimes helps clear the debugger enough that it will catch the issues, but if that doesn&#8217;t work, then generate a release build. Doing that will throw errors, and Flex shoudl provide a link called <em>Details</em>, which contains debugger text that clearly should be shown in the console but never made it there for some reason.</li>
</ul>
<p>So briefly: if you run into issues, do one of these things:</p>
<ul>
<li>kill the adl.exe process in task manager, then try again.</li>
<li>if that doesn&#8217;t work, close flex and re-open it, then try again</li>
<li>if that doesn&#8217;t work, perform a Release Build and look for the details link when it dies on you.</li>
<li>cut the red wire&#8230;</li>
</ul>
<p>That&#8217;s the newbie view for now.</p>
<br />Posted in AIR  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/charliesflexblog.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/charliesflexblog.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/charliesflexblog.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/charliesflexblog.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/charliesflexblog.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/charliesflexblog.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/charliesflexblog.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/charliesflexblog.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/charliesflexblog.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/charliesflexblog.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/charliesflexblog.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/charliesflexblog.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/charliesflexblog.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/charliesflexblog.wordpress.com/21/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=charliesflexblog.wordpress.com&amp;blog=11337048&amp;post=21&amp;subd=charliesflexblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://charliesflexblog.wordpress.com/2010/01/14/fixing-flex-debugging-problems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/11b432e30c1149ad5057db42638391ba?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">charliecrystle</media:title>
		</media:content>
	</item>
		<item>
		<title>HitData</title>
		<link>http://charliesflexblog.wordpress.com/2010/01/14/hitdata/</link>
		<comments>http://charliesflexblog.wordpress.com/2010/01/14/hitdata/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 20:18:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[AIR]]></category>

		<guid isPermaLink="false">http://charliesflexblog.wordpress.com/?p=18</guid>
		<description><![CDATA[When passing information from a click on a chart item, the syntax must reflect the name of the chart item, which will be the name you assigned to the series element, which in my case is derived from the query to the SQLite db. So follow the query through to the hit data: EXAMPLE: SQL: [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=charliesflexblog.wordpress.com&amp;blog=11337048&amp;post=18&amp;subd=charliesflexblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>When passing information from a click on a chart item, the syntax must reflect the <em>name </em>of the chart <em>item</em>, which will be the <em>name </em>you assigned to the series element, which in my case is derived from the query to the SQLite db. So follow the query through to the hit data:</p>
<div>EXAMPLE:</div>
<div>SQL:      &#8221;SELECT <strong>AppName</strong> Round(SUM(FileDuration/60),1) as &#8216;FileDuration&#8217; from File WHERE date(FileDate) BETWEEN :date1 AND :date2 AND AppName &lt;&gt;&#8217;system&#8217; Group By AppName Order by FileDuration Desc&#8221;</div>
<div></div>
<div><em>private yourFunction(event:ChartItemEvent)</em></div>
<div>{</div>
<div>var appname:String;</div>
<div>var hitdata:HitData=event.hitData;</div>
<div>appname=hitdata.item.<strong>AppName</strong>;</div>
<div></div>
<div>label.text=appname</div>
<p>}</p>
<p>I used the value to pass it to another query, doing this:</p>
<p>AppFilesSTMT.parameters[":appname"]= appname</p>
<div id="_mcePaste">AppFilesSTMT.addEventListener(SQLEvent.RESULT, selectAppFiles);</div>
<div id="_mcePaste">AppFilesSTMT.addEventListener(SQLErrorEvent.ERROR, selectError);</div>
<div id="_mcePaste">AppFilesSTMT.execute();</div>
<br />Posted in AIR  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/charliesflexblog.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/charliesflexblog.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/charliesflexblog.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/charliesflexblog.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/charliesflexblog.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/charliesflexblog.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/charliesflexblog.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/charliesflexblog.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/charliesflexblog.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/charliesflexblog.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/charliesflexblog.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/charliesflexblog.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/charliesflexblog.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/charliesflexblog.wordpress.com/18/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=charliesflexblog.wordpress.com&amp;blog=11337048&amp;post=18&amp;subd=charliesflexblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://charliesflexblog.wordpress.com/2010/01/14/hitdata/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/11b432e30c1149ad5057db42638391ba?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">charliecrystle</media:title>
		</media:content>
	</item>
	</channel>
</rss>
