Re: [flexcoders] Dictionary bug

2008-05-27 Thread Josh McDonald
Why do Strings make bad keys in a Dictionary? Is it just because you get no benefits over an Object but it's slower? And If I wanted a map of String (or similar) to a weak reference of an Object, what's the best way to achieve this? Is the only way to put the Object as the key in a weakReference D

RE: [flexcoders] Dictionary bug

2008-05-27 Thread Alex Harui
oders@yahoogroups.com Subject: Re: [flexcoders] Dictionary bug Why do Strings make bad keys in a Dictionary? Is it just because you get no benefits over an Object but it's slower? And If I wanted a map of String (or similar) to a weak reference of an Object, what's the best way to achieve th

Re: [flexcoders] Dictionary bug

2008-05-27 Thread Josh McDonald
-- > > *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On > Behalf Of *Josh McDonald > *Sent:* Tuesday, May 27, 2008 3:52 PM > *To:* flexcoders@yahoogroups.com > *Subject:* Re: [flexcoders] Dictionary bug > > > > Why do Strings make bad keys

Re: [flexcoders] Dictionary bug

2008-05-27 Thread Daniel Freiman
The short version is that I have a Directed Acyclic Graph class. The example code was retrieving a node from the graph. I don't need weakKeys because the node set is controlled. Anything in the Dictionary that would be eligible for collection would have necessarily already been removed from the

Re: [flexcoders] Dictionary bug

2008-05-27 Thread Josh McDonald
As object and dictionary use the same syntax, it shouldn't be too hard to do some quick testing to determine which is faster when using strings as keys. -J On Wed, May 28, 2008 at 2:28 PM, Daniel Freiman <[EMAIL PROTECTED]> wrote: > The short version is that I have a Directed Acyclic Graph cla

RE: [flexcoders] Dictionary bug

2008-05-27 Thread Alex Harui
Josh McDonald Sent: Tuesday, May 27, 2008 9:42 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Dictionary bug As object and dictionary use the same syntax, it shouldn't be too hard to do some quick testing to determine which is faster when using strings as keys. -J On Wed, May 28,

Re: [flexcoders] Dictionary bug

2008-05-28 Thread Troy Gilbert
> XML read/write is much slower than access of other class instances. If > you're going to do lots of reading and writing, I would consider converting > the XML data to object data. As an aside, is there any reason why Adobe hasn't provided API for serializing to/from XML and typed-objects? This

Re: [flexcoders] Dictionary bug

2008-05-28 Thread Troy Gilbert
> Dammit, why didn't I think of strings to one-entry dictionaries? Genius! > Alex, that's why you're the judge, and I'm the law.. talking.. guy :) > Collecting the empty dictionaries would be a pretty simple job to do on a > timer using something similar to your background thread code too. I think

RE: [flexcoders] Dictionary bug

2008-05-28 Thread Alex Harui
We have mx.rpc.SimpleXMLDecoder, and some undocumented decoders as well. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Troy Gilbert Sent: Wednesday, May 28, 2008 10:22 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders

Re: [flexcoders] Dictionary bug

2008-05-28 Thread Troy Gilbert
> We have mx.rpc.SimpleXMLDecoder, and some undocumented decoders as well. But those just convert to/from generic objects, right? I'm talking about typed objects (for best performance). All the examples I see with SimpleXMLDecoder go to/from generic objects. I'd actually be cool with code generat

Re: [flexcoders] Dictionary bug

2008-05-28 Thread Josh McDonald
Don't we all dude :) On Thu, May 29, 2008 at 7:29 AM, Troy Gilbert <[EMAIL PROTECTED]> wrote: > > I wish my job would afford me the time to write these tools myself! ;-) > > Troy. > > -- "Therefore, send not to know For whom the bell tolls. It tolls for thee." :: Josh 'G-Funk' McDonald ::

RE: [flexcoders] Dictionary bug

2008-05-28 Thread Alex Harui
ailto:[EMAIL PROTECTED] On Behalf Of Josh McDonald Sent: Wednesday, May 28, 2008 2:57 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Dictionary bug Don't we all dude :) On Thu, May 29, 2008 at 7:29 AM, Troy Gilbert <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> >

Re: [flexcoders] Dictionary bug

2008-05-28 Thread Josh McDonald
rs@yahoogroups.com [mailto:[EMAIL PROTECTED] *On > Behalf Of *Josh McDonald > *Sent:* Wednesday, May 28, 2008 2:57 PM > *To:* flexcoders@yahoogroups.com > *Subject:* Re: [flexcoders] Dictionary bug > > > > Don't we all dude :) > > On Thu, May 29, 2008 at 7:29 AM, Troy