You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(124) |
Jun
(201) |
Jul
(168) |
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
---|
From: Tay R. C. <rc...@us...> - 2005-07-17 00:55:36
|
Update of /cvsroot/actionstep/actionstep/src/org/actionstep In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12885/actionstep/org/actionstep Modified Files: ASAlertPanel.as Log Message: Removed TRACEs in buttonAction Index: ASAlertPanel.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/ASAlertPanel.as,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ASAlertPanel.as 17 Jul 2005 00:49:06 -0000 1.4 --- ASAlertPanel.as 17 Jul 2005 00:55:27 -0000 1.5 *************** *** 447,454 **** //TRACE("alert panel buttonAction: from unknown sender - x%x\n", (unsigned)sender); } ! TRACE("making key"); ! var sess:NSModalSession = m_app.modalSession() ! sess.docWin.makeKeyWindow(); ! TRACE("done"); m_app.stopModalWithCode(m_result); } --- 447,451 ---- //TRACE("alert panel buttonAction: from unknown sender - x%x\n", (unsigned)sender); } ! m_app.modalSession().docWin.makeKeyWindow(); m_app.stopModalWithCode(m_result); } |
From: Tay R. C. <rc...@us...> - 2005-07-17 00:52:23
|
Update of /cvsroot/actionstep/actionstep/src/org/actionstep/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12218/actionstep/org/actionstep/test Modified Files: ASTestSheet.as Log Message: Allows user to control message Index: ASTestSheet.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/test/ASTestSheet.as,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ASTestSheet.as 16 Jul 2005 02:53:06 -0000 1.4 --- ASTestSheet.as 17 Jul 2005 00:52:14 -0000 1.5 *************** *** 41,45 **** begin:NSButton, end:NSButton, textField:NSTextField, textField2:NSTextField, ! nc:NSNotificationCenter public static function test() { --- 41,47 ---- begin:NSButton, end:NSButton, textField:NSTextField, textField2:NSTextField, ! nc:NSNotificationCenter, ! msg:String, ! alert:NSAlert public static function test() { *************** *** 80,104 **** end.setAction("stop"); ! main.setContentView(view1); ! other.setContentView(view2); app.run(); } - static var alert:NSAlert; - //modified code from: //http://developer.apple.com/documentation/Cocoa/Conceptual/Sheets/Tasks/UsingAlertSheets.html#//apple_ref/doc/uid/20001045 public static function trigger(button) { TRACE("Starting sheet..."); alert = (new NSAlert()).init(); alert.addButtonWithTitle("OK"); alert.addButtonWithTitle("Cancel"); alert.addButtonWithTitle("Don't Save"); ! alert.setMessageText("Delete the record?"); alert.setInformativeText("Deleted records cannot be restored."); alert.setAlertStyle(NSAlertStyle.NSWarning) - main.resignKeyWindow(); - alert.beginSheetModalForWindowModalDelegateDidEndSelectorContextInfo (main, self, "alertDidEndReturnCodeContextInfo", null); --- 82,111 ---- end.setAction("stop"); ! main.setContentView(view1); other.setContentView(view2); ! ! msg = "Delete the record?"; ! textField.setStringValue(msg); ! main.makeMainWindow(); app.run(); } //modified code from: //http://developer.apple.com/documentation/Cocoa/Conceptual/Sheets/Tasks/UsingAlertSheets.html#//apple_ref/doc/uid/20001045 public static function trigger(button) { TRACE("Starting sheet..."); + var str = textField.stringValue(); + if(str==null || str=="") { + str = msg; + textField.setStringValue(msg); + textField.drawCell(textField.cell()); + } alert = (new NSAlert()).init(); alert.addButtonWithTitle("OK"); alert.addButtonWithTitle("Cancel"); alert.addButtonWithTitle("Don't Save"); ! alert.setMessageText(str); alert.setInformativeText("Deleted records cannot be restored."); alert.setAlertStyle(NSAlertStyle.NSWarning) alert.beginSheetModalForWindowModalDelegateDidEndSelectorContextInfo (main, self, "alertDidEndReturnCodeContextInfo", null); |
From: Tay R. C. <rc...@us...> - 2005-07-17 00:50:53
|
Update of /cvsroot/actionstep/actionstep/src/org/actionstep In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11919/actionstep/org/actionstep Modified Files: NSApplication.as Log Message: Added - (NSModalSession) modalSession Index: NSApplication.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/NSApplication.as,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** NSApplication.as 16 Jul 2005 22:23:40 -0000 1.24 --- NSApplication.as 17 Jul 2005 00:50:39 -0000 1.25 *************** *** 415,418 **** --- 415,422 ---- return (m_modalSession==null) ? false : true; } + + public function modalSession():NSModalSession { + return m_modalSession; + } //end--modal |
From: Tay R. C. <rc...@us...> - 2005-07-17 00:50:02
|
Update of /cvsroot/actionstep/actionstep/src/org/actionstep In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11718/actionstep/org/actionstep Modified Files: NSAlert.as Log Message: Code for recalling last position Index: NSAlert.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/NSAlert.as,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** NSAlert.as 16 Jul 2005 02:59:00 -0000 1.3 --- NSAlert.as 17 Jul 2005 00:49:53 -0000 1.4 *************** *** 35,40 **** import org.actionstep.NSWindow; import org.actionstep.NSApplication; ! import org.actionstep.NSRect; ! import org.actionstep.ASAlertPanel; import org.actionstep.ASDraw; --- 35,41 ---- import org.actionstep.NSWindow; 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; *************** *** 51,54 **** --- 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 { *************** *** 187,197 **** --- 190,218 ---- ("", m_msg, list[0].title(), list[1].title(), list[2].title()); + window.resignKeyWindow(); m_sheet.display(); var content = m_sheet.contentView(); 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 |
From: Tay R. C. <rc...@us...> - 2005-07-17 00:49:29
|
Update of /cvsroot/actionstep/actionstep/src/org/actionstep In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11588/actionstep/org/actionstep Modified Files: ASAlertPanel.as Log Message: Allows user to control message Index: ASAlertPanel.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/ASAlertPanel.as,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ASAlertPanel.as 15 Jul 2005 20:01:07 -0000 1.3 --- ASAlertPanel.as 17 Jul 2005 00:49:06 -0000 1.4 *************** *** 44,48 **** import org.actionstep.NSScroller; import org.actionstep.NSPoint; ! //import org.actionstep.NSColor; import org.actionstep.constants.NSBorderType; --- 44,48 ---- import org.actionstep.NSScroller; import org.actionstep.NSPoint; ! //import org.actionstep.NSColor; import org.actionstep.NSModalSession; import org.actionstep.constants.NSBorderType; *************** *** 447,450 **** --- 447,454 ---- //TRACE("alert panel buttonAction: from unknown sender - x%x\n", (unsigned)sender); } + TRACE("making key"); + var sess:NSModalSession = m_app.modalSession() + sess.docWin.makeKeyWindow(); + TRACE("done"); m_app.stopModalWithCode(m_result); } |
From: Richard K. <ric...@us...> - 2005-07-16 22:25:42
|
Update of /cvsroot/actionstep/actionstep/src/org/actionstep/constants In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17444/constants Added Files: NSSelectionDirection.as Log Message: getting Event loops working (allowing nextKeyView/previousKeyView) --- NEW FILE: NSSelectionDirection.as --- /* * Copyright (c) 2005, InfoEther, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * 1) Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * 2) Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * 3) The name InfoEther, Inc. may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ class org.actionstep.constants.NSSelectionDirection { static var NSDirectSelection = new NSSelectionDirection(0); static var NSSelectingNext = new NSSelectionDirection(1); static var NSSelectingPrevious = new NSSelectionDirection(2); public var value:Number; private function NSSelectionDirection(num:Number) { value = num; } } |
From: Richard K. <ric...@us...> - 2005-07-16 22:23:52
|
Update of /cvsroot/actionstep/actionstep/src/org/actionstep In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16999 Modified Files: NSApplication.as NSView.as NSWindow.as Log Message: getting Event loops working (allowing nextKeyView/previousKeyView) Index: NSView.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/NSView.as,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** NSView.as 15 Jul 2005 21:31:10 -0000 1.27 --- NSView.as 16 Jul 2005 22:23:41 -0000 1.28 *************** *** 83,86 **** --- 83,90 ---- private var m_needsDisplay:Boolean; + // key view loop + private var m_nextKeyView:NSView; + private var m_previousKeyView:NSView; + // MovieClip variables private var m_mcFrame:MovieClip; *************** *** 814,817 **** --- 818,873 ---- } + // Managing the key view loop + + public function canBecomeKeyView():Boolean { + return acceptsFirstResponder() && isHiddenOrHasHiddenAncestor(); + } + + public function needsPanelToBecomeKey():Boolean { + return false; + } + + public function setNextKeyView(view:NSView) { + if (view == null || view instanceof NSView) { + if (view == null) { + m_nextKeyView.m_previousKeyView = null; + m_nextKeyView = null; + } else { + m_nextKeyView = view; + view.m_previousKeyView = this; + } + } else { + throw new Error("NSInternalInconsistencyException"); + } + } + + public function nextKeyView():NSView { + return m_nextKeyView; + } + + public function nextValidKeyView():NSView { + var result:NSView = m_nextKeyView; + while (true) { + if (result == null || result == this || result.canBecomeKeyView()) { + return result; + } + result = result.m_nextKeyView; + } + } + + public function previousKeyView():NSView { + return m_previousKeyView; + } + + public function previousValidKeyView():NSView { + var result:NSView = m_previousKeyView; + while (true) { + if (result == null || result == this || result.canBecomeKeyView()) { + return result; + } + result = result.m_previousKeyView; + } + } + //****************************************************** //* Controlling Notifications Index: NSWindow.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/NSWindow.as,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** NSWindow.as 15 Jul 2005 19:57:57 -0000 1.22 --- NSWindow.as 16 Jul 2005 22:23:41 -0000 1.23 *************** *** 43,46 **** --- 43,47 ---- import org.actionstep.constants.NSWindowOrderingMode; + import org.actionstep.constants.NSSelectionDirection; class org.actionstep.NSWindow extends NSResponder { *************** *** 91,95 **** private var m_contentRect:NSRect; private var m_firstResponder:NSResponder; ! private var m_initialFirstResponder:NSResponder; private var m_rootView:ASRootWindowView; private var m_contentView:NSView; --- 92,96 ---- private var m_contentRect:NSRect; private var m_firstResponder:NSResponder; ! private var m_initialFirstResponder:NSView; private var m_rootView:ASRootWindowView; private var m_contentView:NSView; *************** *** 100,106 **** private var m_title:String; - //private var m_keyWin:Number; - //private var m_mainWin:Number; - private var m_isKey:Boolean; private var m_isMain:Boolean; --- 101,104 ---- *************** *** 109,112 **** --- 107,112 ---- private var m_level:Number; + + private var m_selectionDirection:NSSelectionDirection; public function NSWindow() { *************** *** 122,134 **** m_level = NSNormalWindowLevel; m_windowNumber = g_instances.length; ! //var x = m_windowNumber; ! //if(m_keyWin==null) { ! //m_keyWin = x; ! //m_app.setKeyWindow(this); ! //} ! //if(m_mainWin==null) { ! //m_mainWin = x; ! //m_app.setMainWindow(this); ! //} } --- 122,126 ---- m_level = NSNormalWindowLevel; m_windowNumber = g_instances.length; ! m_selectionDirection = NSSelectionDirection.NSDirectSelection; } *************** *** 472,486 **** } } ! ! public function initialFirstResponder():NSResponder { return m_initialFirstResponder; } ! public function setInitialFirstResponder(value:NSResponder) { ! if (value instanceof NSView) { ! m_initialFirstResponder = value; } } // Working with display characteristics --- 464,563 ---- } } ! ! // Keyboard interface control ! ! public function setInitialFirstResponder(view:NSView) { ! if (view instanceof NSView) { ! m_initialFirstResponder = view; ! } ! } ! ! public function initialFirstResponder():NSView { return m_initialFirstResponder; } ! public function selectKeyViewFollowingView(view:NSView) { ! var fView:NSView; ! if (view instanceof NSView) { ! fView = view.nextValidKeyView(); ! if (fView != null) { ! makeFirstResponder(fView); ! if (fView.respondsToSelector("selectText")) { ! m_selectionDirection = NSSelectionDirection.NSSelectingNext; ! Object(fView).selectText(this); ! m_selectionDirection = NSSelectionDirection.NSDirectSelection; ! } ! } } } + public function selectKeyViewPrecedingView(view:NSView) { + var pView:NSView; + if (view instanceof NSView) { + pView = view.previousValidKeyView(); + if (pView != null) { + makeFirstResponder(pView); + if (pView.respondsToSelector("selectText")) { + m_selectionDirection = NSSelectionDirection.NSSelectingPrevious; + Object(pView).selectText(this); + m_selectionDirection = NSSelectionDirection.NSDirectSelection; + } + } + } + } + + public function selectNextKeyView(sender:Object) { + var result:NSView = null; + if (m_firstResponder instanceof NSView) { + result = NSView(m_firstResponder).nextValidKeyView(); + } + if (result == null && m_initialFirstResponder != null) { + if (m_initialFirstResponder.acceptsFirstResponder()) { + result = m_initialFirstResponder; + } else { + result = m_initialFirstResponder.nextValidKeyView(); + } + } + if (result != null) { + makeFirstResponder(result); + if (result.respondsToSelector("selectText")) { + m_selectionDirection = NSSelectionDirection.NSSelectingNext; + Object(result).selectText(this); + m_selectionDirection = NSSelectionDirection.NSDirectSelection; + } + } + } + + public function selectPreviousKeyView(sender:Object) { + var result:NSView = null; + if (m_firstResponder instanceof NSView) { + result = NSView(m_firstResponder).previousValidKeyView(); + } + if (result == null && m_initialFirstResponder != null) { + if (m_initialFirstResponder.acceptsFirstResponder()) { + result = m_initialFirstResponder; + } else { + result = m_initialFirstResponder.previousValidKeyView(); + } + } + if (result != null) { + makeFirstResponder(result); + if (result.respondsToSelector("selectText")) { + m_selectionDirection = NSSelectionDirection.NSSelectingPrevious; + Object(result).selectText(this); + m_selectionDirection = NSSelectionDirection.NSDirectSelection; + } + } + } + + public function keyViewSelectionDirection():NSSelectionDirection { + return m_selectionDirection; + } + + /* + â selectPreviousKeyView: + â keyViewSelectionDirection + */ + // Working with display characteristics Index: NSApplication.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/NSApplication.as,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** NSApplication.as 15 Jul 2005 14:00:09 -0000 1.23 --- NSApplication.as 16 Jul 2005 22:23:40 -0000 1.24 *************** *** 447,450 **** --- 447,453 ---- } //end--sheets + + + // NSWindows notifications private function __windowWillClose(notification:NSNotification) { |
From: Richard K. <ric...@us...> - 2005-07-16 22:23:06
|
Update of /cvsroot/actionstep/actionstep/src/org/actionstep In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16842 Modified Files: NSObject.as Log Message: a selector should be a Function Index: NSObject.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/NSObject.as,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** NSObject.as 15 Jul 2005 11:50:34 -0000 1.12 --- NSObject.as 16 Jul 2005 22:22:52 -0000 1.13 *************** *** 149,153 **** public function respondsToSelector(sel:String):Boolean { ! return hasOwnProperty(sel); } } \ No newline at end of file --- 149,153 ---- public function respondsToSelector(sel:String):Boolean { ! return (this[sel] != undefined) && (this[sel] instanceof Function); } } \ No newline at end of file |
From: Tay R. C. <rc...@us...> - 2005-07-16 02:59:09
|
Update of /cvsroot/actionstep/actionstep/src/org/actionstep In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31886/actionstep/org/actionstep Modified Files: NSAlert.as Log Message: supports - (ASAlertPanel) window Index: NSAlert.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/NSAlert.as,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** NSAlert.as 15 Jul 2005 20:00:09 -0000 1.2 --- NSAlert.as 16 Jul 2005 02:59:00 -0000 1.3 *************** *** 49,53 **** private var m_helpAnchor:String; private var m_delegate:Object; ! private var m_app:NSApplication; public static function alertWithMessageTextDefaultButtonAlternateButtonOtherButton --- 49,53 ---- private var m_helpAnchor:String; private var m_delegate:Object; ! private var m_app:NSApplication; private var m_sheet:ASAlertPanel; public static function alertWithMessageTextDefaultButtonAlternateButtonOtherButton *************** *** 175,179 **** // FIXME }*/ ! //-(id) window //! remove sheet --- 175,182 ---- // FIXME }*/ ! //should be uncasted, if Cocoa-styled ! public function window():ASAlertPanel { ! return m_sheet; ! } //! remove sheet *************** *** 181,192 **** (window:NSWindow, delegate, sel:String, ctxt:Object):Void { var list:Array = m_buttons.internalList(); ! var sheet:ASAlertPanel = ASAlertPanel.NSGetAlertPanel ("", m_msg, list[0].title(), list[1].title(), list[2].title()); ! sheet.display(); ! var content = sheet.contentView(); ASDraw.solidRectWithRect(content.mcBounds(), content.bounds(), 0xdddddd); //add it to arg array ! arguments.unshift(sheet); m_app.beginSheetModalForWindowModalDelegateDidEndSelectorContextInfo.apply(m_app, arguments); } --- 184,196 ---- (window:NSWindow, delegate, sel:String, ctxt:Object):Void { var list:Array = m_buttons.internalList(); ! m_sheet = ASAlertPanel.NSGetAlertPanel ("", m_msg, list[0].title(), list[1].title(), list[2].title()); ! ! m_sheet.display(); ! var content = m_sheet.contentView(); ASDraw.solidRectWithRect(content.mcBounds(), content.bounds(), 0xdddddd); //add it to arg array ! arguments.unshift(m_sheet); m_app.beginSheetModalForWindowModalDelegateDidEndSelectorContextInfo.apply(m_app, arguments); } |
From: Tay R. C. <rc...@us...> - 2005-07-16 02:53:19
|
Update of /cvsroot/actionstep/actionstep/src/org/actionstep/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30974/actionstep/org/actionstep/test Modified Files: ASTestSheet.as Log Message: Some minor changes to remove old code Index: ASTestSheet.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/test/ASTestSheet.as,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ASTestSheet.as 15 Jul 2005 22:37:15 -0000 1.3 --- ASTestSheet.as 16 Jul 2005 02:53:06 -0000 1.4 *************** *** 37,44 **** self = ASTestSheet, app:NSApplication = NSApplication.sharedApplication(), ! main:NSWindow, error:NSWindow, other:NSWindow, ! view1, view2,// view3, begin:NSButton, end:NSButton, ! textField:NSTextField, textField2:NSTextField public static function test() { --- 37,45 ---- self = ASTestSheet, app:NSApplication = NSApplication.sharedApplication(), ! main:NSWindow, other:NSWindow, ! view1, view2, begin:NSButton, end:NSButton, ! textField:NSTextField, textField2:NSTextField, ! nc:NSNotificationCenter public static function test() { *************** *** 46,51 **** main= (new NSWindow()).initWithContentRectStyleMask(new NSRect(50,50,250,250), NSWindow.NSTitledWindowMask); main.setTitle("Main"); - //error = (new NSWindow()).initWithContentRectStyleMask(new NSRect(125,100,250,250), NSWindow.NSTitledWindowMask); - //error.setTitle("Error"); other = (new NSWindow()).initWithContentRectStyleMask(new NSRect(400,100,250,250), NSWindow.NSTitledWindowMask); other.setTitle("Some Other Window"); --- 47,50 ---- *************** *** 55,60 **** view2 = (new ASTestView()).initWithFrame(new NSRect(0,0,250,250)); view2.setBorderColor(new NSColor(0xFF0000)); - var view3 = (new ASTestView()).initWithFrame(new NSRect(0,0,250,250)); - view3.setBorderColor(new NSColor(0xFF0000)); begin = (new NSButton()).initWithFrame(new NSRect(10,80,70,30)); --- 54,57 ---- *************** *** 84,90 **** main.setContentView(view1); ! other.setContentView(view3); ! //other.setContentView(view3); ! view2.setHidden(true); app.run(); --- 81,85 ---- main.setContentView(view1); ! other.setContentView(view2); app.run(); *************** *** 105,111 **** main.resignKeyWindow(); - //view2.setHidden(false); ! alert.beginSheetModalForWindowModalDelegateDidEndSelectorContextInfo(main, self, "alertDidEndReturnCodeContextInfo", null); } --- 100,106 ---- main.resignKeyWindow(); ! alert.beginSheetModalForWindowModalDelegateDidEndSelectorContextInfo ! (main, self, "alertDidEndReturnCodeContextInfo", null); } |
From: Richard K. <ric...@us...> - 2005-07-15 22:37:24
|
Update of /cvsroot/actionstep/actionstep/src/org/actionstep/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21937/test Modified Files: ASTestSheet.as Log Message: give the backgrounds some color, change release to close Index: ASTestSheet.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/test/ASTestSheet.as,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ASTestSheet.as 15 Jul 2005 12:26:55 -0000 1.2 --- ASTestSheet.as 15 Jul 2005 22:37:15 -0000 1.3 *************** *** 55,60 **** view2 = (new ASTestView()).initWithFrame(new NSRect(0,0,250,250)); view2.setBorderColor(new NSColor(0xFF0000)); ! //view3 = (new ASTestView()).initWithFrame(new NSRect(0,0,250,250)); ! //view3.setBorderColor(new NSColor(0xFF0000)); begin = (new NSButton()).initWithFrame(new NSRect(10,80,70,30)); --- 55,60 ---- view2 = (new ASTestView()).initWithFrame(new NSRect(0,0,250,250)); view2.setBorderColor(new NSColor(0xFF0000)); ! var view3 = (new ASTestView()).initWithFrame(new NSRect(0,0,250,250)); ! view3.setBorderColor(new NSColor(0xFF0000)); begin = (new NSButton()).initWithFrame(new NSRect(10,80,70,30)); *************** *** 84,88 **** main.setContentView(view1); ! error.setContentView(view2); //other.setContentView(view3); view2.setHidden(true); --- 84,88 ---- main.setContentView(view1); ! other.setContentView(view3); //other.setContentView(view3); view2.setHidden(true); *************** *** 100,109 **** alert.addButtonWithTitle("OK"); alert.addButtonWithTitle("Cancel"); alert.addButtonWithTitle("Don't Save"); ! alert.setMessageText("Delete the record"); alert.setInformativeText("Deleted records cannot be restored."); alert.setAlertStyle(NSAlertStyle.NSWarning) main.resignKeyWindow(); ! view2.setHidden(false); alert.beginSheetModalForWindowModalDelegateDidEndSelectorContextInfo(main, self, "alertDidEndReturnCodeContextInfo", null); --- 100,109 ---- alert.addButtonWithTitle("OK"); alert.addButtonWithTitle("Cancel"); alert.addButtonWithTitle("Don't Save"); ! alert.setMessageText("Delete the record?"); alert.setInformativeText("Deleted records cannot be restored."); alert.setAlertStyle(NSAlertStyle.NSWarning) main.resignKeyWindow(); ! //view2.setHidden(false); alert.beginSheetModalForWindowModalDelegateDidEndSelectorContextInfo(main, self, "alertDidEndReturnCodeContextInfo", null); *************** *** 113,117 **** var ans = ASUtils.findMatch([NSAlertReturn], ret); TRACE("button clicked: "+ans.prop); ! TRACE("releasing sheet... "+(sheet.release() ? "successful!" : "failed!")); } --- 113,118 ---- var ans = ASUtils.findMatch([NSAlertReturn], ret); TRACE("button clicked: "+ans.prop); ! TRACE("releasing sheet... "); ! sheet.close(); } |
From: Richard K. <ric...@us...> - 2005-07-15 22:36:36
|
Update of /cvsroot/actionstep/actionstep/src/org/actionstep In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21800 Modified Files: ASRootWindowView.as Log Message: get rid of m_mcBase too on window close Index: ASRootWindowView.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/ASRootWindowView.as,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** ASRootWindowView.as 15 Jul 2005 22:27:03 -0000 1.15 --- ASRootWindowView.as 15 Jul 2005 22:36:25 -0000 1.16 *************** *** 149,152 **** --- 149,158 ---- } + public function removeMovieClips():Void { + super.removeMovieClips(); + m_mcBase.removeMovieClip(); + m_mcBase = null; + } + private function updateFrameMovieClipSize():Void { super.updateFrameMovieClipSize(); |
From: Richard K. <ric...@us...> - 2005-07-15 22:27:12
|
Update of /cvsroot/actionstep/actionstep/src/org/actionstep In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19957 Modified Files: ASRootWindowView.as Log Message: all windows should adjust shadows, not just bordered ones Index: ASRootWindowView.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/ASRootWindowView.as,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** ASRootWindowView.as 15 Jul 2005 22:04:34 -0000 1.14 --- ASRootWindowView.as 15 Jul 2005 22:27:03 -0000 1.15 *************** *** 425,431 **** m_mcBounds.clear(); var styleMask:Number = m_window.styleMask(); - if (styleMask == NSWindow.NSBorderlessWindowMask) { - return; - } var isKey:Boolean = m_window.isKeyWindow(); --- 425,428 ---- *************** *** 445,448 **** --- 442,450 ---- m_mcBase.filters = [m_shadowFilter]; } + + if (styleMask == NSWindow.NSBorderlessWindowMask) { + return; + } + var fillColors:Array = isKey ? [0xFFFFFF, 0xDEDEDE, 0xC6C6C6] : [0xFFFFFF, 0xDEDEDE, 0xFFFFFF]; |
From: Richard K. <ric...@us...> - 2005-07-15 22:04:42
|
Update of /cvsroot/actionstep/actionstep/src/org/actionstep In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15257 Modified Files: ASRootWindowView.as Log Message: change the shadow filter for windows when key window Index: ASRootWindowView.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/ASRootWindowView.as,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** ASRootWindowView.as 15 Jul 2005 21:31:10 -0000 1.13 --- ASRootWindowView.as 15 Jul 2005 22:04:34 -0000 1.14 *************** *** 64,69 **** private var m_resizeClip:MovieClip; private var m_mcBase:MovieClip; ! --- 64,70 ---- private var m_resizeClip:MovieClip; + // For flash 8 private var m_mcBase:MovieClip; ! private var m_shadowFilter; *************** *** 280,289 **** m_mcBase = _root.createEmptyMovieClip("ASRootWindowView"+m_window.windowNumber(), depth); m_mcBase.view = this; ! var myfilter = new flash.filters.DropShadowFilter(); ! myfilter.distance = 4; ! myfilter.blurX = 10; ! myfilter.blurY = 10; ! myfilter.angle = 45; ! m_mcBase.filters = [myfilter]; _root["ASRootWindowView"+m_window.windowNumber()].window = m_window; m_mcFrame = m_mcBase.createEmptyMovieClip("MCFRAME", 1); --- 281,291 ---- m_mcBase = _root.createEmptyMovieClip("ASRootWindowView"+m_window.windowNumber(), depth); m_mcBase.view = this; ! m_shadowFilter = new flash.filters.DropShadowFilter(); ! m_shadowFilter.blurX = 20; ! m_shadowFilter.blurY = 20; ! m_shadowFilter.alpha = .6; ! m_shadowFilter.stength = .7; ! m_shadowFilter.angle = 90; ! m_mcBase.filters = [m_shadowFilter]; _root["ASRootWindowView"+m_window.windowNumber()].window = m_window; m_mcFrame = m_mcBase.createEmptyMovieClip("MCFRAME", 1); *************** *** 428,431 **** --- 430,448 ---- var isKey:Boolean = m_window.isKeyWindow(); + if (isKey) { + m_shadowFilter.blurX = 20; + m_shadowFilter.blurY = 15; + m_shadowFilter.alpha = .6; + m_shadowFilter.stength = .7; + m_shadowFilter.angle = 90; + m_mcBase.filters = [m_shadowFilter]; + } else { + m_shadowFilter.blurX = 10; + m_shadowFilter.blurY = 4; + m_shadowFilter.alpha = .4; + m_shadowFilter.stength = .3; + m_shadowFilter.angle = 90; + m_mcBase.filters = [m_shadowFilter]; + } var fillColors:Array = isKey ? [0xFFFFFF, 0xDEDEDE, 0xC6C6C6] : [0xFFFFFF, 0xDEDEDE, 0xFFFFFF]; |
From: Richard K. <ric...@us...> - 2005-07-15 21:31:19
|
Update of /cvsroot/actionstep/actionstep/src/org/actionstep In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8685 Modified Files: ASRootWindowView.as NSView.as Log Message: added flash 8 shadows behind windows Index: ASRootWindowView.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/ASRootWindowView.as,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** ASRootWindowView.as 13 Jul 2005 15:49:53 -0000 1.12 --- ASRootWindowView.as 15 Jul 2005 21:31:10 -0000 1.13 *************** *** 63,66 **** --- 63,70 ---- private var m_resizeClip:MovieClip; + + private var m_mcBase:MovieClip; + + public function ASRootWindowView() { *************** *** 88,91 **** --- 92,96 ---- if (m_mcBounds != null) { if (m_window.styleMask() & NSWindow.NSResizableWindowMask) { + m_resizeClip = m_mcBounds.createEmptyMovieClip("ResizeClip", 1000000); with(m_resizeClip) { *************** *** 145,149 **** private function updateFrameMovieClipSize():Void { super.updateFrameMovieClipSize(); ! if (m_mcFrame != null) { m_resizeClip._x = m_frame.size.width-12; m_resizeClip._y = m_frame.size.height-12; --- 150,154 ---- private function updateFrameMovieClipSize():Void { super.updateFrameMovieClipSize(); ! if (m_mcBase != null) { m_resizeClip._x = m_frame.size.width-12; m_resizeClip._y = m_frame.size.height-12; *************** *** 153,156 **** --- 158,169 ---- } } + + private function updateFrameMovieClipPosition():Void { + if (m_mcBase == null) { + return; + } + m_mcBase._x = m_frame.origin.x; + m_mcBase._y = m_frame.origin.y; + } public static function lowestView():ASRootWindowView { *************** *** 249,258 **** public function matchDepth() { ! if (m_mcFrame == null) { return; } ! var oldDepth:Number = m_mcFrame.getDepth(); if (m_targetDepth != oldDepth) { ! m_mcFrame.swapDepths(m_targetDepth); _root.getInstanceAtDepth(oldDepth).view.matchDepth(); } --- 262,271 ---- public function matchDepth() { ! if (m_mcBase == null) { return; } ! var oldDepth:Number = m_mcBase.getDepth(); if (m_targetDepth != oldDepth) { ! m_mcBase.swapDepths(m_targetDepth); _root.getInstanceAtDepth(oldDepth).view.matchDepth(); } *************** *** 265,270 **** depth = m_window.windowNumber()+100; } ! m_mcFrame = _root.createEmptyMovieClip("ASRootWindowView"+m_window.windowNumber(), depth); _root["ASRootWindowView"+m_window.windowNumber()].window = m_window; matchDepth(); m_mcFrame.onEnterFrame = function() { --- 278,292 ---- depth = m_window.windowNumber()+100; } ! m_mcBase = _root.createEmptyMovieClip("ASRootWindowView"+m_window.windowNumber(), depth); ! m_mcBase.view = this; ! var myfilter = new flash.filters.DropShadowFilter(); ! myfilter.distance = 4; ! myfilter.blurX = 10; ! myfilter.blurY = 10; ! myfilter.angle = 45; ! m_mcBase.filters = [myfilter]; _root["ASRootWindowView"+m_window.windowNumber()].window = m_window; + m_mcFrame = m_mcBase.createEmptyMovieClip("MCFRAME", 1); + m_mcFrame.window = m_window; matchDepth(); m_mcFrame.onEnterFrame = function() { *************** *** 316,320 **** public function display() { ! if(m_mcFrame == undefined) { createMovieClips(); } --- 338,342 ---- public function display() { ! if(m_mcBase == undefined) { createMovieClips(); } *************** *** 325,329 **** public function displayIfNeeded() { ! if(m_mcFrame == undefined) { createMovieClips(); } --- 347,351 ---- public function displayIfNeeded() { ! if(m_mcBase == undefined) { createMovieClips(); } Index: NSView.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/NSView.as,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** NSView.as 13 Jul 2005 15:49:53 -0000 1.26 --- NSView.as 15 Jul 2005 21:31:10 -0000 1.27 *************** *** 203,208 **** m_mcFrame.endFill(); m_mcFrame.lineTo(0, 0); ! m_mcFrame._x = m_frame.origin.x; ! m_mcFrame._y = m_frame.origin.y; m_mcFrameMask.clear(); --- 203,207 ---- m_mcFrame.endFill(); m_mcFrame.lineTo(0, 0); ! updateFrameMovieClipPosition(); m_mcFrameMask.clear(); *************** *** 216,219 **** --- 215,226 ---- } + private function updateFrameMovieClipPosition():Void { + if (m_mcFrame == null) { + return; + } + m_mcFrame._x = m_frame.origin.x; + m_mcFrame._y = m_frame.origin.y; + } + private function updateFrameMovieClipPerspective():Void { if (m_mcFrame == null) { *************** *** 522,529 **** m_frame.origin.x = origin.x; m_frame.origin.y = origin.y; ! if (m_mcFrame != null) { ! m_mcFrame._x = m_frame.origin.x; ! m_mcFrame._y = m_frame.origin.y; ! } if(m_postsFrameChangedNotifications) { m_notificationCenter.postNotificationWithNameObject(NSViewFrameDidChangeNotification, this); --- 529,533 ---- m_frame.origin.x = origin.x; m_frame.origin.y = origin.y; ! updateFrameMovieClipPosition(); if(m_postsFrameChangedNotifications) { m_notificationCenter.postNotificationWithNameObject(NSViewFrameDidChangeNotification, this); |
From: Richard K. <ric...@us...> - 2005-07-15 20:01:17
|
Update of /cvsroot/actionstep/actionstep/src/org/actionstep In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20931 Modified Files: ASAlertPanel.as Log Message: move buttons to bottom Index: ASAlertPanel.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/ASAlertPanel.as,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ASAlertPanel.as 15 Jul 2005 12:27:12 -0000 1.2 --- ASAlertPanel.as 15 Jul 2005 20:01:07 -0000 1.3 *************** *** 185,189 **** m_msgField.setSelectable(false); m_msgField.setBezeled(false); ! //m_msgField.setDrawsBackground(true); //m_msgField.setBackgroundColor(NSColor.controlBackgroundColor()); m_msgField.setAlignment(NSTextAlignment.NSCenterTextAlignment); --- 185,189 ---- m_msgField.setSelectable(false); m_msgField.setBezeled(false); ! m_msgField.setDrawsBackground(false); //m_msgField.setBackgroundColor(NSColor.controlBackgroundColor()); m_msgField.setAlignment(NSTextAlignment.NSCenterTextAlignment); *************** *** 364,367 **** --- 364,370 ---- content = contentView(); bounds = content.bounds(); + + TRACE(bounds); + TRACE(frame()); // now we can place the buttons. *************** *** 373,377 **** position -= bsize.width; rect.origin.x = position; ! rect.origin.y = bounds.origin.y + ButtonBottom; rect.size.width = bsize.width; rect.size.height = bsize.height; --- 376,380 ---- position -= bsize.width; rect.origin.x = position; ! rect.origin.y = bounds.maxY() - (bsize.height*2 + ButtonBottom); rect.size.width = bsize.width; rect.size.height = bsize.height; |
From: Richard K. <ric...@us...> - 2005-07-15 20:00:32
|
Update of /cvsroot/actionstep/actionstep/src/org/actionstep In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20698 Modified Files: NSAlert.as Log Message: change the background Index: NSAlert.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/NSAlert.as,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NSAlert.as 15 Jul 2005 12:23:23 -0000 1.1 --- NSAlert.as 15 Jul 2005 20:00:09 -0000 1.2 *************** *** 185,189 **** sheet.display(); var content = sheet.contentView(); ! ASDraw.solidRectWithRect(content.mcBounds(), content.bounds(), 0xffffff); //add it to arg array --- 185,189 ---- sheet.display(); var content = sheet.contentView(); ! ASDraw.solidRectWithRect(content.mcBounds(), content.bounds(), 0xdddddd); //add it to arg array |
From: Richard K. <ric...@us...> - 2005-07-15 19:58:15
|
Update of /cvsroot/actionstep/actionstep/src/org/actionstep In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20297 Modified Files: NSWindow.as Log Message: release on NSWindow should actually be close Index: NSWindow.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/NSWindow.as,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** NSWindow.as 14 Jul 2005 21:53:42 -0000 1.21 --- NSWindow.as 15 Jul 2005 19:57:57 -0000 1.22 *************** *** 534,538 **** public function close() { ! TRACE("$close window..."); } --- 534,541 ---- public function close() { ! release(); ! m_notificationCenter.postNotificationWithNameObject(NSWindowWillCloseNotification, this); ! // m_nsapp.removeWindowsItem(); ??? ! // order out ??? } *************** *** 546,550 **** } ! public function release():Boolean { m_rootView.removeFromSuperview(); return true; --- 549,553 ---- } ! private function release():Boolean { m_rootView.removeFromSuperview(); return true; |
From: Tom C. <tom...@us...> - 2005-07-15 17:20:48
|
Update of /cvsroot/actionstep/actionstep/src/org/actionstep In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13079/src/org/actionstep Modified Files: ASDebugger.as Log Message: Minor refactoring, also, ASDebugger.m_connected is typed now Index: ASDebugger.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/ASDebugger.as,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ASDebugger.as 2 Jun 2005 03:34:32 -0000 1.7 --- ASDebugger.as 15 Jul 2005 17:20:39 -0000 1.8 *************** *** 67,71 **** var m_hostname; ! var m_connected; var m_identifier; var m_connection:XMLSocket; --- 67,71 ---- var m_hostname; ! var m_connected:Boolean; var m_identifier; var m_connection:XMLSocket; *************** *** 244,253 **** public function onConnect(isConnected:Boolean):Void { ! if (isConnected) { ! m_connected = true; ! } ! else { ! m_connected = false; ! } } --- 244,248 ---- public function onConnect(isConnected:Boolean):Void { ! m_connected = isConnected; } |
From: Richard K. <ric...@us...> - 2005-07-15 14:00:19
|
Update of /cvsroot/actionstep/actionstep/src/org/actionstep In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1325 Modified Files: NSApplication.as Log Message: enable switching to a new key/main window if the key/main window is closed Index: NSApplication.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/NSApplication.as,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** NSApplication.as 15 Jul 2005 12:17:36 -0000 1.22 --- NSApplication.as 15 Jul 2005 14:00:09 -0000 1.23 *************** *** 449,452 **** --- 449,502 ---- private function __windowWillClose(notification:NSNotification) { + var window:NSWindow = NSWindow(notification.object); + var windowList:Array = this.windows(); + var targetList:Array = new Array(); + var count = windowList.length; + var wasKey:Boolean = window.isKeyWindow(); + var wasMain:Boolean = window.isMainWindow(); + var i:Number; + for (i = 0;i<count;i++) { + if (windowList[i].canBecomeKeyWindow() && windowList[i].isVisible() && (windowList[i]!=window)) { + targetList.push(windowList) + } + } + count = targetList.length; + if (wasMain && (count == 0)) { + //terminate after delegate call to applicationShouldTerminateAfterLastWindowClosed + } + if (wasMain) { + window.resignMainWindow(); + } + if (wasKey) { + window.resignKeyWindow(); + } + + window = mainWindow(); + if (window != null && window.canBecomeKeyWindow()) { + window.makeKeyAndOrderFront(this); + } else if (window != null) { + for (i = 0;i<count;i++) { + window = NSWindow(targetList[i]); + if (window.canBecomeKeyWindow()) { + window.makeKeyAndOrderFront(this); + } + } + } else { + for (i = 0;i<count;i++) { + window = NSWindow(targetList[i]); + if (window.canBecomeMainWindow()) { + window.makeMainWindow(this); + break; + } + } + for (i = 0;i<count;i++) { + window = NSWindow(targetList[i]); + if (window.canBecomeKeyWindow()) { + window.makeKeyAndOrderFront(this); + break; + } + } + + } } |
From: Tay R. C. <rc...@us...> - 2005-07-15 12:27:26
|
Update of /cvsroot/actionstep/actionstep/src/org/actionstep In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17042/actionstep/org/actionstep Modified Files: ASAlertPanel.as Log Message: Removed trace action Index: ASAlertPanel.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/ASAlertPanel.as,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ASAlertPanel.as 15 Jul 2005 12:23:45 -0000 1.1 --- ASAlertPanel.as 15 Jul 2005 12:27:12 -0000 1.2 *************** *** 444,448 **** //TRACE("alert panel buttonAction: from unknown sender - x%x\n", (unsigned)sender); } - TRACE("clicked!"); m_app.stopModalWithCode(m_result); } --- 444,447 ---- |
From: Tay R. C. <rc...@us...> - 2005-07-15 12:27:23
|
Update of /cvsroot/actionstep/actionstep/src/org/actionstep/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16985/actionstep/org/actionstep/test Modified Files: ASTestSheet.as Log Message: Added tutorial source url Index: ASTestSheet.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/test/ASTestSheet.as,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ASTestSheet.as 15 Jul 2005 12:19:33 -0000 1.1 --- ASTestSheet.as 15 Jul 2005 12:26:55 -0000 1.2 *************** *** 93,97 **** static var alert:NSAlert; ! //tracking starts before modal can start posing! public static function trigger(button) { TRACE("Starting sheet..."); --- 93,98 ---- static var alert:NSAlert; ! //modified code from: ! //http://developer.apple.com/documentation/Cocoa/Conceptual/Sheets/Tasks/UsingAlertSheets.html#//apple_ref/doc/uid/20001045 public static function trigger(button) { TRACE("Starting sheet..."); |
From: Tay R. C. <rc...@us...> - 2005-07-15 12:24:05
|
Update of /cvsroot/actionstep/actionstep/src/org/actionstep In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16418/actionstep/org/actionstep Added Files: ASAlertPanel.as Log Message: Simple dialog drawing --- NEW FILE: ASAlertPanel.as --- (This appears to be a binary file; contents omitted.) |
From: Tay R. C. <rc...@us...> - 2005-07-15 12:23:34
|
Update of /cvsroot/actionstep/actionstep/src/org/actionstep In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16383/actionstep/org/actionstep Added Files: NSAlert.as Log Message: Simple dialog drawing --- NEW FILE: NSAlert.as --- (This appears to be a binary file; contents omitted.) |
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 |