|
From: <cre...@us...> - 2006-07-27 22:30:49
|
Revision: 1472 Author: creecode Date: 2006-07-26 10:43:04 -0700 (Wed, 26 Jul 2006) ViewCVS: http://svn.sourceforge.net/frontierkernel/?rev=1472&view=rev Log Message: ----------- coerce adrPageData to address when working with it in the context of a guest database when adding hint for guest databases we don't care if a top level item is a table or not Modified Paths: -------------- ODBs/trunk/frontierRoot/system/verbs/builtins/fatPages/buildFileAtts.fvc Modified: ODBs/trunk/frontierRoot/system/verbs/builtins/fatPages/buildFileAtts.fvc =================================================================== --- ODBs/trunk/frontierRoot/system/verbs/builtins/fatPages/buildFileAtts.fvc 2006-07-26 17:39:52 UTC (rev 1471) +++ ODBs/trunk/frontierRoot/system/verbs/builtins/fatPages/buildFileAtts.fvc 2006-07-26 17:43:04 UTC (rev 1472) @@ -1,65 +1,77 @@ -FrontierVcsFile:1:scpt:system.verbs.builtins.fatPages.buildFileAtts +FrontierVcsFile:3:scpt:system.verbs.builtins.fatPages.buildFileAtts on buildFileAtts (w, runnable = false) { - \xC7Changes - \xC712/12/04; 5:19:43 PM by TAC - \xC7don't store guest database file path - \xC7added hint for top level items in guest databases that are not tables - \xC7bumped fatPage version to 1.0.1 - \xC705/24/01; 10:12:48 PM by PBS - \xC7Added support for file-based OPML documents. - \xC7Thursday, July 17, 1997 at 12:22:23 PM by PBS - \xC7w may also be an odb address. - \xC7New parameter: runnable. Desktop scripts are saved with runnable set to true. - \xC7Fri, Jun 13, 1997 at 5:49:06 PM by dmb - \xC7w may be a window title, or a filespec, depending on whether or not the window has ever been saved. - local (htmltext = ""); + «Changes + «5/27/06; 6:54:03 PM by TAC + «coerce adrPageData to address when working with it in the context of a guest database + «when adding hint for guest databases we don't care if a top level item is a table or not + «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}; + 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 ("version", "1.0.1"); // bumped version for guest database hinting addHint ("docs", "http://www.scripting.com/fatPages/faq.html"); - \xC7bundle \xC7add window rect hint - \xC7local (x, y, w, h) - \xC7window.getPosition (w, @x, @y) - \xC7window.getSize (w, @w, @h) - \xC7addHint ("windowRect", string (y) + ',' + x + ',' + (y + h) + ',' + (x + w)) + «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" { - \xC7Sun, Oct 19, 1997 at 12:49:51 AM by PBS + «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)}; + 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)); - \xC7setBinaryType (@data, getBinaryType (adrpagedata)) - setBinaryType (@data, typeof (adrpagedata^))}; + «setBinaryType (@data, getBinaryType (adrPageData)) + setBinaryType (@data, typeof (adrPageData^))}; - if defined (adrPageData) { \xC7Thu, 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 defined (adrPageData) { «Thu, Mar 20, 1997 at 7:24:45 AM by DW + addHint ("adrPageData", string.popFileFromAddress (adrPageData)); // don't store the guest database file path + if table.inGuestDatabase ( address ( adrPageData ) ) { // hint for top level guest database item + local ( addressList = string.parseAddress ( address ( adrPageData ) ) ); + if sizeOf (addressList) == 2 { // it is a top level item - if typeOf (adrPageData) != tableType { - addHint ("guestDatabaseName", file.fileFromPath (addressList [1]))}}}}; + 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)}; -\xC7bundle // test - \xC7buildFileAtts (@["Macintosh HD:Users:creedon:Development:Frontier:build_XCode:build:Guest Databases:apps:mainResponder.root"].["#startup"]) \ No newline at end of file + return (htmlText)}; + +«bundle // testing + «buildFileAtts ( "sampleMrWs" ) + + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |