From: Richard K. <ric...@us...> - 2005-05-17 01:39:13
|
Update of /cvsroot/actionstep/actionstep/src/org/actionstep In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4107 Modified Files: ASAnimatedTabView.as Log Message: change to window() method Index: ASAnimatedTabView.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/ASAnimatedTabView.as,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ASAnimatedTabView.as 16 May 2005 04:42:55 -0000 1.1 --- ASAnimatedTabView.as 16 May 2005 14:41:02 -0000 1.2 *************** *** 35,40 **** import org.actionstep.NSTabViewItem; import org.actionstep.constants.NSTabState; ! class org.actionstep.ASAnimatedTabView extends NSTabView { public function selectTabViewItem(item:NSTabViewItem) { if (m_delegate != null) { --- 35,49 ---- import org.actionstep.NSTabViewItem; import org.actionstep.constants.NSTabState; ! ! /* ! * This class overrides the selectTabViewItem method of NSTabView and ! * animates the switching of tab views by sliding the existing tab view ! * item out (to the left) and then sliding the new tab view item in (from ! * the left). This class also demonstrates how to use the NSTimer class ! * to achieve animation. ! * ! */ class org.actionstep.ASAnimatedTabView extends NSTabView { + public function selectTabViewItem(item:NSTabViewItem) { if (m_delegate != null) { *************** *** 90,99 **** if (selectedView != null) { addSubview(selectedView); ! m_window.makeFirstResponder(m_selected.initialFirstResponder()); var rect:NSRect = contentRect(); rect.origin.x -= rect.size.width; selectedView.setFrame(rect); setNeedsDisplay(true); ! selectedView.window().displayIfNeeded(); NSTimer.scheduledTimerWithTimeIntervalTargetSelectorUserInfoRepeats( .1, this, "_animateNewItem", { --- 99,108 ---- if (selectedView != null) { addSubview(selectedView); ! window().makeFirstResponder(m_selected.initialFirstResponder()); var rect:NSRect = contentRect(); rect.origin.x -= rect.size.width; selectedView.setFrame(rect); setNeedsDisplay(true); ! window().displayIfNeeded(); NSTimer.scheduledTimerWithTimeIntervalTargetSelectorUserInfoRepeats( .1, this, "_animateNewItem", { *************** *** 130,133 **** --- 139,143 ---- private function _finish() { setNeedsDisplay(true); + window().displayIfNeeded(); if(typeof(m_delegate["tabViewDidSelectTabViewItem"]) == "function") { m_delegate["tabViewDidSelectTabViewItem"].call(m_delegate, this, m_selected); |