|
From: creedon <icr...@us...> - 2005-06-14 00:01:54
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/fatPages In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25234 Modified Files: buildFileAtts Log Message: don't store guest database file path; added hint for top level items in guest databases that are not tables; bumped fatPage version to 1.0.1 Index: buildFileAtts =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/fatPages/buildFileAtts,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** buildFileAtts 26 Mar 2005 19:42:45 -0000 1.1.1.1 --- buildFileAtts 14 Jun 2005 00:01:45 -0000 1.2 *************** *** 1,3 **** FrontierVcsFile:1:scpt:system.verbs.builtins.fatPages.buildFileAtts ! on buildFileAtts (w, runnable = false) { ÇThursday, July 17, 1997 at 12:22:23 PM by PBS Çw may also be an odb address. ÇNew parameter: runnable. Desktop scripts Çare saved with runnable set to true. ÇChanges: ÇFri, Jun 13, 1997 at 5:49:06 PM by dmb Çw may be a window title, or a filespec, depending on whether or not Çthe window has ever been saved. Ç05/24/01; 10:12:48 PM by PBS ÇAdded support for file-based OPML documents. local (htmltext = ""); on add (s) { htmltext = htmltext + s}; add ("\r<!--\r#fatPage\r"); //Wed, Feb 26, 1997 at 7:44:57 AM by DW, added extra \r before # on addHint (name, value, flencode=false) { local (s = string (value)); if flencode { s = base64.encode (string (value), 0)}; add ("#" + name + " " + s + "\r")}; addHint ("version", 1); addHint ("docs", "http://www.scripting.com/fatPages/faq.html"); Çbundle Çadd window rect hint Çlocal (x, y, w, h) Çwindow.getPosition (w, @x, @y) Çwindow.getSize (w, @w, @h) ÇaddHint ("windowRect", string (y) + ',' + x + ',' + (y + h) + ',' + (x + w)) local (data); if (defined (w) && (parentOf (w^) == "" || parentOf (w^) == "system.compiler.files") && w != @root) { //It's a file-based object. packWindow (w, @data); if file.exists (w) { if string.lower (file.type (w)) == "text" || string.lower (file.type (w)) == "txt" { ÇSun, Oct 19, 1997 at 12:49:51 AM by PBS unpack (@data, @temp.lasttextfile); htmltext = string (temp.lasttextfile); htmltext = string.replaceall (htmltext, cr + lf, cr); return (htmltext)}; if string.lower (file.type (w)) == "opml" { //PBS 05/24/01: support for OPML files local (xmlText = op.outlineToXml (@[w])); return (xmlText)}}} else { //It's an odb object. adrPageData = w; data = binary (fatPages.encodePageData (adrPageData)); ÇsetBinaryType (@data, getBinaryType (adrpagedata)) setBinaryType (@data, typeof (adrpagedata^))}; if defined (adrPageData) { ÇThu, Mar 20, 1997 at 7:24:45 AM by DW addHint ("adrPageData", adrPageData)}; addHint ("objectType", "application/x-frontier-" + getbinarytype (data)); addHint ("runnable", string (runnable)); //Thursday, July 17, 1997 at 12:22:11 PM by PBS addHint ("pageData", string (data), true); add ("-->\r"); return (htmltext)} \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:scpt:system.verbs.builtins.fatPages.buildFileAtts ! on buildFileAtts (w, runnable = false) { ÇChanges Ç12/12/04; 5:19:43 PM by TAC Çdon't store guest database file path Çadded hint for top level items in guest databases that are not tables Çbumped fatPage version to 1.0.1 Ç05/24/01; 10:12:48 PM by PBS ÇAdded support for file-based OPML documents. ÇThursday, July 17, 1997 at 12:22:23 PM by PBS Çw may also be an odb address. ÇNew parameter: runnable. Desktop scripts are saved with runnable set to true. ÇFri, Jun 13, 1997 at 5:49:06 PM by dmb Çw may be a window title, or a filespec, depending on whether or not the window has ever been saved. local (htmltext = ""); on add (s) { htmltext = htmltext + s}; add ("\r<!--\r#fatPage\r"); //Wed, Feb 26, 1997 at 7:44:57 AM by DW, added extra \r before # on addHint (name, value, flencode=false) { local (s = string (value)); if flencode { s = base64.encode (string (value), 0)}; add ("#" + name + " " + s + "\r")}; addHint ("version", "1.0.1"); // 12/12/04; 4:07:01 PM by TAC - bumped version for guest database hinting addHint ("docs", "http://www.scripting.com/fatPages/faq.html"); Çbundle Çadd window rect hint Çlocal (x, y, w, h) Çwindow.getPosition (w, @x, @y) Çwindow.getSize (w, @w, @h) ÇaddHint ("windowRect", string (y) + ',' + x + ',' + (y + h) + ',' + (x + w)) local (data); if (defined (w) && (parentOf (w^) == "" || parentOf (w^) == "system.compiler.files") && w != @root) { //It's a file-based object. packWindow (w, @data); if file.exists (w) { if string.lower (file.type (w)) == "text" || string.lower (file.type (w)) == "txt" { ÇSun, Oct 19, 1997 at 12:49:51 AM by PBS unpack (@data, @temp.lasttextfile); htmltext = string (temp.lasttextfile); htmltext = string.replaceall (htmltext, cr + lf, cr); return (htmltext)}; if string.lower (file.type (w)) == "opml" { //PBS 05/24/01: support for OPML files local (xmlText = op.outlineToXml (@[w])); return (xmlText)}}} else { //It's an odb object. adrPageData = w; data = binary (fatPages.encodePageData (adrPageData)); ÇsetBinaryType (@data, getBinaryType (adrpagedata)) setBinaryType (@data, typeof (adrpagedata^))}; if defined (adrPageData) { ÇThu, Mar 20, 1997 at 7:24:45 AM by DW addHint ("adrPageData", string.popFileFromAddress (adrPageData)); // 12/12/04; 5:15:46 PM by TAC - don't store the guest database file path if table.inGuestDatabase (adrPageData) { // 12/12/04; 4:06:11 PM by TAC - hint for top level guest database item that is not a table local (addressList = string.parseAddress (adrPageData)); if sizeOf (addressList) == 2 { // it is a top level item if typeOf (adrPageData) != tableType { addHint ("guestDatabaseName", file.fileFromPath (addressList [1]))}}}}; addHint ("objectType", "application/x-frontier-" + getbinarytype (data)); addHint ("runnable", string (runnable)); //Thursday, July 17, 1997 at 12:22:11 PM by PBS addHint ("pageData", string (data), true); add ("-->\r"); return (htmltext)}; Çbundle // test ÇbuildFileAtts (@["Macintosh HD:Users:creedon:Development:Frontier:build_XCode:build:Guest Databases:apps:mainResponder.root"].["#startup"]) \ No newline at end of file |