|
From: Thyamad c. <th...@us...> - 2005-09-12 18:56:08
|
Update of /cvsroot/thyapi/thyapi/thyutils In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11338/thyutils Modified Files: thyconnector.js Log Message: Commiting file additions and modification from SVN revision 1938 to 1939... Changes made by rpereira on 2005-09-12 21:12:04 +0200 (Mon, 12 Sep 2005) corresponding to SVN revision 1939 with message: - thyConnector guaranteed to be a singleton Index: thyconnector.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thyutils/thyconnector.js,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** thyconnector.js 8 Sep 2005 20:36:29 -0000 1.5 --- thyconnector.js 12 Sep 2005 18:55:59 -0000 1.6 *************** *** 30,33 **** --- 30,36 ---- function thyConnector() { + // This is a singleton! Don't create new instances + if (typeof(window.thyConnectorObj) == 'object') return thyConnectorObj; + this.thyBase = thyBase; this.thyBase(); *************** *** 58,61 **** --- 61,70 ---- this.progressContents['default'] = GLOBALS['thyapi']['connector']['defaultMessages']; } + else + { + this.progressContents['default'] = {}; + } + + window.thyConnectorObj = this; } *************** *** 419,422 **** } ! var thyConnectorObj = new thyConnector(); ! thyConnectorObj.setVisible(true); --- 428,436 ---- } ! var thyConnectorObj; ! ! dynapi.onLoad(function() ! { ! var thyConnectorObj = new thyConnector(); ! thyConnectorObj.setVisible(true); ! }); |