|
From: creedon <icr...@us...> - 2005-11-01 19:16:06
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/Frontier/tools/windowTypes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3208 Modified Files: runOpenRecentMenuScript Log Message: added check for missing files and way deal with them Index: runOpenRecentMenuScript =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/Frontier/tools/windowTypes/runOpenRecentMenuScript,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** runOpenRecentMenuScript 1 Oct 2005 17:39:18 -0000 1.1 --- runOpenRecentMenuScript 1 Nov 2005 19:15:55 -0000 1.2 *************** *** 1,3 **** FrontierVcsFile:1:scpt:system.verbs.builtins.Frontier.tools.windowTypes.runOpenRecentMenuScript ! on runOpenRecentMenuScript (ix) { ÇChanges Ç9/24/05; 8:45:56 PM by TAC Çcreated local (count = sizeOf (user.prefs.openRecentMenu.items)); ix = number (ix); if ix > count { // clear menu table.emptyTable (@user.prefs.openRecentMenu.items)} else { ix = count + 1 - ix; // translate from position in menu to position in items table Frontier.tools.windowTypes.commands.open (user.prefs.openRecentMenu.items [ix])}; return (true)}; bundle { // testing runOpenRecentMenuScript ("1")} \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:scpt:system.verbs.builtins.Frontier.tools.windowTypes.runOpenRecentMenuScript ! on runOpenRecentMenuScript (ix) { ÇChanges Ç11/1/05; 8:51:49 AM by TAC Çadded check for missing files and way deal with them Ç9/24/05; 8:45:56 PM by TAC Çcreated local (count = sizeOf (user.prefs.openRecentMenu.items)); ix = number (ix); if ix > count { // clear menu table.emptyTable (@user.prefs.openRecentMenu.items)} else { local (f); ix = count + 1 - ix; // translate from position in menu to position in items table f = user.prefs.openRecentMenu.items [ix]; if not (file.exists (f)) { local (s = file.fileFromPath (f)); case dialog.threeWay ("File \"" + s + "\" is missing.", "Find", "Clear", "Cancel") { 1 { if file.getFileDialog ("Find file \"" + s + "\"...", @f, 0) { user.prefs.openRecentMenu.items [ix] = f} else { return (false)}}; 2 { delete (user.prefs.openRecentMenu.items [ix]); return (false)}; 3 { return (false)}}}; Frontier.tools.windowTypes.commands.open (f)}; return (true)}; Çbundle // testing ÇrunOpenRecentMenuScript ("1") \ No newline at end of file |