<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>
<channel>
	<title>Comments on: Collections API update</title>
	<atom:link href="http://www.ericfeminella.com/blog/2008/04/02/collections-api-update/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ericfeminella.com/blog/2008/04/02/collections-api-update/</link>
	<description></description>
	<pubDate>Tue, 16 Mar 2010 05:14:53 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Alan</title>
		<link>http://www.ericfeminella.com/blog/2008/04/02/collections-api-update/comment-page-1/#comment-141776</link>
		<dc:creator>Alan</dc:creator>
		<pubDate>Thu, 04 Feb 2010 23:32:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.ericfeminella.com/blog/2008/04/02/collections-api-update/#comment-141776</guid>
		<description>Hi Eric,
   Does HashMap suport data binding? I want to bind a hashmap value to a textinput component.

Thanks,
Alan</description>
		<content:encoded><![CDATA[<p>Hi Eric,<br />
   Does HashMap suport data binding? I want to bind a hashmap value to a textinput component.</p>
<p>Thanks,<br />
Alan</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: eric</title>
		<link>http://www.ericfeminella.com/blog/2008/04/02/collections-api-update/comment-page-1/#comment-127284</link>
		<dc:creator>eric</dc:creator>
		<pubDate>Mon, 20 Oct 2008 14:39:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.ericfeminella.com/blog/2008/04/02/collections-api-update/#comment-127284</guid>
		<description>Hey Charisma,

You will get inconsistent results because internally, the HashMap utilizes a Dictionary object, thus when you invoke HashMapA.getEntries(); the  underlying algorithm uses a "for in" loop, which when used to iterate over an Object or Dictionary the order of the results returned are not guaranteed. 

Best,
Eric</description>
		<content:encoded><![CDATA[<p>Hey Charisma,</p>
<p>You will get inconsistent results because internally, the HashMap utilizes a Dictionary object, thus when you invoke HashMapA.getEntries(); the  underlying algorithm uses a &#8220;for in&#8221; loop, which when used to iterate over an Object or Dictionary the order of the results returned are not guaranteed. </p>
<p>Best,<br />
Eric</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: charisma</title>
		<link>http://www.ericfeminella.com/blog/2008/04/02/collections-api-update/comment-page-1/#comment-127250</link>
		<dc:creator>charisma</dc:creator>
		<pubDate>Mon, 20 Oct 2008 09:07:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.ericfeminella.com/blog/2008/04/02/collections-api-update/#comment-127250</guid>
		<description>mapEntry = iList.getItemAt(i) as HashMapEntry;		
HashMapB = mapEntry.value;
tmpList = HashMapB.getEntries();
tmpListLen = tmpList.length;
trace("i -&gt; " + i + " " + mapEntry.key + " " + tmpListLen);

errr, i can't post my for-loop properly :(</description>
		<content:encoded><![CDATA[<p>mapEntry = iList.getItemAt(i) as HashMapEntry;<br />
HashMapB = mapEntry.value;<br />
tmpList = HashMapB.getEntries();<br />
tmpListLen = tmpList.length;<br />
trace(&#8221;i -&gt; &#8221; + i + &#8221; &#8221; + mapEntry.key + &#8221; &#8221; + tmpListLen);</p>
<p>errr, i can&#8217;t post my for-loop properly <img src='http://www.ericfeminella.com/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: charisma</title>
		<link>http://www.ericfeminella.com/blog/2008/04/02/collections-api-update/comment-page-1/#comment-127248</link>
		<dc:creator>charisma</dc:creator>
		<pubDate>Mon, 20 Oct 2008 09:04:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.ericfeminella.com/blog/2008/04/02/collections-api-update/#comment-127248</guid>
		<description>Sorry, this should be the content of the for-loop:

for (var i:int=0; i " + i + " " + mapEntry.key + " " + tmpListLen);
}</description>
		<content:encoded><![CDATA[<p>Sorry, this should be the content of the for-loop:</p>
<p>for (var i:int=0; i &#8221; + i + &#8221; &#8221; + mapEntry.key + &#8221; &#8221; + tmpListLen);<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: charisma</title>
		<link>http://www.ericfeminella.com/blog/2008/04/02/collections-api-update/comment-page-1/#comment-127247</link>
		<dc:creator>charisma</dc:creator>
		<pubDate>Mon, 20 Oct 2008 09:03:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.ericfeminella.com/blog/2008/04/02/collections-api-update/#comment-127247</guid>
		<description>Hmmm. In my code I got HashMap object and put it as a value inside another HashMap. Looks like this: HashMapA(key, HashMapB value).

Then i do:

var iList:IList = HashMapA.getEntries();
var iListLen:int = iList.length;
var mapEntry:HashMapEntry = null;

var tmpList:IList = null;			
var HashMapB:HashMap = null;
var tmpListLen:int = 0;

for (var i:int=0; i " + i + " " + mapEntry.key + " " + tmpListLen);
}

If you run this code repeatedly, you will notice that tmpListLen yields inconsistent results.</description>
		<content:encoded><![CDATA[<p>Hmmm. In my code I got HashMap object and put it as a value inside another HashMap. Looks like this: HashMapA(key, HashMapB value).</p>
<p>Then i do:</p>
<p>var iList:IList = HashMapA.getEntries();<br />
var iListLen:int = iList.length;<br />
var mapEntry:HashMapEntry = null;</p>
<p>var tmpList:IList = null;<br />
var HashMapB:HashMap = null;<br />
var tmpListLen:int = 0;</p>
<p>for (var i:int=0; i &#8221; + i + &#8221; &#8221; + mapEntry.key + &#8221; &#8221; + tmpListLen);<br />
}</p>
<p>If you run this code repeatedly, you will notice that tmpListLen yields inconsistent results.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mark</title>
		<link>http://www.ericfeminella.com/blog/2008/04/02/collections-api-update/comment-page-1/#comment-125403</link>
		<dc:creator>mark</dc:creator>
		<pubDate>Wed, 08 Oct 2008 06:35:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.ericfeminella.com/blog/2008/04/02/collections-api-update/#comment-125403</guid>
		<description>One more thing - looking inside the HashMap class, I could not see any kind of hashing going on - or is that something built into Actionscript's property lookup mechanism?</description>
		<content:encoded><![CDATA[<p>One more thing - looking inside the HashMap class, I could not see any kind of hashing going on - or is that something built into Actionscript&#8217;s property lookup mechanism?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mark</title>
		<link>http://www.ericfeminella.com/blog/2008/04/02/collections-api-update/comment-page-1/#comment-119379</link>
		<dc:creator>mark</dc:creator>
		<pubDate>Fri, 26 Sep 2008 06:01:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.ericfeminella.com/blog/2008/04/02/collections-api-update/#comment-119379</guid>
		<description>Thanks very much for these - saved me a lot of typing.

Small problem...

If I do something like mymap.put("hello", null) and then mymap.contains("hello"), it returns false. This is because for "contains()" you implemented it by checking the value in the dictionary.  Is it possible to change this so that contains() tests for the existing of the key rather than the null-ness of the value???

Would hasOwnProperty() do this???</description>
		<content:encoded><![CDATA[<p>Thanks very much for these - saved me a lot of typing.</p>
<p>Small problem&#8230;</p>
<p>If I do something like mymap.put(&#8221;hello&#8221;, null) and then mymap.contains(&#8221;hello&#8221;), it returns false. This is because for &#8220;contains()&#8221; you implemented it by checking the value in the dictionary.  Is it possible to change this so that contains() tests for the existing of the key rather than the null-ness of the value???</p>
<p>Would hasOwnProperty() do this???</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: charisma</title>
		<link>http://www.ericfeminella.com/blog/2008/04/02/collections-api-update/comment-page-1/#comment-119279</link>
		<dc:creator>charisma</dc:creator>
		<pubDate>Thu, 25 Sep 2008 08:52:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.ericfeminella.com/blog/2008/04/02/collections-api-update/#comment-119279</guid>
		<description>HashMap utility is very helpful. Thanks!</description>
		<content:encoded><![CDATA[<p>HashMap utility is very helpful. Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: eric</title>
		<link>http://www.ericfeminella.com/blog/2008/04/02/collections-api-update/comment-page-1/#comment-66771</link>
		<dc:creator>eric</dc:creator>
		<pubDate>Sun, 06 Jul 2008 15:41:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.ericfeminella.com/blog/2008/04/02/collections-api-update/#comment-66771</guid>
		<description>I have an entire codebase which contains all of my Open Source APIs as well as numerous other APIs which are not open source. This is entirely under version control and provides source access and distributions. If you are interested in the licensed version you can contact me directly

Thanks,
Eric</description>
		<content:encoded><![CDATA[<p>I have an entire codebase which contains all of my Open Source APIs as well as numerous other APIs which are not open source. This is entirely under version control and provides source access and distributions. If you are interested in the licensed version you can contact me directly</p>
<p>Thanks,<br />
Eric</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jadd</title>
		<link>http://www.ericfeminella.com/blog/2008/04/02/collections-api-update/comment-page-1/#comment-65733</link>
		<dc:creator>jadd</dc:creator>
		<pubDate>Sat, 05 Jul 2008 09:51:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.ericfeminella.com/blog/2008/04/02/collections-api-update/#comment-65733</guid>
		<description>hi Eric, 
and thanks for sharing your work. Could be nice to see all your code in a repository indeed, much easier to update for us.
Thanks.</description>
		<content:encoded><![CDATA[<p>hi Eric,<br />
and thanks for sharing your work. Could be nice to see all your code in a repository indeed, much easier to update for us.<br />
Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Luca</title>
		<link>http://www.ericfeminella.com/blog/2008/04/02/collections-api-update/comment-page-1/#comment-30985</link>
		<dc:creator>Luca</dc:creator>
		<pubDate>Wed, 23 Apr 2008 09:43:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.ericfeminella.com/blog/2008/04/02/collections-api-update/#comment-30985</guid>
		<description>One problem with:
  getEntries() : IList;
(and the ArrayCollection) is that it introduces a dependency on the Flex framework, preventing the use of you HashMap in plain AS3 projects :(
Any chance of changing it to an Array?</description>
		<content:encoded><![CDATA[<p>One problem with:<br />
  getEntries() : IList;<br />
(and the ArrayCollection) is that it introduces a dependency on the Flex framework, preventing the use of you HashMap in plain AS3 projects <img src='http://www.ericfeminella.com/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /><br />
Any chance of changing it to an Array?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: eric</title>
		<link>http://www.ericfeminella.com/blog/2008/04/02/collections-api-update/comment-page-1/#comment-20667</link>
		<dc:creator>eric</dc:creator>
		<pubDate>Thu, 03 Apr 2008 18:00:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.ericfeminella.com/blog/2008/04/02/collections-api-update/#comment-20667</guid>
		<description>Hey Maz,

I agree, for the most part these are common APIs one would expect to be included in the framework. The only reason I can think of as to why they are not included is to allow ActionScript 3 to align with the ECMA-262 edition 4 standard - which in many ways is very limiting.

- Eric</description>
		<content:encoded><![CDATA[<p>Hey Maz,</p>
<p>I agree, for the most part these are common APIs one would expect to be included in the framework. The only reason I can think of as to why they are not included is to allow ActionScript 3 to align with the ECMA-262 edition 4 standard - which in many ways is very limiting.</p>
<p>- Eric</p>
]]></content:encoded>
	</item>
</channel>
</rss>
