@@ -584,9 +584,7 @@ cc.FileUtils = cc.Class.extend({
584
584
* @return {object } The Dictionary of object generated from the file
585
585
*/
586
586
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 ) ;
590
588
} ,
591
589
592
590
/**
@@ -606,8 +604,7 @@ cc.FileUtils = cc.Class.extend({
606
604
* @return {object } The Dictionary of object generated from the file
607
605
*/
608
606
dictionaryWithContentsOfFileThreadSafe :function ( fileName ) {
609
- var tMaker = new cc . DictMaker ( ) ;
610
- return tMaker . dictionaryWithContentsOfFile ( fileName ) ;
607
+ return cc . SAXParser . getInstance ( ) . parse ( fileName ) ;
611
608
} ,
612
609
613
610
/**
@@ -806,26 +803,3 @@ cc.FileUtils.getInstance = function () {
806
803
}
807
804
return cc . s_SharedFileUtils ;
808
805
} ;
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