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: Scott H. <sco...@us...> - 2005-07-25 05:31:33
|
Update of /cvsroot/actionstep/actionstep/src/org/actionstep In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22774/src/org/actionstep Modified Files: NSCalendarDate.as Log Message: description() calls should now work Index: NSCalendarDate.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/NSCalendarDate.as,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** NSCalendarDate.as 25 Jul 2005 05:28:39 -0000 1.2 --- NSCalendarDate.as 25 Jul 2005 05:31:23 -0000 1.3 *************** *** 309,313 **** locale:NSDictionary):String { ! return super.toString(); //!implement } --- 309,313 ---- locale:NSDictionary):String { ! return NSCalendarDate.formatDate(format, this, locale); //!implement } |
From: Scott H. <sco...@us...> - 2005-07-25 05:28:51
|
Update of /cvsroot/actionstep/actionstep/src/org/actionstep In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22374/src/org/actionstep Modified Files: NSCalendarDate.as Log Message: First version of formatting. All formatting methods untested. Unformat not yet implemented. Index: NSCalendarDate.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/NSCalendarDate.as,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NSCalendarDate.as 25 Jul 2005 03:14:50 -0000 1.1 --- NSCalendarDate.as 25 Jul 2005 05:28:39 -0000 1.2 *************** *** 32,37 **** */ ! import org.actionstep.NSObject; import org.actionstep.NSDictionary; /** --- 32,40 ---- */ ! import org.actionstep.NSArray; import org.actionstep.NSDictionary; + import org.actionstep.NSException; + import org.actionstep.NSObject; + import org.actionstep.NSUserDefaults; /** *************** *** 42,51 **** */ class org.actionstep.NSCalendarDate extends Date //! should really be NSDate ! { private static var MSPERDAY:Number = 86400000; private static var MSPERHOUR:Number = 3600000; private static var MSPERMINUTE:Number = 60000; private static var MSPERSECOND:Number = 1000; private static var g_firstDayInCommonEra:Date; private var m_calendarFormat:String; --- 45,61 ---- */ class org.actionstep.NSCalendarDate extends Date //! should really be NSDate ! { ! /** The number of milliseconds in a day. */ private static var MSPERDAY:Number = 86400000; + /** The number of milliseconds in an hour. */ private static var MSPERHOUR:Number = 3600000; + /** The number of milliseconds in a minute. */ private static var MSPERMINUTE:Number = 60000; + /** The number of milliseconds in a second. */ private static var MSPERSECOND:Number = 1000; + + /** Format specifier character to function map. */ + private static var g_types:Object; private static var g_firstDayInCommonEra:Date; private var m_calendarFormat:String; *************** *** 89,93 **** format:String, locale:NSDictionary):NSCalendarDate { ! //! implement m_calendarFormat = format; --- 99,103 ---- format:String, locale:NSDictionary):NSCalendarDate { ! NSCalendarDate.reverseFormatWithDescriptionFormatLocale(description, format, locale); m_calendarFormat = format; *************** *** 509,526 **** //****************************************************** ! //* Events ! //****************************************************** ! //****************************************************** ! //* Protected Methods ! //****************************************************** ! //****************************************************** ! //* Private Methods ! //****************************************************** ! //****************************************************** ! //* Public Static Properties //****************************************************** ! //****************************************************** ! //* Public Static Methods ! //****************************************************** //****************************************************** //* Static Constructor --- 519,895 ---- //****************************************************** ! //* Date Formatting Stuff //****************************************************** ! ! /** ! * Formats the date date according to the calendar format format, and ! * returns the resulting string. ! */ ! private static function formatDate(format:String, date:NSCalendarDate, ! locale:NSDictionary):String ! { ! var char:String; // the current character ! var frmtPrt:String; // the formatted "part" ! var isRep:Boolean = false; // "is" a replace character (character following %) ! var len:Number = format.length; ! var formatted:String; ! ! if (locale == null) ! { ! // locale = default; ! } ! ! // ! // Move through the format string's characters. ! // ! for (var i:Number = 0; i < len; i++) ! { ! char = format.charAt(i); ! ! if (isRep) ! { ! if (isTypeCharacter(char)) ! { ! formatted = g_types[char](char, date, locale); ! format = format.substring(0, i - 1) + formatted + ! format.substring(i); ! len += formatted.length - 2; ! } ! else ! { ! //! error? ! } ! ! isRep = false; ! continue; ! } ! ! if (char == "%") ! isRep = true; ! } ! ! return format; ! } ! ! ! /** ! * Uses a string representation of a date and the format string ! * originally used to output the date, and returns the date described. ! */ ! private static function reverseFormatWithDescriptionFormatLocale( ! date:String, format:String, locale:NSDictionary):NSCalendarDate ! { ! var ret:NSCalendarDate; ! ! ret = new NSCalendarDate(); ! ! return ret; ! } ! ! ! /** ! * Handles a percentage symbol. ! */ ! private static function handlePercentage(char:String, date:NSCalendarDate, ! locale:NSDictionary):String ! { ! return "%"; ! } ! ! ! /** ! * Handles a formatted weekday. ! */ ! private static function handleWeekDay(char:String, date:NSCalendarDate, ! locale:NSDictionary):String ! { ! var str:String; ! var arr:NSArray; ! var dayOfWeek:Number = date.dayOfWeek(); ! ! switch (char) ! { ! case "a": ! arr = NSArray(locale.objectForKey( ! NSUserDefaults.NSShortWeekDayNameArray)); ! str = String(arr.objectAtIndex(dayOfWeek)); ! break; ! ! case "A": ! arr = NSArray(locale.objectForKey( ! NSUserDefaults.NSWeekDayNameArray)); ! str = String(arr.objectAtIndex(dayOfWeek)); ! break; ! ! case "w": ! str = dayOfWeek.toString(); ! break; ! ! } ! ! return str; ! } ! ! ! /** ! * Handles a formatted month. ! */ ! private static function handleMonth(char:String, date:NSCalendarDate, ! locale:NSDictionary):String ! { ! var str:String; ! var arr:NSArray; ! var month:Number = date.monthOfYear() - 1; ! ! switch (char) ! { ! case "b": ! arr = NSArray(locale.objectForKey( ! NSUserDefaults.NSShortMonthNameArray)); ! str = String(arr.objectAtIndex(month)); ! break; ! ! case "B": ! arr = NSArray(locale.objectForKey( ! NSUserDefaults.NSMonthNameArray)); ! str = String(arr.objectAtIndex(month)); ! break; ! ! case "m": ! str = month.toString(); ! ! if (str.length == 1) ! str = "0" + str; ! ! break; ! ! } ! ! return str; ! } ! ! ! /** ! * Handles the locale default (%c = %x %x). ! */ ! private static function handleLocaleDefault(char:String, date:NSCalendarDate, ! locale:NSDictionary):String ! { ! var str:String = ""; ! ! str += handleDefaultDate(char, date, locale) + " "; ! str += handleDefaultTime(char, date, locale); ! ! return str; ! } ! ! ! /** ! * Handles the day of the month. ! */ ! private static function handleDay(char:String, date:NSCalendarDate, ! locale:NSDictionary):String ! { ! var str:String ! ! switch (char) ! { ! case "d": ! str = date.dayOfMonth().toString(); ! ! if (str.length == 1) ! str = "0" + str; ! ! break; ! ! case "e": ! str = date.dayOfMonth().toString(); ! break; ! ! case "j": ! str = date.dayOfYear().toString(); ! break; ! ! } ! ! return str; ! } ! ! ! /** ! * Returns the number of milliseconds (0 - 999). ! */ ! private static function handleMilliseconds(char:String, date:NSCalendarDate, ! locale:NSDictionary):String ! { ! return date.getMilliseconds().toString(); ! } ! ! ! /** ! * Handles the hour. ! */ ! private static function handleHour(char:String, date:NSCalendarDate, ! locale:NSDictionary):String ! { ! var str:String; ! ! switch (char) ! { ! case "H": ! str = date.hourOfDay().toString(); ! break; ! ! case "I": ! str = ((date.hourOfDay() % 12) + 1).toString(); ! break; ! ! } ! ! if (str.length == 1) ! str = "0" + str; ! ! return str; ! } ! ! ! /** ! * Handles the timezone. ! */ ! private static function handleTimeZone(char:String, date:NSCalendarDate, ! locale:NSDictionary):String ! { ! var str:String; ! ! switch (char) ! { ! case "z": ! var hr:String = Math.floor(date.timeZone()).toString(); ! var mn:String = ((date.timeZone() % 1) * 60).toString(); ! ! if (hr.length == 1) ! hr = "0" + hr; ! ! if (mn.length == 1) ! mn = "0" + mn; ! ! str = hr + mn; ! break; ! ! case "Z": ! str = "time zone name"; //! implement ! break; ! ! } ! ! return str; ! } ! ! ! /** ! * Handles the minute. ! */ ! private static function handleMinute(char:String, date:NSCalendarDate, ! locale:NSDictionary):String ! { ! var str:String = date.minuteOfHour().toString(); ! ! if (str.length == 1) ! str = "0" + str; ! ! return str; ! } ! ! ! /** ! * Returns AM / PM. ! */ ! private static function handleAmPm(char:String, date:NSCalendarDate, ! locale:NSDictionary):String ! { ! var str:String ! var arr:NSArray = NSArray(locale.objectForKey( ! NSUserDefaults.NSAMPMDesignation)); ! ! if (date.hourOfDay() < 12) ! str = String(arr.objectAtIndex(0)); ! else ! str = String(arr.objectAtIndex(1)); ! ! return str; ! } ! ! ! /** ! * Handles second representation. ! */ ! private static function handleSecond(char:String, date:NSCalendarDate, ! locale:NSDictionary):String ! { ! var str:String = date.secondOfMinute().toString(); ! ! if (str.length == 1) ! str = "0" + str; ! ! return str; ! } ! ! ! /** ! * Handles years. ! */ ! private static function handleYear(char:String, date:NSCalendarDate, ! locale:NSDictionary):String ! { ! var str:String; ! ! switch (char) ! { ! case "y": ! str = date.getYear().toString(); ! break; ! ! case "Y": ! str = date.getFullYear().toString(); ! break; ! ! } ! ! return str; ! } ! ! ! /** ! * Handles default dates according to the locale. ! */ ! private static function handleDefaultDate(char:String, date:NSCalendarDate, ! locale:NSDictionary):String ! { ! return NSCalendarDate.formatDate(String( ! locale.objectForKey(NSUserDefaults.NSDateFormatString)), ! date, locale); ! } ! ! ! /** ! * Handles default time according to the locale. ! */ ! private static function handleDefaultTime(char:String, date:NSCalendarDate, ! locale:NSDictionary):String ! { ! return NSCalendarDate.formatDate(String( ! locale.objectForKey(NSUserDefaults.NSTimeDateFormatString)), ! date, locale); ! } ! ! ! /** ! * Returns whether a character should be handled by one of the handlers or not. ! */ ! private static function isTypeCharacter(char:String):Boolean ! { ! return (g_types[char] != undefined); ! } ! //****************************************************** //* Static Constructor *************** *** 537,540 **** --- 906,928 ---- g_firstDayInCommonEra = new Date(1, 0, 1, 0, 0, 0, 0); + // + // Handler functions (for date formatting) + // + g_types = new Object(); + g_types["%"] = handlePercentage; + g_types["a"] = g_types["A"] = g_types["w"] = handleWeekDay; + g_types["b"] = g_types["B"] = g_types["m"] = handleMonth; + g_types["c"] = handleLocaleDefault; + g_types["d"] = g_types["e"] = g_types["j"] = handleDay; + g_types["F"] = handleMilliseconds; + g_types["H"] = g_types["I"] = handleHour; + g_types["M"] = handleMinute; + g_types["p"] = handleAmPm; + g_types["S"] = handleSecond; + g_types["y"] = g_types["Y"] = handleYear; + g_types["z"] = g_types["Z"] = handleTimeZone; + g_types["x"] = handleDefaultDate; + g_types["X"] = handleDefaultTime; + return true; } |
From: Scott H. <sco...@us...> - 2005-07-25 05:27:43
|
Update of /cvsroot/actionstep/actionstep/src/org/actionstep In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22236/src/org/actionstep Added Files: NSUserDefaults.as Log Message: Defines some contants (and defaults) for use by NSCalendarDate --- NEW FILE: NSUserDefaults.as --- (This appears to be a binary file; contents omitted.) |
From: Scott H. <sco...@us...> - 2005-07-25 03:44:45
|
Update of /cvsroot/actionstep/actionstep/src/org/actionstep In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7064/src/org/actionstep Modified Files: ASStringFormatter.as Log Message: Optimized isTypeCharacter() Index: ASStringFormatter.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/ASStringFormatter.as,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ASStringFormatter.as 25 Jul 2005 00:19:20 -0000 1.4 --- ASStringFormatter.as 25 Jul 2005 03:44:34 -0000 1.5 *************** *** 35,38 **** --- 35,39 ---- import org.actionstep.NSArray; import org.actionstep.NSEnumerator; + import org.actionstep.NSCalendarDate; /** *************** *** 183,193 **** private static function isTypeCharacter(char:String):Boolean { ! for (var tc:String in g_types) ! { ! if (char == tc) ! return true; ! } ! ! return false; } --- 184,188 ---- private static function isTypeCharacter(char:String):Boolean { ! return (g_types[char] != undefined); } *************** *** 456,460 **** */ private static function handleObject(flags:Array, width:Number, zeroPad:Boolean, precision:Number, arg:Object):String ! { return arg.toString(); } --- 451,458 ---- */ private static function handleObject(flags:Array, width:Number, zeroPad:Boolean, precision:Number, arg:Object):String ! { ! if (arg instanceof NSCalendarDate) ! return arg.descriptionWithLocale(null); // null = default locale ! return arg.toString(); } |
From: Scott H. <sco...@us...> - 2005-07-25 03:14:58
|
Update of /cvsroot/actionstep/actionstep/src/org/actionstep In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1243/src/org/actionstep Added Files: NSCalendarDate.as Log Message: First version Does not yet implement formatting methods, or inits that require knowledge of format strings. --- NEW FILE: NSCalendarDate.as --- (This appears to be a binary file; contents omitted.) |
From: Scott H. <sco...@us...> - 2005-07-25 03:13:52
|
Update of /cvsroot/actionstep/actionstep/src/org/actionstep/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1004/src/org/actionstep/test Added Files: ASTestDate.as Log Message: Tests NSCalendarDates --- NEW FILE: ASTestDate.as --- (This appears to be a binary file; contents omitted.) |
From: Scott H. <sco...@us...> - 2005-07-25 00:21:03
|
Update of /cvsroot/actionstep/actionstep/src/org/actionstep In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1218/src/org/actionstep Added Files: NSLog.as Log Message: Wraps around what is ordinarily the NSLog method in Cocoa. Just a timesaver. --- NEW FILE: NSLog.as --- (This appears to be a binary file; contents omitted.) |
From: Scott H. <sco...@us...> - 2005-07-25 00:19:48
|
Update of /cvsroot/actionstep/actionstep/src/org/actionstep In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv773/src/org/actionstep Modified Files: ASStringFormatter.as Log Message: Added some new handlers, as well as some new type letters. Index: ASStringFormatter.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/ASStringFormatter.as,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ASStringFormatter.as 29 Jun 2005 08:16:11 -0000 1.3 --- ASStringFormatter.as 25 Jul 2005 00:19:20 -0000 1.4 *************** *** 178,181 **** --- 178,184 ---- + /** + * Returns whether a character should be handled by one of the handlers or not. + */ private static function isTypeCharacter(char:String):Boolean { *************** *** 193,196 **** --- 196,202 ---- //****************************************************** + /** + * Returns an integer. + */ private static function handleInteger(flags:Array, width:Number, zeroPad:Boolean, precision:Number, arg:Object):String { *************** *** 225,228 **** --- 231,237 ---- + /** + * Returns a float. + */ private static function handleFloat(flags:Array, width:Number, zeroPad:Boolean, precision:Number, arg:Object):String { *************** *** 281,291 **** } ! private static function handleScientificNotation(flags:Array, width:Number, zeroPad:Boolean, precision:Number, arg:Object):String { return arg.toString(); } private static function handleOctal(flags:Array, width:Number, zeroPad:Boolean, precision:Number, arg:Object):String { --- 290,307 ---- } ! ! /** ! * Returns a number in scientific notation. ! */ private static function handleScientificNotation(flags:Array, width:Number, zeroPad:Boolean, precision:Number, arg:Object):String { + //! implement return arg.toString(); } + /** + * Returns an octal (base-8) number. + */ private static function handleOctal(flags:Array, width:Number, zeroPad:Boolean, precision:Number, arg:Object):String { *************** *** 349,352 **** --- 365,371 ---- + /** + * Returns a string. + */ private static function handleString(flags:Array, width:Number, zeroPad:Boolean, precision:Number, arg:Object):String { *************** *** 376,379 **** --- 395,401 ---- + /** + * Returns a hexidecimal number (0x11abcd). + */ private static function handleHex(flags:Array, width:Number, zeroPad:Boolean, precision:Number, arg:Object, upperCase:Boolean):String { *************** *** 420,434 **** ! private static function handleHexUpperCase(flags:Array, width:Number, zeroPad:Boolean, precision:Number, arg:Object):String { return handleHex(flags, width, zeroPad, precision, arg, true); } ! private static function handleObject(flags:Array, width:Number, zeroPad:Boolean, precision:Number, arg:Object):String { return arg.toString(); } //****************************************************** //* Static Constructor --- 442,474 ---- ! /** ! * Returns a hexidecimal number with upper case letters. ! */ ! private static function handleHexUpperCase(flags:Array, width:Number, ! zeroPad:Boolean, precision:Number, arg:Object):String { return handleHex(flags, width, zeroPad, precision, arg, true); } ! ! /** ! * Returns a toString() of the object. ! */ private static function handleObject(flags:Array, width:Number, zeroPad:Boolean, precision:Number, arg:Object):String { return arg.toString(); } + + + /** + * Returns a percent sign. + */ + private static function handlePercent(flags:Array, width:Number, + zeroPad:Boolean, precision:Number, arg:Object):String + { + return "%"; + } + //****************************************************** //* Static Constructor *************** *** 447,451 **** // g_types = new Object(); ! g_types["d"] = g_types["i"] = handleInteger; g_types["f"] = handleFloat; g_types["o"] = handleOctal; --- 487,499 ---- // g_types = new Object(); ! g_types["d"] = ! g_types["i"] = ! g_types["D"] = ! g_types["u"] = ! g_types["U"] = ! g_types["hi"] = ! g_types["hu"] = ! g_types["qi"] = ! g_types["qu"] = handleInteger; g_types["f"] = handleFloat; g_types["o"] = handleOctal; *************** *** 453,456 **** --- 501,505 ---- g_types["x"] = handleHex; g_types["X"] = handleHexUpperCase; + g_types["%"] = handlePercent; g_types["@"] = handleObject; |
From: Tay R. C. <rc...@us...> - 2005-07-24 00:14:33
|
Update of /cvsroot/actionstep/actionstep/src/org/actionstep In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16315/actionstep/org/actionstep Modified Files: ASAlertPanel.as Log Message: reworked resizing and positioning and controls code Index: ASAlertPanel.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/ASAlertPanel.as,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ASAlertPanel.as 18 Jul 2005 03:01:03 -0000 1.7 --- ASAlertPanel.as 24 Jul 2005 00:13:48 -0000 1.8 *************** *** 32,437 **** import org.actionstep.NSApplication; import org.actionstep.NSButton; - import org.actionstep.NSTextField; - import org.actionstep.NSScrollView; import org.actionstep.NSRect; - import org.actionstep.NSControl; import org.actionstep.NSView; import org.actionstep.NSFont; ! import org.actionstep.NSImage; ! import org.actionstep.NSBox; import org.actionstep.NSSize; - //import org.actionstep.NSWindow; - import org.actionstep.NSScroller; import org.actionstep.NSPoint; - //import org.actionstep.NSColor; import org.actionstep.NSModalSession; - import org.actionstep.constants.NSBorderType; - import org.actionstep.constants.NSTitlePosition; - import org.actionstep.constants.NSTextAlignment; import org.actionstep.constants.NSAlertReturn; - //import org.actionstep.test.ASTestView; - - //below is from GNUStep - /* - These functions may be called "recursively". For example, from a - timed event. Therefore, there may be several alert panel active - at the same time, but only the first one will be THE - m_standardAlertPanel, which will not be released once finished - with, but which will be kept for future use. - - +---------+---------+---------+---------+---------+ - | std !=0 | std act | pan=std | pan=new | std=new | - +---------+---------+---------+---------+---------+ - a: | F | N/A | | X | X | - +---------+---------+---------+---------+---------+ - b: | V | F | X | | | - +---------+---------+---------+---------+---------+ - c: | V | V | | X | | - +---------+---------+---------+---------+---------+ - */ - - - /* - TODO: Check if this discrepancy is wanted and needed. - If not, we could merge these parameters, even - for the alert panel, setting its window title to "Alert". - */ - class org.actionstep.ASAlertPanel extends NSPanel { ! private var m_app:NSApplication; ! private static var m_standardAlertPanel:ASAlertPanel; private static var m_informationalAlertPanel:ASAlertPanel; private static var m_criticalAlertPanel:ASAlertPanel; ! private static var m_def:NSButton; ! private static var m_alt:NSButton; ! private static var m_oth:NSButton; ! private static var m_ico:NSButton; ! private static var m_titleField:NSTextField; ! private static var m_msgField:NSTextField; ! private static var m_scroll:NSScrollView; ! private static var m_result:NSAlertReturn; ! private static var m_green:Boolean; ! private static var m_defTitle:String="Alert"; ! private static var m_callback:Object; ! private static var m_selector:String; ! // TODO: Check this value. ! private static var WTitleHeight:Number = 0; ! private static var WinMinWidth:Number = 400;//362 ! private static var WinMinHeight:Number = 161; ! private static var IconSide:Number = 48; ! // from the top of the window. ! private static var IconBottom:Number = -56; ! private static var IconLeft:Number = 8; ! private static var TitleLeft:Number = 64; ! private static var TitleMinRight:Number = 8; ! private static var LineHeight:Number = 2; ! // from the top of the window. ! private static var LineBottom:Number = -66; ! private static var LineLeft:Number = 0; ! // in either direction. ! //private static var ScrollMinSize:Number = 48; private static var MessageFont:NSFont; //messageFontOfSize(14); - // 5 is too little margin. - private static var MessageHorzMargin:Number = 8; - //private static var MessageMinHeight:Number = 20; - // from the top of the buttons. - private static var MessageVertMargin:Number = 6; - // from the top of the window; - private static var MessageTop:Number = -72; - - // from the bottom of the window. - private static var ButtonBottom:Number = 8; - private static var ButtonMargin:Number = 8; - private static var ButtonInterspace:Number = 10; - private static var ButtonMinHeight:Number = 24; - private static var ButtonMinWidth:Number = 72; ! public function init ():ASAlertPanel { //super.init(); ! m_app = NSApplication.sharedApplication(); ! MessageFont = NSFont.systemFontOfSize(14); ! var rect:NSRect = NSRect.ZeroRect, ! image:NSImage, ! box:NSBox, ! r:NSRect = new NSRect(0, 0, WinMinWidth, WinMinHeight), ! titleFont:NSFont = NSFont.systemFontOfSize(18); ! ! var titleHeight:Number = titleFont.pointSize(); //assume in pixels ! ! initWithContentRectStyleMask(r, NSTitledWindowMask); ! setTitle(""); - - var content:NSView = contentView(); // we're an ATTENTION panel, therefore: //setHidesOnDeactivate(false); setBecomesKeyOnlyIfNeeded(false); ! // Title ! rect.size.height = 0; // will be sized to fit anyway. ! rect.size.width = 0; // will be sized to fit anyway. ! rect.origin.y = r.origin.y + r.size.height + IconBottom + (IconSide - titleHeight)/2;; ! rect.origin.x = TitleLeft; ! var m_titleField:NSTextField = (new NSTextField()).initWithFrame(rect); ! //m_titleField.setAutoresizingMask(NSViewMinYMargin); ! m_titleField.setEditable(true); ! m_titleField.setSelectable(true); ! m_titleField.setBezeled(false); ! m_titleField.setDrawsBackground(false); ! m_titleField.setStringValue(""); ! m_titleField.setFont(titleFont); ! // Horizontal line ! rect.size.height = LineHeight; ! rect.size.width = r.size.width; ! rect.origin.y = r.origin.y + r.size.height + LineBottom; ! rect.origin.x = LineLeft; ! box = (new NSBox()).initWithFrame(rect); ! //box.setAutoresizingMask(NSViewWidthSizable | NSViewMinYMargin); ! box.setTitlePosition(NSTitlePosition.NSNoTitle); ! box.setBorderType(NSBorderType.NSGrooveBorder); ! content.addSubview(box); ! // Then, make the subviews that'll be sized by sizePanelToFit; ! rect.reset(0, 0, 0, 0); ! m_msgField = (new NSTextField()).initWithFrame(rect); ! m_msgField.setEditable(true); ! m_msgField.setSelectable(false); ! m_msgField.setBezeled(false); ! m_msgField.setDrawsBackground(false); ! //m_msgField.setBackgroundColor(NSColor.controlBackgroundColor()); ! m_msgField.setAlignment(NSTextAlignment.NSCenterTextAlignment); ! m_msgField.setStringValue(""); ! m_msgField.setFont(MessageFont); ! m_def = _makeButtonWithRect(rect); ! //m_def.setKeyEquivalent("\r"); ! //m_def.setHighlightsBy(NSPushInCellMask | NSChangeGrayCellMask | NSContentsCellMask); ! //m_def.setImagePosition(NSCellImagePosition.NSImageRight); ! //m_def.setImage(NSImage.imageNamed("common_ret")); ! //m_def.setAlternateImage(NSImage.imageNamed("common_retH")); ! m_alt = _makeButtonWithRect(rect); ! m_oth = _makeButtonWithRect(rect); ! rect.size.height = 80; ! m_scroll = makeScrollViewWithRect(rect); ! m_result = NSAlertReturn.NSError; ! m_green = true; ! return this; ! } ! ! public static function makeScrollViewWithRect(rect:NSRect):NSScrollView { ! var lineHeight:Number = MessageFont.pointSize(); ! var m_scroll:NSScrollView = (new NSScrollView()).initWithFrame(rect); ! ! m_scroll.setBorderType(NSBorderType.NSLineBorder); ! //m_scroll.setBackgroundColor(NSColor.controlBackgroundColor()); ! m_scroll.setHasHorizontalScroller(true) ! m_scroll.setHasVerticalScroller(true); ! m_scroll.setScrollsDynamically(true); ! m_scroll.setLineScroll(lineHeight); ! m_scroll.setPageScroll(lineHeight*10); ! return m_scroll; } ! public function _makeButtonWithRect (rect:NSRect):NSButton { var button:NSButton = (new NSButton()).initWithFrame(rect) - //button.setAutoresizingMask(NSViewMinXMargin | NSViewMaxYMargin) //button.setButtonType(NSButtonType.NSMomentaryPushButton); - button.setTitle(""); button.setTarget(this); button.setAction("buttonAction"); ! return button; } ! //macro ! private static function useControl(control:NSView):Boolean { ! return (control.superview()!=null) ! } ! ! public static function setControl(content:NSView, control:NSControl, title:String):Void { ! //orginal uses respondsToSelector ! if (title != null) { ! if (control["setTitle"]!=null) { ! control["setTitle"](title); ! } else if (control["setStringValue"]!=null) { ! control["setStringValue"](title); ! } ! control.sizeToFit(); ! if (!useControl(control)) { ! content.addSubview(control); ! } ! } else if (useControl(control)) { ! control.removeFromSuperview(); ! } ! } ! ! public function sizePanelToFit():Void { ! var bounds:NSRect, ! ssize:NSSize = new NSSize(0, 0), // screen size (corrected). ! bsize:NSSize = new NSSize(0, 0), // button size (max of the three). ! wsize:NSSize = new NSSize(0, 0), // window size (computed). ! content:NSView, ! buttons:Array=[], ! position:Number = 0, ! numberOfButtons:Number, ! needsScroll:Boolean, ! couldNeedScroll:Boolean, ! mask:Number = styleMask(); ! ! /* ! * Set size to the size of a content rectangle of a panel ! * that completely fills the screen. ! */ ! bounds = new NSRect(0, 0, Stage.width, Stage.height); ! ssize = bounds.size; ! ! // Let's size the title. ! if (useControl(m_titleField)) { ! var rect:NSRect = m_titleField.frame(); ! var width:Number = TitleLeft + rect.size.width + TitleMinRight; ! if (wsize.width < width) { ! wsize.width = width; ! // ssize.width < width = > the title will be silently clipped. ! } ! } ! ! wsize.height = -LineBottom; ! ! // Let's count the buttons. ! bsize.width = ButtonMinWidth; ! bsize.height = ButtonMinHeight; ! buttons[0] = m_def; ! buttons[1] = m_alt; ! buttons[2] = m_oth; ! numberOfButtons = 0; ! var i = buttons.length; ! while(i--) { ! if (useControl(buttons[i])) { ! var rect:NSRect = buttons[i].frame(); ! if (bsize.width < rect.size.width) ! bsize.width = rect.size.width; ! if (bsize.height < rect.size.height) ! bsize.height = rect.size.height; ! numberOfButtons++; ! } ! } ! ! if (numberOfButtons > 0) { ! // (with NSGetAlertPanel, there could be zero buttons). ! var width:Number = (bsize.width + ButtonInterspace) * numberOfButtons - ButtonInterspace + ButtonMargin * 2; ! /* ! * If the buttons are too wide or too high to fit in the screen, ! * then too bad! Thought it would be simple enough to put them ! * in the m_scroll view with the m_msgField. ! * TODO: See if we raise an exception here or if we let the ! * QA people detect this kind of problem. ! */ ! if (wsize.width < width) wsize.width = width; ! wsize.height += ButtonBottom + bsize.height; ! } ! ! // Let's see the size of the m_msgField and how to place it. ! needsScroll = false; ! couldNeedScroll = useControl(m_msgField); ! if (couldNeedScroll) { ! var rect:NSRect = m_msgField.frame() ! var width:Number = rect.size.width + 2*MessageHorzMargin; ! ! if (wsize.width < width) wsize.width = width; ! // The title could be large too, without implying a m_scroll view. ! needsScroll = (ssize.width < width); ! /* ! * But only the m_msgField can impose a great height, therefore ! * we check it along in the next paragraph. ! */ ! wsize.height += rect.size.height + 2 * MessageVertMargin; ! } else { ! wsize.height += MessageVertMargin; ! } ! ! // Strategically placed here, we resize the window. ! if (ssize.height < wsize.height) { ! wsize.height = ssize.height; ! needsScroll = couldNeedScroll; ! } else if (wsize.height < WinMinHeight) { ! wsize.height = WinMinHeight; ! } ! if (needsScroll) { ! wsize.width += Number(NSScroller.scrollerWidth + 4); ! } ! if (ssize.width < wsize.width) { ! wsize.width = ssize.width; ! } else if (wsize.width < WinMinWidth) { ! wsize.width = WinMinWidth; ! } ! bounds = new NSRect(0, 0, wsize.width, wsize.height); ! //bounds = NSWindow.contentRectForFrameRectStyleMask(bounds, mask); ! //setMaxSize(bounds.size); ! //setMinSize(bounds.size); ! setContentSize(wsize); ! content = contentView(); ! bounds = content.bounds(); ! TRACE(bounds); ! TRACE(frame()); ! ! // now we can place the buttons. ! if (numberOfButtons > 0) { ! position = bounds.origin.x + bounds.size.width - ButtonMargin; ! for (i = 0; i < 3; i++) { ! if (useControl(buttons[i])) { ! var rect:NSRect = NSRect.ZeroRect; ! 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; ! buttons[i].setFrame(rect); ! position -= ButtonInterspace; ! } ! } ! } ! ! // Finaly, place the message. ! if (useControl(m_msgField)) { ! var mrect:NSRect = m_msgField.frame(); ! if (needsScroll) { ! var srect:NSRect = NSRect.ZeroRect; ! ! // The m_scroll view takes all the space that is available. ! srect.origin.x = bounds.origin.x + MessageHorzMargin; ! if (numberOfButtons > 0) { ! srect.origin.y = bounds.origin.y + ButtonBottom + bsize.height + MessageVertMargin; ! } else { ! srect.origin.y = bounds.origin.y + MessageVertMargin; ! } ! srect.size.width = bounds.size.width - 2 * MessageHorzMargin; ! srect.size.height = bounds.origin.y + bounds.size.height + MessageTop - srect.origin.y; ! m_scroll.setFrame(srect) ! if (!useControl(m_scroll)) content.addSubview(m_scroll); ! m_msgField.removeFromSuperview(); ! mrect.origin.x = srect.origin.x + srect.size.width - mrect.size.width; ! mrect.origin.y = srect.origin.y + srect.size.height - mrect.size.height; ! m_msgField.setFrame(mrect); ! m_scroll.setDocumentView(m_msgField); ! (m_scroll.contentView()).scrollToPoint( ! new NSPoint (mrect.origin.x, mrect.origin.y + mrect.size.height - (m_scroll.contentView()).bounds().size.height)); ! m_scroll.reflectScrolledClipView(m_scroll.contentView()); ! } else { ! /* ! * We must center vertically the m_msgField because ! * the window has a minimum size, thus may be greated ! * than expected. ! */ ! mrect.origin.x = (wsize.width - mrect.size.width)/2; ! var vmargin:Number = bounds.size.height + LineBottom-mrect.size.height; ! ! if (numberOfButtons > 0) vmargin -= ButtonBottom + bsize.height; ! ! vmargin/= 2; // if negative, it'll bite up and down. ! mrect.origin.y = bounds.origin.y + vmargin; ! if (numberOfButtons > 0) mrect.origin.y += ButtonBottom + bsize.height; ! m_msgField.setFrame(mrect); ! } ! } else if (useControl(m_scroll)) { ! m_scroll.removeFromSuperview(); ! } ! ! m_green = false; ! content.display(); } --- 32,218 ---- import org.actionstep.NSApplication; import org.actionstep.NSButton; import org.actionstep.NSRect; import org.actionstep.NSView; import org.actionstep.NSFont; ! //import org.actionstep.NSImage; import org.actionstep.NSSize; import org.actionstep.NSPoint; import org.actionstep.constants.NSAlertReturn; class org.actionstep.ASAlertPanel extends NSPanel { + private static var g_init:Boolean; ! private static var m_app:NSApplication ! private static var m_defTitle:String="Alert"; ! ; private static var m_standardAlertPanel:ASAlertPanel; private static var m_informationalAlertPanel:ASAlertPanel; private static var m_criticalAlertPanel:ASAlertPanel; ! private var m_def:NSButton; ! private var m_alt:NSButton; ! private var m_oth:NSButton; ! private var m_ico:NSButton; ! private var m_btns:Array; ! //private var m_titleField:NSTextField; ! private var m_msgField:TextField; ! private var m_msg:String; ! private var m_infoField:TextField; ! private var m_info:String; ! private var m_result:NSAlertReturn; ! private var m_green:Boolean; ! ! private var m_callback:Object; ! private var m_selector:String; + // TODO: Check this value. + private static var WinPos:NSPoint; + private static var WinSize:NSSize; private static var MessageFont:NSFont; //messageFontOfSize(14); ! private static var IconLeft:Number = 24; ! private static var IconRight:Number = 16; ! private static var IconTop:Number = 15; ! ! private static var BtnTop:Number = 10; ! private static var BtnBottom:Number = 20; ! private static var BtnRight:Number = 24; ! private static var BtnMinHeight:Number = 24; ! private static var BtnMinWidth:Number = 72; ! private static var BtnInterspace:Number = 12; ! ! private static var MsgWidth = 200; ! private static var InfoWidth = 170; ! private static var InfoTop:Number = 8; ! private static var TFDiff = MsgWidth-InfoWidth; ! ! public function init():ASAlertPanel { //super.init(); ! var rect:NSRect = NSRect.ZeroRect; ! initWithContentRectStyleMask(rect, NSTitledWindowMask); setTitle(""); // we're an ATTENTION panel, therefore: //setHidesOnDeactivate(false); setBecomesKeyOnlyIfNeeded(false); + m_result = NSAlertReturn.NSError; + m_green = true; ! //Icon will never change position ! var content:NSView = contentView(); ! //image is screwed ! //var image:NSImage = NSImage.imageNamed("ASAlertIcon"); ! var isize:NSSize = new NSSize(64, 64); ! rect.reset(IconLeft, IconTop, isize.width, isize.height); ! m_ico = (new NSButton()).initWithFrame(rect); ! m_ico.setBordered(false); ! //m_ico.setImagePosition(NSCellImagePosition.NSImageOnly); ! //m_ico.setImage(image); ! m_ico.setTitle("Ico"); ! TRACE(m_ico); ! TRACE(content); ! TRACE(content.subviews()); ! content.addSubview(m_ico); ! ! //position will be set later ! rect.reset(0, 0, BtnMinWidth, BtnMinHeight); ! m_def = makeButtonWithRect(rect); ! //m_def.setKeyEquivalent("\r"); ! m_alt = makeButtonWithRect(rect); ! m_oth = makeButtonWithRect(rect); ! m_btns = [m_def, m_alt, m_oth]; ! ! if(g_init==null) { ! m_app = NSApplication.sharedApplication(); ! WinPos = new NSPoint(100, 100); ! WinSize = new NSSize(MsgWidth+isize.width+IconLeft+IconRight+BtnRight, 200); ! MessageFont = NSFont.systemFontOfSize(14); ! g_init = true; ! } ! setFrame(rect); ! return this; ! } ! private function positionElements() { ! var rect:NSRect = NSRect.ZeroRect; ! if(m_msgField==null) { //assume that m_infoField is also null ! var fmt:TextFormat = MessageFont.textFormat(); ! //position will be set later ! rect.origin.x = m_ico.frame().maxX() + IconRight; ! rect.origin.y = IconTop; ! rect.size.width = MsgWidth ! m_msgField = makeTF(rect, "m_msgField"); ! fmt.bold = true; ! m_msgField.setTextFormat(fmt); ! ! rect.size.width = InfoWidth ! m_infoField = makeTF(rect, "m_infoField"); ! fmt.bold = false; ! m_infoField.setTextFormat(fmt); ! } ! m_msgField.text = m_msg; ! m_infoField.text = m_info; ! var w:Number=0, i, btn; ! for(i in m_btns) { ! btn = m_btns[i]; ! w+=btn.frame().size.width; ! } ! w+= BtnInterspace * (m_btns.length-1) + IconLeft + BtnRight; ! if(w>m_msgField._width+m_msgField._x+BtnRight) { ! m_msgField._width = w-m_msgField._x-BtnRight; ! m_infoField._width = m_msgField._width-TFDiff; ! } ! m_infoField._y = m_msgField._height+m_msgField._y+InfoTop; ! var pt:NSPoint = new NSPoint(0, m_infoField._y+m_infoField._height+BtnTop); ! var icoy = m_ico.frame().maxY()+BtnTop ! if(pt.y<icoy) pt.y = icoy; ! w-=IconLeft-m_ico.frame().size.width+BtnRight ! for(i=0;i<3;i++) { ! btn = m_btns[i]; ! w-=btn.frame().size.width; ! pt.x = w; ! btn.setFrameOrigin(pt); ! w-=BtnInterspace; ! } ! //resize window ! rect.origin = WinPos.copy(); ! rect.size.width = m_msgField._width + m_msgField._x + BtnRight; ! rect.size.height = m_def.frame().maxY() + BtnBottom + rootView().titleRect().size.height; ! setFrame(rect); } ! private function makeButtonWithRect (rect:NSRect):NSButton { var button:NSButton = (new NSButton()).initWithFrame(rect) //button.setButtonType(NSButtonType.NSMomentaryPushButton); button.setTarget(this); button.setAction("buttonAction"); ! contentView().addSubview(button) ! return button; } ! private function makeTF(rect:NSRect, title:String):TextField { ! var content:NSView = contentView(); ! var mc:MovieClip = content.mcBounds(); ! //location is not impt ! mc.createTextField(title, mc.getNextHighestDepth(), rect.origin.x, rect.origin.y, rect.size.width, rect.size.height); ! var txt:TextField = mc[title] ! txt.type = "dynamic"; ! txt.selectable = true; ! txt.wordWrap = true; ! txt.autoSize = true; ! txt.border = true; ! return txt; } *************** *** 463,467 **** public function runModal(call:Object, sel:String):Void { ! if (m_green) sizePanelToFit(); m_callback = call; --- 244,248 ---- public function runModal(call:Object, sel:String):Void { ! //if (m_green) sizePanelToFit(); m_callback = call; *************** *** 477,495 **** } ! public function setTitleMessageDefAltOther (title:String, message:String, defaultButton:String, alternateButton:String, otherButton:String):Void { ! var content:NSView = contentView(); ! ! setControl(content, m_titleField, title); ! if (useControl(m_scroll)) { ! // TODO: Remove the following line once NSView is corrected. ! m_scroll.setDocumentView(null); ! m_scroll.removeFromSuperview(); ! m_msgField.removeFromSuperview(); } - setControl(content, m_msgField, message); - setControl(content, m_def, defaultButton); - setControl(content, m_alt, alternateButton); - setControl(content, m_oth, otherButton); if (useControl(m_def)) { --- 258,274 ---- } ! //macro ! private static function useControl(control:NSView):Boolean { ! return (control.superview()!=null) ! } ! ! private function setTitleMessageDefAltOther (title:String, message:String, defaultButton:String, alternateButton:String, otherButton:String):Void { ! setTitle(title); ! m_msg = message; ! m_info = "Not supported yet."; ! for(var i in m_btns) { ! m_btns[i].setTitle(arguments[parseInt(i)+2]); } if (useControl(m_def)) { *************** *** 540,544 **** } ! public static function getSomePanel( instance:ASAlertPanel, m_defTitle:String, --- 319,323 ---- } ! private static function getSomePanel( instance:ASAlertPanel, m_defTitle:String, *************** *** 568,576 **** panel.setTitleMessageDefAltOther (title, message, defaultButton, alternateButton, otherButton); - panel.sizePanelToFit(); return panel; } public static function NSGetAlertPanel( title:String, --- 347,359 ---- panel.setTitleMessageDefAltOther (title, message, defaultButton, alternateButton, otherButton); return panel; } + public function display() { + super.display(); + positionElements(); + } + public static function NSGetAlertPanel( title:String, |
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 ---- |
From: Richard K. <ric...@us...> - 2005-07-21 03:45:13
|
Update of /cvsroot/actionstep/actionstep/src/org/actionstep In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19311 Modified Files: ASList.as Log Message: inset the scrollview for first responder Index: ASList.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/ASList.as,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ASList.as 20 Jul 2005 22:32:34 -0000 1.9 --- ASList.as 21 Jul 2005 02:36:14 -0000 1.10 *************** *** 30,33 **** --- 30,34 ---- import org.actionstep.NSControl; + import org.actionstep.NSView; import org.actionstep.NSRect; import org.actionstep.NSEvent; *************** *** 157,161 **** public function setFrame(rect:NSRect) { super.setFrame(rect); ! m_scrollView.setFrameSize(new NSSize(rect.size.width, rect.size.height)); setNeedsDisplay(true); } --- 158,162 ---- public function setFrame(rect:NSRect) { super.setFrame(rect); ! m_scrollView.setFrameSize(new NSSize(rect.size.width-2, rect.size.height-2)); setNeedsDisplay(true); } *************** *** 166,170 **** public function setFrameSize(size:NSSize) { super.setFrameSize(size); ! m_scrollView.setFrameSize(new NSSize(size.width, size.height)); setNeedsDisplay(true); } --- 167,171 ---- public function setFrameSize(size:NSSize) { super.setFrameSize(size); ! m_scrollView.setFrameSize(new NSSize(size.width-2, size.height-2)); setNeedsDisplay(true); } *************** *** 179,182 **** --- 180,188 ---- return m_listView.multipleSelection(); } + + public function setNextKeyView(view:NSView) { + m_listView.setNextKeyView(view); + super.setNextKeyView(view); + } /** |
From: Richard K. <ric...@us...> - 2005-07-21 02:38:27
|
Update of /cvsroot/actionstep/actionstep/src/org/actionstep/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19670/test Modified Files: ASTestKeyEvents.as Log Message: add titlebars Index: ASTestKeyEvents.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/test/ASTestKeyEvents.as,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ASTestKeyEvents.as 20 Jul 2005 18:07:12 -0000 1.3 --- ASTestKeyEvents.as 21 Jul 2005 02:37:48 -0000 1.4 *************** *** 49,57 **** var app = NSApplication.sharedApplication(); ! window1 = (new NSWindow()).initWithContentRect(new NSRect(0,0,250,500)); ! window2 = (new NSWindow()).initWithContentRect(new NSRect(251,0,250,500)); ! view1 = (new ASTestView()).initWithFrame(new NSRect(0,0,250,500)); ! view2 = (new ASTestView()).initWithFrame(new NSRect(0,0,250,500)); textField1 = (new NSTextField()).initWithFrame(new NSRect(10,20,120,30)); --- 49,57 ---- var app = NSApplication.sharedApplication(); ! window1 = (new NSWindow()).initWithContentRectStyleMask(new NSRect(10,25,250,250), NSWindow.NSTitledWindowMask | NSWindow.NSResizableWindowMask); ! window2 = (new NSWindow()).initWithContentRectStyleMask(new NSRect(262,25,250,250), NSWindow.NSTitledWindowMask | NSWindow.NSResizableWindowMask); ! view1 = (new ASTestView()).initWithFrame(new NSRect(0,0,250,250)); ! view2 = (new ASTestView()).initWithFrame(new NSRect(0,0,250,250)); textField1 = (new NSTextField()).initWithFrame(new NSRect(10,20,120,30)); |
From: Richard K. <ric...@us...> - 2005-07-21 02:38:06
|
Update of /cvsroot/actionstep/actionstep/src/org/actionstep In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19599 Modified Files: NSTextField.as Log Message: delay select text if textfield does not exist Index: NSTextField.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/NSTextField.as,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** NSTextField.as 20 Jul 2005 18:12:14 -0000 1.12 --- NSTextField.as 21 Jul 2005 02:37:24 -0000 1.13 *************** *** 67,73 **** --- 67,75 ---- private var m_delegate:Object; private var m_notificationCenter:NSNotificationCenter; + private var m_needsToSelectText:Boolean; public function NSTextField() { m_editor = null; + m_needsToSelectText = false; } *************** *** 177,184 **** if (isSelectable() && superview() != null) { if (m_editor == null) { - //ASFieldEditor.resignFirstResponder(); var x = NSTextFieldCell(m_cell).beginEditingWithDelegate(this); m_editor = x; if (m_editor == null) { return; } --- 179,186 ---- if (isSelectable() && superview() != null) { if (m_editor == null) { var x = NSTextFieldCell(m_cell).beginEditingWithDelegate(this); m_editor = x; if (m_editor == null) { + m_needsToSelectText = true; return; } *************** *** 188,191 **** --- 190,201 ---- } + public function drawRect(rect:NSRect) { + super.drawRect(rect); + if (m_needsToSelectText) { + m_needsToSelectText = false; + selectText(this); + } + } + // Working with the responder chain |
From: Richard K. <ric...@us...> - 2005-07-20 22:33:28
|
Update of /cvsroot/actionstep/actionstep/src/org/actionstep In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1666 Modified Files: NSButtonCell.as NSTextFieldCell.as Log Message: change highlighting for first responder Index: NSButtonCell.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/NSButtonCell.as,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** NSButtonCell.as 20 Jul 2005 18:07:11 -0000 1.25 --- NSButtonCell.as 20 Jul 2005 22:33:16 -0000 1.26 *************** *** 660,664 **** } if (m_showsFirstResponder) { ! ASTheme.current().drawFirstResponderWithRectInView(cellFrame, inView); } } --- 660,668 ---- } if (m_showsFirstResponder) { ! if (image != null) { ! ASTheme.current().drawFirstResponderWithRectInView(new NSRect(imageLocation.x-1, imageLocation.y-1, imageSize.width+2, imageSize.height+2), inView); ! } else { ! ASTheme.current().drawFirstResponderWithRectInView(cellFrame, inView); ! } } } Index: NSTextFieldCell.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/NSTextFieldCell.as,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** NSTextFieldCell.as 20 Jul 2005 18:07:11 -0000 1.19 --- NSTextFieldCell.as 20 Jul 2005 22:33:16 -0000 1.20 *************** *** 223,228 **** } ! tf._x = x; ! tf._y = y + (height - fontHeight)/2; tf._width = width-1; tf._height = fontHeight; --- 223,228 ---- } ! tf._x = x+(m_drawsBackground ? 3 : 0); ! tf._y = y + (m_drawsBackground ? (height - fontHeight)/2 : 0); tf._width = width-1; tf._height = fontHeight; |
From: Richard K. <ric...@us...> - 2005-07-20 22:32:43
|
Update of /cvsroot/actionstep/actionstep/src/org/actionstep In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1513 Modified Files: ASList.as ASListView.as Log Message: first responder control Index: ASListView.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/ASListView.as,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ASListView.as 11 Jul 2005 02:44:27 -0000 1.8 --- ASListView.as 20 Jul 2005 22:32:34 -0000 1.9 *************** *** 68,71 **** --- 68,97 ---- } + public function becomeFirstResponder():Boolean { + m_list.setShowsFirstResponder(true); + m_list.setNeedsDisplay(true); + return true; + } + + public function acceptsFirstResponder():Boolean { + return true; + } + + public function resignFirstResponder():Boolean { + m_list.setShowsFirstResponder(false); + m_list.setNeedsDisplay(true); + return true; + } + + public function becomeKeyWindow() { + m_list.setShowsFirstResponder(true); + m_list.setNeedsDisplay(true); + } + + public function resignKeyWindow() { + m_list.setShowsFirstResponder(false); + m_list.setNeedsDisplay(true); + } + public function setFont(font:NSFont) { m_font = font; Index: ASList.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/ASList.as,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ASList.as 11 Jul 2005 04:23:39 -0000 1.8 --- ASList.as 20 Jul 2005 22:32:34 -0000 1.9 *************** *** 54,57 **** --- 54,58 ---- private var m_target:Object; private var m_action:String; + private var m_showsFirstResponder:Boolean; public function initWithFrame(rect:NSRect):ASList { *************** *** 59,63 **** m_internalList = new NSArray(); m_scrollView = new NSScrollView(); ! m_scrollView.initWithFrame(new NSRect(0,0,rect.size.width, rect.size.height)); m_scrollView.setHasVerticalScroller(true); addSubview(m_scrollView); --- 60,64 ---- m_internalList = new NSArray(); m_scrollView = new NSScrollView(); ! m_scrollView.initWithFrame(new NSRect(0,1,rect.size.width-2, rect.size.height-2)); m_scrollView.setHasVerticalScroller(true); addSubview(m_scrollView); *************** *** 65,71 **** --- 66,107 ---- m_listView.initWithList(this); m_scrollView.setDocumentView(m_listView); + m_showsFirstResponder = false; return this; } + // Responder chain + + public function becomeFirstResponder():Boolean { + m_showsFirstResponder = true; + setNeedsDisplay(true); + return true; + } + + public function acceptsFirstResponder():Boolean { + return true; + } + + public function resignFirstResponder():Boolean { + m_showsFirstResponder = false; + setNeedsDisplay(true); + return true; + } + + public function becomeKeyWindow() { + m_showsFirstResponder = true; + setNeedsDisplay(true); + } + + public function resignKeyWindow() { + m_showsFirstResponder = false; + setNeedsDisplay(true); + } + + // configure display + + public function setShowsFirstResponder(value:Boolean) { + m_showsFirstResponder = value; + } + public function setShowListItemImages(value:Boolean) { m_listView.setShowListItemImages(value); *************** *** 327,331 **** --- 363,371 ---- public function drawRect(rect:NSRect) { + mcBounds().clear(); ASTheme.current().drawListWithRectInView(rect, this); + if (m_showsFirstResponder) { + ASTheme.current().drawFirstResponderWithRectInView(rect, this); + } } |
From: Richard K. <ric...@us...> - 2005-07-20 18:51:36
|
Update of /cvsroot/actionstep/actionstep/src/org/actionstep In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9249 Modified Files: ASTheme.as Log Message: playing with the first responder highlight Index: ASTheme.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/ASTheme.as,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** ASTheme.as 20 Jul 2005 18:07:10 -0000 1.20 --- ASTheme.as 20 Jul 2005 18:51:25 -0000 1.21 *************** *** 54,58 **** */ private function ASTheme() { ! m_firstResponderColor = new NSColor(0xC55660); } --- 54,58 ---- */ private function ASTheme() { ! m_firstResponderColor = new NSColor(0x3333dd); } *************** *** 104,108 **** public function drawFirstResponderWithRectInView(rect:NSRect, view:NSView) { ! ASDraw.outlineRectWithRect(view.mcBounds(), rect, [firstResponderColor().value]); } --- 104,122 ---- public function drawFirstResponderWithRectInView(rect:NSRect, view:NSView) { ! var mc = view.mcBounds(); ! var x = rect.origin.x+1; ! var y = rect.origin.y+1; ! var width = rect.size.width-3; ! var height = rect.size.height-3; ! var color = firstResponderColor().value; ! ! mc.lineStyle(3, color, 30); ! mc.moveTo(x, y); ! mc.lineTo(x+width, y); ! mc.lineTo(x+width, y+height); ! mc.lineTo(x, y+height); ! mc.lineTo(x, y); ! ! //ASDraw.outlineRectWithRect(view.mcBounds(), rect, [firstResponderColor().value]); } |
From: Richard K. <ric...@us...> - 2005-07-20 18:12:39
|
Update of /cvsroot/actionstep/actionstep/src/org/actionstep In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31970 Modified Files: NSTextField.as Log Message: validate editing before ending editing Index: NSTextField.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/NSTextField.as,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** NSTextField.as 20 Jul 2005 18:07:11 -0000 1.11 --- NSTextField.as 20 Jul 2005 18:12:14 -0000 1.12 *************** *** 211,214 **** --- 211,215 ---- public function resignKeyWindow() { if (m_cell.showsFirstResponder()) { + validateEditing(); m_cell.setShowsFirstResponder(false); setNeedsDisplay(true); *************** *** 220,223 **** --- 221,225 ---- public function resignFirstResponder():Boolean { if (m_cell.showsFirstResponder()) { + validateEditing(); m_cell.setShowsFirstResponder(false); setNeedsDisplay(true); |
From: Richard K. <ric...@us...> - 2005-07-20 18:07:28
|
Update of /cvsroot/actionstep/actionstep/src/org/actionstep In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30586 Modified Files: ASFieldEditor.as ASTheme.as ASThemeProtocol.as NSButtonCell.as NSTextField.as NSTextFieldCell.as Log Message: working on getting responder stuff all right, centered text (vertically) in textfield, refactored drawing first responder Index: ASThemeProtocol.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/ASThemeProtocol.as,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** ASThemeProtocol.as 20 Jul 2005 00:16:14 -0000 1.12 --- ASThemeProtocol.as 20 Jul 2005 18:07:11 -0000 1.13 *************** *** 87,91 **** * Draws the border around the button when it has key focus */ ! public function drawFirstResponderButtonWithRectInView(rect:NSRect, view:NSView); /** --- 87,91 ---- * Draws the border around the button when it has key focus */ ! public function drawFirstResponderWithRectInView(rect:NSRect, view:NSView); /** Index: ASFieldEditor.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/ASFieldEditor.as,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** ASFieldEditor.as 20 Jul 2005 00:16:15 -0000 1.13 --- ASFieldEditor.as 20 Jul 2005 18:07:10 -0000 1.14 *************** *** 33,37 **** import org.actionstep.NSNotificationCenter; import org.actionstep.ASUtils; - import org.actionstep.ASTheme; import org.actionstep.constants.NSTextMovement; --- 33,36 ---- *************** *** 238,242 **** m_textField.onKillFocus = null; m_textField.onSetFocus = null; - m_textField.border = false; m_textField.onScroller = null; m_textField.onChanged = null; --- 237,240 ---- *************** *** 254,259 **** m_textField.type = m_cell.isEditable() ? "input" : "dynamic"; m_textField.tabEnabled = false; - m_textField.border = true; - m_textField.borderColor = ASTheme.current().firstResponderColor().value; var tform:TextFormat; --- 252,255 ---- Index: NSTextFieldCell.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/NSTextFieldCell.as,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** NSTextFieldCell.as 19 Jul 2005 21:58:38 -0000 1.18 --- NSTextFieldCell.as 20 Jul 2005 18:07:11 -0000 1.19 *************** *** 206,209 **** --- 206,211 ---- var x = cellFrame.origin.x; var y = cellFrame.origin.y; + var text = stringValue(); + var fontHeight = m_font.getTextExtent("Why").height; if (m_drawsBackground) { *************** *** 217,229 **** if (tf.text != stringValue()) { ! tf.text = stringValue(); tf.setTextFormat(m_textFormat); } tf._x = x; ! tf._y = y; tf._width = width-1; ! tf._height = height-1; } - } --- 219,234 ---- if (tf.text != stringValue()) { ! tf.text = text; tf.setTextFormat(m_textFormat); } tf._x = x; ! tf._y = y + (height - fontHeight)/2; tf._width = width-1; ! tf._height = fontHeight; ! ! if (m_showsFirstResponder) { ! ASTheme.current().drawFirstResponderWithRectInView(cellFrame, inView); ! } } } Index: ASTheme.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/ASTheme.as,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** ASTheme.as 20 Jul 2005 00:16:14 -0000 1.19 --- ASTheme.as 20 Jul 2005 18:07:10 -0000 1.20 *************** *** 103,107 **** } ! public function drawFirstResponderButtonWithRectInView(rect:NSRect, view:NSView) { ASDraw.outlineRectWithRect(view.mcBounds(), rect, [firstResponderColor().value]); } --- 103,107 ---- } ! public function drawFirstResponderWithRectInView(rect:NSRect, view:NSView) { ASDraw.outlineRectWithRect(view.mcBounds(), rect, [firstResponderColor().value]); } Index: NSButtonCell.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/NSButtonCell.as,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** NSButtonCell.as 19 Jul 2005 22:13:17 -0000 1.24 --- NSButtonCell.as 20 Jul 2005 18:07:11 -0000 1.25 *************** *** 660,664 **** } if (m_showsFirstResponder) { ! ASTheme.current().drawFirstResponderButtonWithRectInView(cellFrame, inView); } } --- 660,664 ---- } if (m_showsFirstResponder) { ! ASTheme.current().drawFirstResponderWithRectInView(cellFrame, inView); } } Index: NSTextField.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/NSTextField.as,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** NSTextField.as 19 Jul 2005 21:58:38 -0000 1.10 --- NSTextField.as 20 Jul 2005 18:07:11 -0000 1.11 *************** *** 200,203 **** --- 200,205 ---- public function becomeFirstResponder():Boolean { if (acceptsFirstResponder()) { + m_cell.setShowsFirstResponder(true); + setNeedsDisplay(true); selectText(this); return true; *************** *** 207,210 **** --- 209,231 ---- } + public function resignKeyWindow() { + if (m_cell.showsFirstResponder()) { + m_cell.setShowsFirstResponder(false); + setNeedsDisplay(true); + ASFieldEditor.endEditing(); + m_editor = null; + } + } + + public function resignFirstResponder():Boolean { + if (m_cell.showsFirstResponder()) { + m_cell.setShowsFirstResponder(false); + setNeedsDisplay(true); + ASFieldEditor.endEditing(); + m_editor = null; + } + return super.resignFirstResponder(); + } + public function mouseDown(event:NSEvent) { if (!isSelectable()) { *************** *** 303,307 **** break; case NSTextMovement.NSBacktabTextMovement: - TRACE("here"); m_window.selectKeyViewPrecedingView(this); if (m_window.firstResponder() == m_window) { --- 324,327 ---- |
From: Richard K. <ric...@us...> - 2005-07-20 18:07:26
|
Update of /cvsroot/actionstep/actionstep/src/org/actionstep/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30586/test Modified Files: ASTestKeyEvents.as Log Message: working on getting responder stuff all right, centered text (vertically) in textfield, refactored drawing first responder Index: ASTestKeyEvents.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/test/ASTestKeyEvents.as,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ASTestKeyEvents.as 19 Jul 2005 22:40:18 -0000 1.2 --- ASTestKeyEvents.as 20 Jul 2005 18:07:12 -0000 1.3 *************** *** 31,35 **** import org.actionstep.*; import org.actionstep.test.*; ! import org.actionstep.constants.*; class org.actionstep.test.ASTestKeyEvents { --- 31,35 ---- import org.actionstep.*; import org.actionstep.test.*; ! //import org.actionstep.constants.*; class org.actionstep.test.ASTestKeyEvents { *************** *** 44,47 **** --- 44,51 ---- var button:NSButton; + var textField3; + var textField4; + var button2:NSButton; + var app = NSApplication.sharedApplication(); window1 = (new NSWindow()).initWithContentRect(new NSRect(0,0,250,500)); *************** *** 59,62 **** --- 63,76 ---- textField2.setNextKeyView(button); button.setNextKeyView(textField1); + + textField3 = (new NSTextField()).initWithFrame(new NSRect(10,20,120,30)); + textField4 = (new NSTextField()).initWithFrame(new NSRect(10,60,120,30)); + button2 = (new NSButton()).initWithFrame(new NSRect(10,100,70,30)); + button2.setTitle("Submit 2"); + + textField3.setNextKeyView(textField4); + textField4.setNextKeyView(button2); + button2.setNextKeyView(textField3); + var o = new Object(); *************** *** 72,75 **** --- 86,94 ---- view1.addSubview(button); + view2.addSubview(textField3); + view2.addSubview(textField4); + view2.addSubview(button2); + + window1.setContentView(view1); window1.setInitialFirstResponder(textField1); |
From: Scott H. <sco...@us...> - 2005-07-20 16:40:53
|
Update of /cvsroot/actionstep/actionstep/src/org/actionstep In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8512/src/org/actionstep Modified Files: NSMatrix.as Log Message: now if no next (or previous) cells are available, matrix will resign as firstResponder Index: NSMatrix.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/NSMatrix.as,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** NSMatrix.as 20 Jul 2005 15:14:18 -0000 1.25 --- NSMatrix.as 20 Jul 2005 16:40:44 -0000 1.26 *************** *** 2462,2475 **** if (mods & NSEvent.NSShiftKeyMask) // go backwards { ! selectPreviousSelectableCellAfterRowColumn(m_selcell_row, ! m_selcell_column); } else { ! selectNextSelectableCellAfterRowColumn(m_selcell_row, ! m_selcell_column); } - - return; // MUST have this (to indicate the key was handled) } --- 2462,2479 ---- if (mods & NSEvent.NSShiftKeyMask) // go backwards { ! if (selectPreviousSelectableCellAfterRowColumn(m_selcell_row, ! m_selcell_column)) ! { ! return; // MUST have this (to indicate the key was handled) ! } } else { ! if (selectNextSelectableCellAfterRowColumn(m_selcell_row, ! m_selcell_column)) ! { ! return; // MUST have this (to indicate the key was handled) ! } } } |
From: Scott H. <sco...@us...> - 2005-07-20 15:14:31
|
Update of /cvsroot/actionstep/actionstep/src/org/actionstep In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19350/src/org/actionstep Modified Files: NSMatrix.as Log Message: commented out some traces added some //! to remind me to implement some things added a comment or two Index: NSMatrix.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/NSMatrix.as,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** NSMatrix.as 20 Jul 2005 15:04:46 -0000 1.24 --- NSMatrix.as 20 Jul 2005 15:14:18 -0000 1.25 *************** *** 2424,2432 **** if (mods & NSEvent.NSShiftKeyMask) { ! } else if (mods & NSEvent.NSAlternateKeyMask) { ! } else --- 2424,2432 ---- if (mods & NSEvent.NSShiftKeyMask) { ! //! implement } else if (mods & NSEvent.NSAlternateKeyMask) { ! //! implement } else *************** *** 2464,2468 **** selectPreviousSelectableCellAfterRowColumn(m_selcell_row, m_selcell_column); - return; } else --- 2464,2467 ---- *************** *** 2470,2475 **** selectNextSelectableCellAfterRowColumn(m_selcell_row, m_selcell_column); - return; } } --- 2469,2475 ---- selectNextSelectableCellAfterRowColumn(m_selcell_row, m_selcell_column); } + + return; // MUST have this (to indicate the key was handled) } *************** *** 2588,2592 **** if (columns > oldMaxC) { ! TRACE("columns > oldMaxC"); var end:Number = columns; --- 2588,2592 ---- if (columns > oldMaxC) { ! //TRACE("columns > oldMaxC"); var end:Number = columns; *************** *** 2623,2627 **** if (rows > oldMaxR) { ! TRACE("rows > oldMaxR"); var end:Number = rows - 1; --- 2623,2627 ---- if (rows > oldMaxR) { ! //TRACE("rows > oldMaxR"); var end:Number = rows - 1; |
From: Richard K. <ric...@us...> - 2005-07-20 15:04:55
|
Update of /cvsroot/actionstep/actionstep/src/org/actionstep In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17016 Modified Files: NSMatrix.as Log Message: return after handling tab/back tab events Index: NSMatrix.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/NSMatrix.as,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** NSMatrix.as 20 Jul 2005 07:59:40 -0000 1.23 --- NSMatrix.as 20 Jul 2005 15:04:46 -0000 1.24 *************** *** 45,49 **** import org.actionstep.NSSize; import org.actionstep.NSApplication; ! import org.actionstep.NSTimer; import org.actionstep.ASTheme; import org.actionstep.ASFieldEditingProtocol; --- 45,49 ---- import org.actionstep.NSSize; import org.actionstep.NSApplication; ! //import org.actionstep.NSTimer; import org.actionstep.ASTheme; import org.actionstep.ASFieldEditingProtocol; *************** *** 51,55 **** import org.actionstep.constants.NSMatrixMode; import org.actionstep.constants.NSCellType; ! import org.actionstep.constants.NSCellAttribute; //! TEST CODE --- 51,55 ---- import org.actionstep.constants.NSMatrixMode; import org.actionstep.constants.NSCellType; ! //import org.actionstep.constants.NSCellAttribute; //! TEST CODE *************** *** 2464,2467 **** --- 2464,2468 ---- selectPreviousSelectableCellAfterRowColumn(m_selcell_row, m_selcell_column); + return; } else *************** *** 2469,2472 **** --- 2470,2474 ---- selectNextSelectableCellAfterRowColumn(m_selcell_row, m_selcell_column); + return; } } |
From: Richard K. <ric...@us...> - 2005-07-20 15:04:25
|
Update of /cvsroot/actionstep/actionstep/src/org/actionstep/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16909 Modified Files: ASTestMatrix.as Log Message: comment out unused imports Index: ASTestMatrix.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/test/ASTestMatrix.as,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** ASTestMatrix.as 20 Jul 2005 13:58:38 -0000 1.11 --- ASTestMatrix.as 20 Jul 2005 15:04:14 -0000 1.12 *************** *** 39,45 **** import org.actionstep.NSView; import org.actionstep.NSTextField; ! import org.actionstep.NSTextFieldCell; import org.actionstep.NSAlert; ! import org.actionstep.NSPanel; /** --- 39,45 ---- import org.actionstep.NSView; import org.actionstep.NSTextField; ! //import org.actionstep.NSTextFieldCell; import org.actionstep.NSAlert; ! //import org.actionstep.NSPanel; /** |
From: Scott H. <sco...@us...> - 2005-07-20 13:58:52
|
Update of /cvsroot/actionstep/actionstep/src/org/actionstep/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32584/src/org/actionstep/test Modified Files: ASTestMatrix.as Log Message: made it easier to see selection Index: ASTestMatrix.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/test/ASTestMatrix.as,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** ASTestMatrix.as 20 Jul 2005 08:29:20 -0000 1.10 --- ASTestMatrix.as 20 Jul 2005 13:58:38 -0000 1.11 *************** *** 80,85 **** cell, 3, 4); ! matrix.setBackgroundColor(new NSColor(0xFF0000)); ! matrix.setCellBackgroundColor(new NSColor(0x990000)); matrix.setIntercellSpacing(new NSSize(3, 3)); view.addSubview(matrix); --- 80,85 ---- cell, 3, 4); ! matrix.setBackgroundColor(new NSColor(0x000099)); ! matrix.setCellBackgroundColor(new NSColor(0xFFFFFF)); matrix.setIntercellSpacing(new NSSize(3, 3)); view.addSubview(matrix); |
From: Scott H. <sco...@us...> - 2005-07-20 08:29:29
|
Update of /cvsroot/actionstep/actionstep/src/org/actionstep/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25960/src/org/actionstep/test Modified Files: ASTestMatrix.as Log Message: small change to enable tabbing Index: ASTestMatrix.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/test/ASTestMatrix.as,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ASTestMatrix.as 20 Jul 2005 08:00:06 -0000 1.9 --- ASTestMatrix.as 20 Jul 2005 08:29:20 -0000 1.10 *************** *** 39,42 **** --- 39,43 ---- import org.actionstep.NSView; import org.actionstep.NSTextField; + import org.actionstep.NSTextFieldCell; import org.actionstep.NSAlert; import org.actionstep.NSPanel; *************** *** 74,77 **** --- 75,79 ---- var cell:NSButtonCell = (new NSButtonCell()).initTextCell("test"); cell.setButtonType(NSButtonType.NSRadioButton); + cell.setEditable(true); var matrix:NSMatrix = (new NSMatrix()).initWithFrameModePrototypeNumberOfRowsNumberOfColumns (new NSRect(10,90,270,200), org.actionstep.constants.NSMatrixMode.NSRadioModeMatrix, |