Author: hqm
Date: 2008-01-05 13:23:27 -0800 (Sat, 05 Jan 2008)
New Revision: 7736
Modified:
openlaszlo/branches/devildog/WEB-INF/lps/config/lps.properties
openlaszlo/branches/devildog/WEB-INF/lps/lfc/core/LzNode.js
openlaszlo/branches/devildog/WEB-INF/lps/lfc/core/dummyclasses.js
openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/compiler/ViewCompiler.java
Log:
checkpoint mini-lfc swf9
Modified: openlaszlo/branches/devildog/WEB-INF/lps/config/lps.properties
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/config/lps.properties
2008-01-05 20:02:10 UTC (rev 7735)
+++ openlaszlo/branches/devildog/WEB-INF/lps/config/lps.properties
2008-01-05 21:23:27 UTC (rev 7736)
@@ -162,9 +162,9 @@
# Warn on global assignments (off by default)
#compiler.warn.globalassignments=true
# Where the SWF9 external library compiler lives (relative to HOME, or
absolute)
-compiler.swf9.lib.builder=../../flex2/bin/compc
+compiler.swf9.lib.builder=c:/flex2/bin/compc.exe
# Where the SWF9 external application compiler lives (relative to HOME, or
absolute)
-compiler.swf9.app.builder=../../flex2/bin/mxmlc
+compiler.swf9.app.builder=c:/flex2/bin/mxmlc.exe
# Tell extern compiler to issue warnings.
compiler.swf9.warnings=false
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/core/LzNode.js
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/core/LzNode.js 2008-01-05
20:02:10 UTC (rev 7735)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/core/LzNode.js 2008-01-05
21:23:27 UTC (rev 7736)
@@ -47,10 +47,12 @@
///////////////////////////////////////////////////////////////////
// temporary definition
function addProperty(key:*,val:*):void {
- if (val instanceof Function) {
+ #passthrough {
+ if (val is Function) {
trace('called addProperty with a function as val ' + key+" = "
+val);
}
this[key] = val;
+ }#
}
//////////////////
@@ -125,7 +127,7 @@
// done.
if (attrs) {
var dattrs = this.defaultattrs;
- var dattr$refs = '$refs' in dattrs && dattrs.$refs;
+ var dattr$refs = ('$refs' in dattrs) && dattrs.$refs;
var cleanup = null;
for ( var k in attrs ){
var attrk = attrs[ k ];
@@ -135,10 +137,11 @@
cleanup[k] = true;
}
// Check for object and array merges
- if ( attrk instanceof Object ) {
+ #passthrough {
+ if ( attrk is Object ) {
var dattrk = dattrs[ k ];
- if ( dattrk instanceof Object ) {
- if ( attrk instanceof Array ) {
+ if ( dattrk is Object ) {
+ if ( attrk is Array ) {
// Debug.debug("%w: LzNode.initialize: merging Array %s",
this, k);
iargs[ k ] = attrk.concat( dattrk );
continue;
@@ -153,6 +156,7 @@
}
}
}
+ }#
// Just a normal value, install it
iargs[ k ] = attrk;
}
@@ -600,7 +604,8 @@
// A style does not override an explicit attribute
if (! (k in initialArgs)) {
// A style that is a function is a constraint
- if (v instanceof Function) {
+ #passthrough {
+ if (v is Function) {
//Only set styleConstraints[k] if this[k] is null. See
LPP-2894 - CSS: subclasses and instances can't override style constraints set
on superclass*
if (this[k] == null) {
// Debug.warn("setting %w[%w] to %w, was %w", this, k, v,
this[k]);
@@ -610,6 +615,7 @@
// Debug.format("%w[%s] (%#w) %#w -> %#w", this, k,
stylemap[k], this.k, v);
if (v != null) this.setAttribute(k, v);
}
+ }#
}
}
return styleConstraints;
@@ -996,7 +1002,7 @@
* @param Boolean ifchanged: If true, only set the attribute if the value
* changed
*/
-function setAttribute(prop, val, ifchanged) {
+function setAttribute(prop, val, ifchanged = null) {
if (this.__LZdeleted || (ifchanged && (this[prop] == val))) return;
var s = this.setters;
@@ -1134,9 +1140,11 @@
var x = ConstructorMap[ e.name ];
// TODO: [2005-03-24 ptw] Remove this if we ever enable
// warnings in the LFC as this will be redundant
+ #passthrough {
if ($debug) {
- if ((! x) || (! (x instanceof Function))) { Debug.error('Class for tag
%s has not been defined yet', e.name); }
+ if ((! x) || (! (x is Function))) { Debug.error('Class for tag %s has
not been defined yet', e.name); }
}
+ }#
// TODO: [2005-04-20 ptw] Don't know what this means, preserved
// for posterity:
// ... new eval(namespace) [e.name]...
@@ -1207,14 +1215,7 @@
if (this.setters == this.constructor.setters) {
this.setters = new LzInheritedHash(this.constructor.setters);
}
- if ($swf9) {
- this.setters[key] = val;
- }
- if ('put' in this.setters) {
- this.setters.put(key, val);
- } else {
- this.setters[key] = val;
- }
+ this.setters[key] = val;
}
/**
@@ -1380,9 +1381,11 @@
}
this.dataBindAttribute( p , pp );
} else if ( !('dependencies' in rp && rp.dependencies) ){
- if (rp instanceof Function) {
+ #passthrough {
+ if (rp is Function) {
rp.call(this);
}
+ }#
}
}
@@ -1390,9 +1393,11 @@
for ( var p in refs ){
// The string check prevents a dhtml error
var rp = refs[ p ];
- if (rp instanceof Function && ('dependencies' in rp)) {
+ #passthrough {
+ if (rp is Function && ('dependencies' in rp)) {
this.applyConstraint( p , rp , rp.dependencies.call(this) );
}
+ }#
}
}
@@ -2071,11 +2076,13 @@
* @access private
*/
function __LZmakeDatapath( dpobj ){
- if (! (dpobj instanceof Object)) {
- if ($debug) {
- Debug.debug('__LZmakeDatapath on non-object %w?', dpobj)
- }
- }
+ #passthrough {
+ if (! (dpobj is Object)) {
+ if ($debug) {
+ Debug.debug('__LZmakeDatapath on non-object %w?', dpobj)
+ }
+ }
+ }#
this.makeChild( dpobj , true);
}
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/core/dummyclasses.js
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/core/dummyclasses.js
2008-01-05 20:02:10 UTC (rev 7735)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/core/dummyclasses.js
2008-01-05 21:23:27 UTC (rev 7736)
@@ -4,7 +4,7 @@
*/
-var global:* = {};;
+var global:* = {};
var canvas:LzCanvas;
@@ -49,15 +49,6 @@
-
-function LzInstantiateView(e, tn:* = null)
-{
- if ( tn == null) {
- tn = 1;
- }
- canvas.initiatorAddNode( e , tn );
-}
-
public class LzAnimator {
public function LzAnimator(...rest){}
trace('dummy LzAnimator declared in core/dummyclasses.js');
Modified:
openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/compiler/ViewCompiler.java
===================================================================
---
openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/compiler/ViewCompiler.java
2008-01-05 20:02:10 UTC (rev 7735)
+++
openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/compiler/ViewCompiler.java
2008-01-05 21:23:27 UTC (rev 7736)
@@ -182,7 +182,11 @@
model = model.expandClassDefinitions();
String script;
- if (emitClassDecl) {
+ // if (emitClassDecl) {
+ // TODO [2008-01 hqm] Comment this out for now, but eventually we may
+ // make the constructor for an LzNode be capable of queuing for
+ // deferred full instantiation, and can get rid of LzInstantiateView.
+ if (false) {
String classnm = element.getName();
String instancenm = element.getAttributeValue("name");
@@ -772,6 +776,6 @@
}
/**
- * @copyright Copyright 2001-2007 Laszlo Systems, Inc. All Rights
+ * @copyright Copyright 2001-2008 Laszlo Systems, Inc. All Rights
* Reserved. Use is subject to license terms.
*/
_______________________________________________
Laszlo-checkins mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins