0 Replies Latest reply on Jun 19, 2008 5:47 PM by (Jono_Spiro)

    [svn] 2154: SDK-15589 - ObjectUtil.toString() not displaying the values of a Dictionary object with object keys.

    Level 1
      Revision: 2154
      Author: jspiro@adobe.com
      Date: 2008-06-19 18:47:21 -0700 (Thu, 19 Jun 2008)

      Log Message:
      -----------
      SDK-15589 - ObjectUtil.toString() not displaying the values of a Dictionary object with object keys.
      * This was missing functionality in toString() -- it never worked and is a special case, keys were always toString()ed (improperly, IMO), and values were always null. This was because Dictionaries were treated as dynamic Objects that were not Arrays.
      * This differs from how Array and Object toString() because keys are not just strings, they can be object references, and they can toString() to the same value if toString() is not overridden. So I recursively break down both the key and the value.
      * I added curly brace syntax (rather than reusing brackets from Array] for Dictionary to distinguish its semantics from Array and Object, in case anyone is relying on this for something important. e.g. toString(dictionary) will emit "{3} = 3" when dictionary["3"] = 3
      * getClassInfo() may now return properties that are regular objects if the input is a dictionary, whereas before it would definitely be a String or QName.

      Reviewer: gosmith, jasowill
      Bugs: SDK-15589
      QA: Yes, probably want a test suite for the new functionality (and regress that existing functionality was not broken, if tests exist). A good test case is "example 3" in the asdoc comments for ObjectUtil.toString().
      Doc: Yes, I updated the docs for two functions.

      Ticket Links:
      ------------
      http://bugs.adobe.com/jira/browse/SDK-15589
      http://bugs.adobe.com/jira/browse/SDK-15589

      Modified Paths:
      --------------
      flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/ObjectUtil.as