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
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
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
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
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
5 matches
Mail list logo