@@ -584,9 +584,7 @@ cc.FileUtils = cc.Class.extend({
584584 * @return {object } The Dictionary of object generated from the file
585585 */
586586 createDictionaryWithContentsOfFile : function ( filename ) {
587- var parser = cc . SAXParser . getInstance ( ) ;
588- this . rootDict = parser . parse ( filename ) ;
589- return this . rootDict ;
587+ return cc . SAXParser . getInstance ( ) . parse ( filename ) ;
590588 } ,
591589
592590 /**
@@ -606,8 +604,7 @@ cc.FileUtils = cc.Class.extend({
606604 * @return {object } The Dictionary of object generated from the file
607605 */
608606 dictionaryWithContentsOfFileThreadSafe :function ( fileName ) {
609- var tMaker = new cc . DictMaker ( ) ;
610- return tMaker . dictionaryWithContentsOfFile ( fileName ) ;
607+ return cc . SAXParser . getInstance ( ) . parse ( fileName ) ;
611608 } ,
612609
613610 /**
@@ -806,26 +803,3 @@ cc.FileUtils.getInstance = function () {
806803 }
807804 return cc . s_SharedFileUtils ;
808805} ;
809-
810- /**
811- * plist Dictionary Maker
812- * @class
813- * @extends cc.Class
814- * @example
815- * //create a DictMaker
816- * var tMaker = new cc.DictMaker();
817- * tMaker.dictionaryWithContentsOfFile(fileName);
818- */
819- cc . DictMaker = cc . Class . extend ( /** @lends cc.DictMaker# */ {
820- rootDict :[ ] ,
821- /**
822- * Generate dictionary with contents of file
823- * @param {String } fileName
824- * @return {Array }
825- */
826- dictionaryWithContentsOfFile :function ( fileName ) {
827- var parser = cc . SAXParser . getInstance ( ) ;
828- this . rootDict = parser . parse ( fileName ) ;
829- return this . rootDict ;
830- }
831- } ) ;
0 commit comments