|
From: creedon <icr...@us...> - 2005-11-01 19:21:45
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/Frontier/tools/windowTypes/commands In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4974 Modified Files: saveAs Log Message: fix for items created with New menu not being saved when using File menu Save As menu item in Frontier Index: saveAs =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/Frontier/tools/windowTypes/commands/saveAs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** saveAs 1 Oct 2005 17:26:02 -0000 1.2 --- saveAs 1 Nov 2005 19:21:37 -0000 1.3 *************** *** 1,3 **** FrontierVcsFile:1:scpt:system.verbs.builtins.Frontier.tools.windowTypes.commands.saveAs ! on saveAs (adrItem=nil) { ÇChanges Ç9/21/05; 11:34:38 AM by TAC Çchanged to actually do a save as, as opposed to a save Çonly do export for non Frontier envrionments ÇHandle the Save As command. if adrItem == nil { //default to frontmost window adrItem = window.frontmost ()}; on saveDatabaseAs () { local (f = file.fileFromPath (window.getFile (table.getRootAddress (adrItem)))); if file.putFileDialog ("", @f) { fileMenu.saveCopy (f)}}; if not defined (adrItem^) { // save root adrItem = @root; saveDatabaseAs (); return (true)}; on runCallbacks (adrCallback) { //call callbacks if defined (adrCallback^) { local (flConsumed = false); local (adrScript); for adrScript in adrCallback { try { //11/30/00 JES while typeOf (adrScript^) == addressType { //follow addresses adrScript = adrScript^}; flConsumed = adrScript^ (adrItem, flClosing)}; if flConsumed { return (true)}}}; return (false)}; if runCallbacks (@user.tools.commandCallbacks.saveAs) { return (true)}; if system.environment.isRadio { if defined (user.pike.commandCallbacks) { if runCallbacks (@user.pike.commandCallbacks.saveAs) { return (true)}}}; bundle { //look for a windowType that handles this command local (type, adrType); if window.attributes.getOne ("type", @type, adrItem) { if Frontier.tools.windowTypes.findWindowType (type, @adrType, adrItem) { if defined (adrType^.save) { if adrType^.saveAs (adrItem) { window.attributes.setOne ("lastSaved", timeModified (adrItem), adrItem); saveDatabase (); return (true)} else { return (false)}}}}}; bundle { //if this is an outline window, save as an opml file local (adrType); if Frontier.tools.windowTypes.findWindowType ("outlinerFile", @adrType) { if adrType^.saveAs (adrItem) { return (true)}}}; if system.environment.isRadio { export.commands.export ()}; // Do we want to call the odb-export code here? saveDatabaseAs (); return (true)}; Çbundle // testing ÇsaveAs () \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:scpt:system.verbs.builtins.Frontier.tools.windowTypes.commands.saveAs ! on saveAs (adrItem=nil) { ÇChanges Ç11/1/05; 9:30:04 AM by TAC Çfix for items created with New menu not being saved when using File menu Save As menu item in Frontier Ç9/21/05; 11:34:38 AM by TAC Çchanged to actually do a save as, as opposed to a save Çonly do export for non Frontier envrionments ÇHandle the Save As command. if adrItem == nil { //default to frontmost window adrItem = window.frontmost ()}; on saveDatabaseAs () { local (f = file.fileFromPath (window.getFile (table.getRootAddress (adrItem)))); if file.putFileDialog ("", @f) { fileMenu.saveCopy (f)}}; if not defined (adrItem^) { // save root adrItem = @root; saveDatabaseAs (); return (true)}; on runCallbacks (adrCallback) { //call callbacks if defined (adrCallback^) { local (flConsumed = false); local (adrScript); for adrScript in adrCallback { try { //11/30/00 JES while typeOf (adrScript^) == addressType { //follow addresses adrScript = adrScript^}; flConsumed = adrScript^ (adrItem, flClosing)}; if flConsumed { return (true)}}}; return (false)}; if runCallbacks (@user.tools.commandCallbacks.saveAs) { return (true)}; if system.environment.isRadio { if defined (user.pike.commandCallbacks) { if runCallbacks (@user.pike.commandCallbacks.saveAs) { return (true)}}}; bundle { //look for a windowType that handles this command local (type, adrType); if window.attributes.getOne ("type", @type, adrItem) { if Frontier.tools.windowTypes.findWindowType (type, @adrType, adrItem) { if defined (adrType^.save) { if adrType^.saveAs (adrItem) { window.attributes.setOne ("lastSaved", timeModified (adrItem), adrItem); saveDatabase (); return (true)} else { return (false)}}}}}; if system.environment.isRadio { bundle { //if this is an outline window, save as an opml file local (adrType); if Frontier.tools.windowTypes.findWindowType ("outlinerFile", @adrType) { if adrType^.saveAs (adrItem) { return (true)}}}; export.commands.export ()}; // Do we want to call the odb-export code here? if not (system.environment.isRadio) { // save windows created by the new menu or opened from the file system local (f = window.getFile (adrItem)); if f == "" or file.type (f) != 'TABL' { return (fileMenu.saveAs ())}}; saveDatabaseAs (); return (true)}; Çbundle // testing ÇsaveAs () \ No newline at end of file |