From: Tay R. C. <rc...@us...> - 2005-07-15 12:23:18
|
Update of /cvsroot/actionstep/actionstep/src/org/actionstep In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16327/actionstep/org/actionstep Modified Files: NSPanel.as Log Message: shifted return values to constants.* Index: NSPanel.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/NSPanel.as,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** NSPanel.as 24 Jun 2005 02:17:51 -0000 1.2 --- NSPanel.as 15 Jul 2005 12:22:58 -0000 1.3 *************** *** 34,154 **** class org.actionstep.NSPanel extends NSWindow { ! private var ! m_isFloatingPanel:Boolean, ! m_worksWhenModal:Boolean, ! m_becomesKeyOnlyIfNeeded:Boolean ! ! //Style Mask ! public static var ! NSUtilityWindowMask:Number = 16, ! NSDocModalWindowMask:Number = 32 ! ! //Modal Panel Return Values ! public static var ! NSOKButton:Number = 1, ! NSCancelButton:Number = 0 ! ! //Alert Panel Return Values ! public static var ! NSAlertDefaultReturn:Number = 1, ! NSAlertAlternateReturn:Number = 0, ! NSAlertOtherReturn:Number = -1, ! NSAlertErrorReturn:Number = -2 ! ! /* ! // ! // New alert interface of Mac OS X ! // ! public static function NSBeginAlertSheet ! (title:String, msg:String, defaultButton:String, alternateButton:String, otherButton:String, ! docWindow:NSWindow, modalDelegate:Object, willEndSelector:String, didEndSelector:String, ! contextInfo, msg:String):Void ! ! public static function NSBeginCriticalAlertSheet ! (title:String, msg:String, defaultButton:String, alternateButton:String, otherButton:String, ! docWindow:NSWindow, modalDelegate:Object, willEndSelector:String, didEndSelector:String, ! contextInfo, msg:String):Void ! ! public static function NSBeginInformationalAlertSheet ! (title:String, msg:String, defaultButton:String, alternateButton:String, otherButton:String, ! docWindow:NSWindow, modalDelegate:Object, willEndSelector:String, didEndSelector:String, ! contextInfo, msg:String):Void ! ! // ! // Release an Attention Panel ! // ! public static function NSReleaseAlertPanel(panel); ! */ ! ! public function NSPanel() { ! init(); ! } ! ! public function init():NSPanel { ! var style:Number = NSTitledWindowMask | NSClosableWindowMask; ! //setReleasedWhenClosed(false); ! //setHidesOnDeactivate(true); ! //setExcludedFromWindowsMenu(true); ! ! //return initWithContentRectStyleMaskBackingDefer ! return NSPanel(initWithContentRectStyleMask(NSRect.ZeroRect, style)); ! } ! ! public function canBecomeKeyWindow():Boolean { ! return true; ! } ! ! public function canBecomeMainWindow():Boolean { ! return false; ! } ! ! /* ! * If we receive an escape, close. ! ! public function keyDown(theEvent:NSEvent) { ! if ( ! ("\e" == theEvent.charactersIgnoringModifiers()) && ! (styleMask & NSClosableWindowMask) == NSClosableWindowMask) ! close(); ! else ! super.keyDown(theEvent); ! }*/ ! ! /* ! * Determining the Panel's Behavior ! */ ! public function isFloatingPanel():Boolean { ! return m_isFloatingPanel; ! } ! ! public function setFloatingPanel(flag:Boolean):Void { ! if (m_isFloatingPanel != flag) { ! m_isFloatingPanel = flag; ! /*if (flag) ! setLevel(NSFloatingWindowLevel); ! else ! setLevel(NSNormalWindowLevel);*/ ! } ! } ! ! public function worksWhenModal():Boolean { ! return m_worksWhenModal; ! } ! ! public function setWorksWhenModal(flag:Boolean):Void { ! m_worksWhenModal = flag; ! } ! ! public function becomesKeyOnlyIfNeeded():Boolean { ! return m_becomesKeyOnlyIfNeeded; ! } ! ! public function setBecomesKeyOnlyIfNeeded(flag:Boolean):Void { ! m_becomesKeyOnlyIfNeeded = flag; ! } ! /* ! public function sendEvent (theEvent:NSEvent):Void { ! _sendEventBecomesKeyOnlyIfNeeded ! (theEvent, _becomesKeyOnlyIfNeeded); ! }*/ } \ No newline at end of file --- 34,141 ---- class org.actionstep.NSPanel extends NSWindow { ! private var m_isFloatingPanel:Boolean; ! private var m_worksWhenModal:Boolean; ! private var m_becomesKeyOnlyIfNeeded:Boolean; ! ! //Style Mask ! public static var NSUtilityWindowMask:Number = 16; ! public static var NSDocModalWindowMask:Number = 32; ! ! /* ! // ! // New alert interface of Mac OS X ! // ! public static function NSBeginAlertSheet ! (title:String, msg:String, defaultButton:String, alternateButton:String, otherButton:String, ! docWindow:NSWindow, modalDelegate:Object, willEndSelector:String, didEndSelector:String, ! contextInfo, msg:String):Void ! ! public static function NSBeginCriticalAlertSheet ! (title:String, msg:String, defaultButton:String, alternateButton:String, otherButton:String, ! docWindow:NSWindow, modalDelegate:Object, willEndSelector:String, didEndSelector:String, ! contextInfo, msg:String):Void ! ! public static function NSBeginInformationalAlertSheet ! (title:String, msg:String, defaultButton:String, alternateButton:String, otherButton:String, ! docWindow:NSWindow, modalDelegate:Object, willEndSelector:String, didEndSelector:String, ! contextInfo, msg:String):Void ! */ ! ! public function NSPanel() { ! //init(); ! } ! ! public function init():NSPanel { ! var style:Number = NSTitledWindowMask// | NSClosableWindowMask; ! initWithContentRectStyleMask(new NSRect(0, 0, 100, 100), style) ! ! //setReleasedWhenClosed(false); ! //setHidesOnDeactivate(true); ! //setExcludedFromWindowsMenu(true); ! ! //return initWithContentRectStyleMaskBackingDefer ! return this; ! } ! ! public function canBecomeKeyWindow():Boolean { ! return true; ! } ! ! public function canBecomeMainWindow():Boolean { ! return false; ! } ! ! /* ! * If we receive an escape, close. ! ! public function keyDown(theEvent:NSEvent) { ! if ( ! ("\e" == theEvent.charactersIgnoringModifiers()) && ! (styleMask & NSClosableWindowMask) == NSClosableWindowMask) ! close(); ! else ! super.keyDown(theEvent); ! }*/ ! ! /* ! * Determining the Panel's Behavior ! */ ! public function isFloatingPanel():Boolean { ! return m_isFloatingPanel; ! } ! ! public function setFloatingPanel(flag:Boolean):Void { ! if (m_isFloatingPanel != flag) { ! m_isFloatingPanel = flag; ! if (flag) ! setLevel(NSWindow.NSFloatingWindowLevel); ! else ! setLevel(NSWindow.NSNormalWindowLevel); ! } ! } ! ! public function worksWhenModal():Boolean { ! return m_worksWhenModal; ! } ! ! public function setWorksWhenModal(flag:Boolean):Void { ! m_worksWhenModal = flag; ! } ! ! public function becomesKeyOnlyIfNeeded():Boolean { ! return m_becomesKeyOnlyIfNeeded; ! } ! ! public function setBecomesKeyOnlyIfNeeded(flag:Boolean):Void { ! m_becomesKeyOnlyIfNeeded = flag; ! } ! /* ! public function sendEvent (theEvent:NSEvent):Void { ! _sendEventBecomesKeyOnlyIfNeeded ! (theEvent, _becomesKeyOnlyIfNeeded); ! }*/ ! ! public function description():String { ! return "NSPanel()"; ! } } \ No newline at end of file |