From: Tay R. C. <rc...@us...> - 2005-07-24 00:13:22
|
Update of /cvsroot/actionstep/actionstep/src/org/actionstep In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16231/actionstep/org/actionstep Modified Files: NSAlert.as Log Message: removed position-recall code Index: NSAlert.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/NSAlert.as,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** NSAlert.as 17 Jul 2005 00:49:53 -0000 1.4 --- NSAlert.as 24 Jul 2005 00:13:13 -0000 1.5 *************** *** 36,41 **** import org.actionstep.NSApplication; import org.actionstep.NSRect; - //for position-recall - import org.actionstep.NSNotification; import org.actionstep.NSNotificationCenter; import org.actionstep.NSPoint; import org.actionstep.ASAlertPanel; import org.actionstep.ASDraw; --- 36,39 ---- *************** *** 52,57 **** private var m_app:NSApplication; private var m_sheet:ASAlertPanel; - private static var g_pos={}; - public static function alertWithMessageTextDefaultButtonAlternateButtonOtherButton (messageTitle:String, defaultButtonTitle:String, alternateButtonTitle:String, otherButtonTitle:String):NSAlert { --- 50,53 ---- *************** *** 195,218 **** ASDraw.solidRectWithRect(content.mcBounds(), content.bounds(), 0xdddddd); - if(g_pos[m_msg]!=null) { - m_sheet.rootView().setFrameOrigin(g_pos[m_msg]); - } - - NSNotificationCenter.defaultCenter().addObserverSelectorNameObject - (this, "windowHasClosed", NSWindow.NSWindowWillCloseNotification, m_sheet); - //add it to arg array arguments.unshift(m_sheet); m_app.beginSheetModalForWindowModalDelegateDidEndSelectorContextInfo.apply(m_app, arguments); } - - private function windowHasClosed(n:NSNotification) { - var pos:NSPoint = m_sheet.rootView().frame().origin; - - if(g_pos[m_msg]==null) { - g_pos[m_msg]=pos; - } else { - g_pos[m_msg]=pos; - } - } } \ No newline at end of file --- 191,197 ---- |