|
From: creedon <icr...@us...> - 2005-06-14 00:53:16
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/clock In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20247 Modified Files: timeStamp Log Message: changes comments follows current stylistic conventions Index: timeStamp =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/clock/timeStamp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** timeStamp 26 Mar 2005 19:42:38 -0000 1.1.1.1 --- timeStamp 14 Jun 2005 00:53:03 -0000 1.2 *************** *** 1,3 **** FrontierVcsFile:1:scpt:system.verbs.builtins.clock.timeStamp ! on timeStamp () { ÇChanges ÇSaturday, December 30, 2000 at 10:42:56 AM by DW ÇThis script is ancient and frustrating. ÇI like short timestamps, not the long string you see at the head of this comment. ÇSo let's create a new preference, user.prefs.flShortTimeStamp. If it doesn't exist, we create it. It defaults to false. So if you prefer the current behavior, you do nothing. If you want a shorter stamp, set it true. Ç12/30/2000; 10:48:54 AM by DW ÇIt works! ;-> Ç12/30/2000; 10:52:56 AM by DW ÇWhen timestamping in a table, add the stamp in the table your cursor is in. This feature is so old it predates the outline browser for the object db tables. Ç12/30/00; 12:21:14 PM by DW ÇChopped off the first two numbers of the year. You can figure it out. local (flshortstamp); bundle { //get flshortstamp if not defined (user.prefs.flShortTimeStamp) { user.prefs.flShortTimeStamp = false}; flshortstamp = user.prefs.flShortTimeStamp}; local (s); bundle { //set the timestamp string if flshortstamp { local (year = date.year ()); s = string.replaceall (clock.now (), year, string.mid (year, 3, 2)) + " by " + user.prefs.initials} else { s = string.dateString () + " at " + string.timeString () + " by " + user.prefs.initials}}; local (adr, type); bundle { //set adr and type adr = target.get (); if defined (adr^) { type = typeOf (adr^)} else { if window.isMenuScript (window.frontmost ()) { type = outlinetype} else { type = unknowntype}}}; case type { outlinetype; scripttype; menubartype { if wp.inTextMode () { wp.insert (s)} else { local (dir = down); if op.subsExpanded () { dir = right}; if op.insert (s, dir) { script.makeComment ()}}}; wptexttype { wp.insert (s)}; tabletype { local (adrparent = parentof (table.getcursoraddress ()^)); adrparent^ ["stampedTime"] = s}} else { return (false)}; return (true)} \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:scpt:system.verbs.builtins.clock.timeStamp ! on timeStamp () { ÇChanges Ç12/30/00; 12:21:14 PM by DW ÇChopped off the first two numbers of the year. You can figure it out. Ç12/30/2000; 10:52:56 AM by DW ÇWhen timestamping in a table, add the stamp in the table your cursor is in. This feature is so old it predates the outline browser for the object db tables. Ç12/30/2000; 10:48:54 AM by DW ÇIt works! ;-> ÇSaturday, December 30, 2000 at 10:42:56 AM by DW ÇThis script is ancient and frustrating. ÇI like short timestamps, not the long string you see at the head of this comment. ÇSo let's create a new preference, user.prefs.flShortTimeStamp. If it doesn't exist, we create it. It defaults to false. So if you prefer the current behavior, you do nothing. If you want a shorter stamp, set it true. local (flshortstamp); bundle { //get flshortstamp if not defined (user.prefs.flShortTimeStamp) { user.prefs.flShortTimeStamp = false}; flshortstamp = user.prefs.flShortTimeStamp}; local (s); bundle { //set the timestamp string if flshortstamp { local (year = date.year ()); s = string.replaceall (clock.now (), year, string.mid (year, 3, 2)) + " by " + user.prefs.initials} else { s = string.dateString () + " at " + string.timeString () + " by " + user.prefs.initials}}; local (adr, type); bundle { //set adr and type adr = target.get (); if defined (adr^) { type = typeOf (adr^)} else { if window.isMenuScript (window.frontmost ()) { type = outlinetype} else { type = unknowntype}}}; case type { outlinetype; scripttype; menubartype { if wp.inTextMode () { wp.insert (s)} else { local (dir = down); if op.subsExpanded () { dir = right}; if op.insert (s, dir) { script.makeComment ()}}}; wptexttype { wp.insert (s)}; tabletype { local (adrparent = parentof (table.getcursoraddress ()^)); adrparent^ ["stampedTime"] = s}} else { return (false)}; return (true)} \ No newline at end of file |