Re: [flexcoders] to use object or array -- 'Adobe Flex 2 Training from the Source' book

2007-04-10 Thread Tom Chiverton
On Thursday 05 Apr 2007, Gordon Smith wrote: Use a Array when you look up a value by a numeric index. Use an Object when you look up a value by a string key like name or property. I must admit to using Object myself - how does the newer Dictionary class compare to that, anyone ? -- Tom

RE: [flexcoders] to use object or array -- 'Adobe Flex 2 Training from the Source' book

2007-04-10 Thread Alex Harui
Dictionary lets you index by object instead of string. We use one to keep track of loaded modules. We don't want to have worry about whether the modules have a unique string identification, so we can just use the module object instead. Dictionary also supports weak references so you don't have

Re: [flexcoders] to use object or array -- 'Adobe Flex 2 Training from the Source' book

2007-04-08 Thread Nguyen Kien Trung
catObj is appended to the array in the first position so that the Combo box can display ALL as the first option in the list Chad Gray wrote: I am reading the 'Adobe Flex 2 Training from the Source' book and have a question as to why they used an object and not array. Page 118 for those that

[flexcoders] to use object or array -- 'Adobe Flex 2 Training from the Source' book

2007-04-05 Thread Chad Gray
I am reading the 'Adobe Flex 2 Training from the Source' book and have a question as to why they used an object and not array. Page 118 for those that have the book. What they are doing is taking an array (categories) and appending a new row to it Name=All and CategoryID=0. Is there any

RE: [flexcoders] to use object or array -- 'Adobe Flex 2 Training from the Source' book

2007-04-05 Thread Gordon Smith
Use a Array when you look up a value by a numeric index. Use an Object when you look up a value by a string key like name or property. BTW, I think using Object-literal syntax to combine these four lines into categories.addItemAt({ name: All, categoryID: o }); will create smaller, faster