Index: lams_central/src/flash/org/lamsfoundation/lams/authoring/tk/ToolkitView.as =================================================================== diff -u -r0158e028746e3b361c2bd5c93db2f0fb12c2e1ca -rf6e62fe13a302f3ba31a93ab98bf1e1eb2897c6a --- lams_central/src/flash/org/lamsfoundation/lams/authoring/tk/ToolkitView.as (.../ToolkitView.as) (revision 0158e028746e3b361c2bd5c93db2f0fb12c2e1ca) +++ lams_central/src/flash/org/lamsfoundation/lams/authoring/tk/ToolkitView.as (.../ToolkitView.as) (revision f6e62fe13a302f3ba31a93ab98bf1e1eb2897c6a) @@ -31,7 +31,7 @@ private var dragIcon_mcl:MovieClipLoader; private var dragIconListener:Object; - + private var _dictionary:Dictionary; private var _tm:ThemeManager; //sorry mvc guru but i disagree - little state var here @@ -49,7 +49,9 @@ public function ToolkitView(){ //Set up this class to use the Flash event delegation model EventDispatcher.initialize(this); - _tm = ThemeManager.getInstance(); + _tm = ThemeManager.getInstance(); + _dictionary = Dictionary.getInstance(); + _dictionary.addEventListener('init',Proxy.create(this,setupLabels)); //Debugger.log('Running',4,'Constructor','ToolkitView'); } @@ -62,6 +64,7 @@ super (m, c); //Debugger.log('Running',4,'init','ToolkitView'); _dragging = false; + dragIconListener = new Object(); dragIconListener.cRef = this; dragIcon_mcl = new MovieClipLoader(); @@ -86,10 +89,27 @@ */ } + + + //Application.getInstance().setupAppCM(false) + //Create a clip that will wait a frame before dispatching init to give components time to setup this.onEnterFrame = createToolkit; } - + + public function getCopy(){ + Application.getInstance().copy(); + } + + public function getPaste(){ + Application.getInstance().paste(); + } + public function setupLabels(){ + + title_lbl.text = ""+Dictionary.getValue('tk_title')+":"; + + + } /** * Sets up the toolkit, its actually attached in toolkit.as */ @@ -99,7 +119,7 @@ delete this.onEnterFrame; _depth = this.getNextHighestDepth(); - title_lbl.text = Dictionary.getValue('tk_title'); + setStyles(); //dispatch load event dispatchEvent({type:'load',target:this}); @@ -179,7 +199,7 @@ /** * Updates learning library activities. Creates a templateActivity mc / class for each one. - * NOTE: Each library element contains an array of templateActivities. + * NOTE: Each library element contains an array of templateActivities. * templateActivities array may contain just one ToolActivity, or a container activity * like Parralel and corresponding child activities *