Author: hqm
Date: 2008-01-25 00:52:09 -0800 (Fri, 25 Jan 2008)
New Revision: 7886
Added:
openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf9/LzHTTPLoader.as
openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf9/LzXMLParser.as
openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf9/LzXMLTranslator.as
Modified:
openlaszlo/branches/devildog/WEB-INF/lps/lfc/LaszloLibrary.lzs
openlaszlo/branches/devildog/WEB-INF/lps/lfc/core/dummyclasses.js
openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/Library.lzs
openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf9/LFCApplication.as
openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf9/Library.lzs
openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf9/LzXMLParser.lzs
openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf9/LzXMLTranslator.lzs
Log:
Change 20080125-hqm-6 by [EMAIL PROTECTED] on 2008-01-25 03:49:22 EST
in /cygdrive/c/users/hqm/openlaszlo/devildog
for http://svn.openlaszlo.org/openlaszlo/branches/devildog
Summary: checkpoint data loading kernel
New Features:
Bugs Fixed:
Technical Reviewer: hqm
QA Reviewer: (pending)
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
Tests:
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/LaszloLibrary.lzs
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/LaszloLibrary.lzs
2008-01-24 23:01:02 UTC (rev 7885)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/LaszloLibrary.lzs
2008-01-25 08:52:09 UTC (rev 7886)
@@ -25,7 +25,7 @@
#include "controllers/Library.lzs"
#include "helpers/Library.lzs"
- // #include "data/Library.lzs"
+#include "data/Library.lzs"
#include "services/Library.lzs"
//#include "glue/Library.lzs"
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/core/dummyclasses.js
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/core/dummyclasses.js
2008-01-24 23:01:02 UTC (rev 7885)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/core/dummyclasses.js
2008-01-25 08:52:09 UTC (rev 7886)
@@ -32,7 +32,12 @@
public static function trim(rp:String):String { return rp; }
}
+public class LzDataset {
+ public static var slashPat = "/";
+}
+
+
public class LzDataAttrBind {
public function LzDataAttrBind(a:*,b:*,c:*) { }
}
@@ -41,6 +46,30 @@
public function LzDatapath (...rest) { }
}
+public class LzDataNode {
+ public function LzDataNode (...rest) { }
+
+ public static function trim (...rest) {
+ }
+
+}
+
+class LzDataElement extends LzDataNode {
+ public function LzDataElement (name , cattrs) {
+ }
+
+ public function setChildNodes(l) {
+ }
+
+}
+
+class LzDataText extends LzDataNode {
+ public function LzDataText (nv) {
+
+ }
+
+}
+
public class LzCSSStyle {
public static function getPropertyValueFor(a:*, b:*):* { return null;}
@@ -55,6 +84,14 @@
trace('dummy LzBrowser getInitArg declared in core/dummyclasses.js');
return null;
}
+
+ public static function getBaseURL( ) {
+ return null;
+ }
+
+ public static function toAbsoluteURL(url, secure) {
+ return null;
+ }
}
public class LzFocus {
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/Library.lzs
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/Library.lzs
2008-01-24 23:01:02 UTC (rev 7885)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/Library.lzs
2008-01-25 08:52:09 UTC (rev 7886)
@@ -1,12 +1,15 @@
/**
* Library.lzs
*
- * @copyright Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved.
+ * @copyright Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved.
* Use is subject to license terms.
*
* @access private
*/
+if ($swf9) {
+
+} else {
#include "data/LzDataNode.lzs"
#include "data/LzDataElement.lzs"
#include "data/LzDataText.lzs"
@@ -29,6 +32,7 @@
#include "data/LzLazyReplicationManager.lzs"
#include "data/LzResizeReplicationManager.lzs"
+}
if ($as2) {
#include "data/platform/swf/LzConnection.lzs"
Modified:
openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf9/LFCApplication.as
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf9/LFCApplication.as
2008-01-24 23:01:02 UTC (rev 7885)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf9/LFCApplication.as
2008-01-25 08:52:09 UTC (rev 7886)
@@ -41,8 +41,8 @@
LzIdleKernel.addCallback( this, '__idleupdate' );
- //var idleTimerPeriod = 16; // msecs
- var idleTimerPeriod = 31; // msecs
+ var idleTimerPeriod = 14; // msecs
+ //var idleTimerPeriod = 31; // msecs
trace('idle timer period = ', idleTimerPeriod , 'msecs');
LzIdleKernel.startTimer( idleTimerPeriod );
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf9/Library.lzs
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf9/Library.lzs
2008-01-24 23:01:02 UTC (rev 7885)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf9/Library.lzs
2008-01-25 08:52:09 UTC (rev 7886)
@@ -13,3 +13,28 @@
#include "kernel/swf9/LzSprite.as"
#include "kernel/swf9/LzTextSprite.as"
#include "kernel/swf9/LzFontManager.as"
+
+ //#include "kernel/swf/LzRequires.as"
+ //#include "kernel/swf/LzInputTextSprite.as"
+ //#include "kernel/swf/LzMakeLoadSprite.as"
+ //#include "kernel/swf/LzLoader.lzs"
+ //#include "kernel/swf/LzMediaLoader.lzs"
+ //#include "kernel/swf/LzLibraryLoader.lzs"
+ //#include "kernel/swf/LzFontManager.as"
+ //#include "kernel/swf/LzLoadQueue.as"
+ //#include "kernel/swf/LzFunctions.as"
+ //#include "kernel/swf/LzSoundMC.as"
+ //#include "kernel/swf/LzLibrary.lzs"
+#include "kernel/swf9/LzXMLParser.as"
+#include "kernel/swf9/LzXMLTranslator.as"
+#include "kernel/swf9/LzHTTPLoader.as"
+ //#include "kernel/swf/LzMouseKernel.as"
+ //#include "kernel/swf/LzKeyboardKernel.as"
+ //#include "kernel/swf/LzAudio.as"
+ //#include "kernel/swf/LzScreenKernel.as"
+ //#include "kernel/swf/LzContextMenu.lzs"
+ //#include "kernel/swf/dojo/Library.lzs"
+
+
+
+
Added: openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf9/LzHTTPLoader.as
Property changes on:
openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf9/LzHTTPLoader.as
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added: openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf9/LzXMLParser.as
Property changes on:
openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf9/LzXMLParser.as
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Modified:
openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf9/LzXMLParser.lzs
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf9/LzXMLParser.lzs
2008-01-24 23:01:02 UTC (rev 7885)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf9/LzXMLParser.lzs
2008-01-25 08:52:09 UTC (rev 7886)
@@ -1,7 +1,7 @@
/**
* LzXMLParser.lzs
*
- * @copyright Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved.
+ * @copyright Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved.
* Use is subject to license terms.
*
* @topic Kernel
@@ -12,7 +12,7 @@
* @shortdesc Utility for parsing text into native XML DOM object
*/
-class LzXMLParser {
+public class LzXMLParser {
/**
* Converts string to platform-native XML data.
@@ -23,11 +23,11 @@
* @param boolean trimwhitespace: if true, text nodes have whitespace trimmed
from start and end.
* @return nativeXMLObject: An XML DOM object native to the runtime platform
*/
-static function parseXML( str, trimwhitespace, nsprefix ){
- var xmlobj = new XML();
- xmlobj.ignoreWhite = true;
- xmlobj.parseXML( str );
- return xmlobj;
+public static function parseXML( str, trimwhitespace, nsprefix ){
+ XML.ignoreWhitespace = true;
+ var xmlobj = new XML(str);
+ xmlobj.normalize();
+ return xmlobj;
}
} // End of LzXMLParser
Added:
openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf9/LzXMLTranslator.as
Property changes on:
openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf9/LzXMLTranslator.as
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Modified:
openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf9/LzXMLTranslator.lzs
===================================================================
---
openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf9/LzXMLTranslator.lzs
2008-01-24 23:01:02 UTC (rev 7885)
+++
openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf9/LzXMLTranslator.lzs
2008-01-25 08:52:09 UTC (rev 7886)
@@ -1,7 +1,7 @@
/**
* LzXMLTranslator.lzs
*
- * @copyright Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved.
+ * @copyright Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved.
* Use is subject to license terms.
*
* @topic Kernel
@@ -15,10 +15,68 @@
class LzXMLTranslator {
static function copyXML (xmlobj, trimwhitespace, nsprefix) {
- var lfcnode = LzLoader.prototype.copyFlashXML(xmlobj, trimwhitespace,
nsprefix);
+ var lfcnode = copyFlashXML(xmlobj, trimwhitespace, nsprefix);
var fc = lfcnode.childNodes[0];
- if ( fc instanceof LzDataText ) return null;
+ if ( fc is LzDataText ) {
+ return null;
+ }
return fc;
}
+// Recursively copy a Flash XML(Node) tree into a LzDataElement
+// tree. Used by LzDataNode.stringToLzData
+/**
+ * @param boolean trimwhitespace: trim whitespace from start and end of text
nodes
+ * @param boolean nsprefix: preserve namespace prefixes on node names and
attribute names
+ * @access private
+ */
+function copyFlashXML (node, trimwhitespace, nsprefix) {
+ var nv = node.nodeValue;
+ var lfcnode = null;
+ // text node?
+ if (node.nodeKind() == 'text') {
+ if (trimwhitespace == true) {
+ nv = LzDataNode.trim(nv);
+ }
+ lfcnode = new LzDataText(nv);
+ } else if (node.nodeKind == 'element') {
+ // slow but sure way to copy attributes
+ var nattrs = node.attributes;
+ var cattrs = {};
+ for (var key in nattrs) {
+ var nkey = key;
+ if (!nsprefix) {
+ // strip namespace prefixes
+ var colpos = key.indexOf(':');
+ if (colpos >= 0) {
+ nkey = key.substring(colpos+1);
+ }
+ }
+ cattrs[nkey] = nattrs[key];
+ }
+
+ var nname = node.nodeName;
+ if (nname && !nsprefix) {
+ // strip namespace prefix
+ var npos = nname.indexOf(':');
+ if (npos >= 0) {
+ nname = nname.substring(npos+1);
+ }
+ }
+
+ lfcnode = new LzDataElement(nname, cattrs);
+ var children = node.childNodes;
+ var newchildren = [];
+ for (var i = 0; i < children.length; i++ ) {
+ var child = children[i];
+ var lfcchild = copyFlashXML(child, trimwhitespace, nsprefix);
+ newchildren[i] = lfcchild;
+ }
+ lfcnode.setChildNodes(newchildren);
+ }
+ return lfcnode;
+}
+
+
} // End of LzXMLTranslator
+
_______________________________________________
Laszlo-checkins mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins