Author: hqm
Date: 2008-01-07 11:00:43 -0800 (Mon, 07 Jan 2008)
New Revision: 7756
Added:
openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LzViewLinkage.js
Modified:
openlaszlo/branches/devildog/WEB-INF/lps/lfc/core/LzNode.js
openlaszlo/branches/devildog/WEB-INF/lps/lfc/events/LaszloEvents.js
openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf9/LzSprite.as
openlaszlo/branches/devildog/WEB-INF/lps/lfc/services/LzInstantiator.js
openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LaszloCanvas.js
openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LaszloView.js
Log:
forgot one file
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/core/LzNode.js
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/core/LzNode.js 2008-01-07
14:36:21 UTC (rev 7755)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/core/LzNode.js 2008-01-07
19:00:43 UTC (rev 7756)
@@ -212,8 +212,6 @@
}
}
- trace("LzNode calls this.construct", parent, maskedargs);
-
this.construct( parent , maskedargs );
// this.setClassEvents( this.constructor );
@@ -234,7 +232,7 @@
*/
if (this.constructWithArgs) this.constructWithArgs( maskedargs );
- delete this.__LZdeferDelegates;
+ this.__LZdeferDelegates = false;
@@ -894,7 +892,6 @@
* @access private
*/
function __LZapplyArgs ( args , constcall = null ){
- trace('__LZapplyArgs', this, objAsString(args));
var oset = {};
var hasset = [];
var hasearly = null;
@@ -903,7 +900,6 @@
}
var setrs = this.setters;
- trace('this.setters = ', objAsString(this.setters));
for ( var a in args ){
//handle flash bug where objects slots are enumerated multiple times
@@ -921,7 +917,6 @@
}
}
} else if (setrs && setrs[ a ] != -1 ){
- trace('.. got setter ',a, setrs[a]);
if ( this.earlySetters && this.earlySetters[ a ]){
if ( hasearly == null){
hasearly = [];
@@ -942,7 +937,6 @@
while( hasset.length ){
var a = hasset.pop();
- trace('calling setter', a, args[a]);
this[ setrs[a] ]( args[ a ] , a );
}
}
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/events/LaszloEvents.js
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/events/LaszloEvents.js
2008-01-07 14:36:21 UTC (rev 7755)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/events/LaszloEvents.js
2008-01-07 19:00:43 UTC (rev 7756)
@@ -89,7 +89,6 @@
// Usually this is because a deleted view has idle or timer events
// still registered.
var context = this.c;
- trace('** LzDelegate execute', this.enabled && context);
if (this.enabled && context) {
if (context['__LZdeleted']) {
return;
@@ -437,7 +436,9 @@
evq.push(d, sd);
} else {
// d.execute( sd ); inlined
- if (d.c[d.f]) d.c[d.f]( sd );
+ if (d.c[d.f]) {
+ d.c[d.f]( sd );
+ }
}
}
}
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf9/LzSprite.as
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf9/LzSprite.as
2008-01-07 14:36:21 UTC (rev 7755)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf9/LzSprite.as
2008-01-07 19:00:43 UTC (rev 7756)
@@ -96,7 +96,6 @@
public function draw():void {
if (this.bgColor != null){
this.graphics.clear();
- trace('drawing bgcolor '+this.bgColor+ ' width: '+this.lzwidth +
' height: '+this.lzheight +' x: '+this.x+ 'y: '+this.y);
this.graphics.beginFill(this.bgColor);
this.graphics.drawRect(0, 0, this.lzwidth, this.lzheight);
this.graphics.endFill();
@@ -186,32 +185,26 @@
}
public function handleMouse_CLICK (event:MouseEvent) {
- trace('mouse onclick on ', owner, event.target);
LzModeManager.handleMouseEvent( owner, 'onclick');
}
public function handleMouse_DOUBLE_CLICK (event:MouseEvent) {
- trace('mouse ondblclick on ', owner, event.target);
LzModeManager.handleMouseEvent( owner, 'ondblclick');
}
public function handleMouse_MOUSE_DOWN (event:MouseEvent) {
- trace('mouse onmousedown on ', owner, event.target);
LzModeManager.handleMouseEvent( owner, 'onmousedown');
}
public function handleMouse_MOUSE_UP (event:MouseEvent) {
- trace('mouse onmouseup on ', owner, event.target);
LzModeManager.handleMouseEvent( owner, 'onmouseup');
}
public function handleMouse_MOUSE_OVER (event:MouseEvent) {
- trace('mouse onmouseover on ', owner, event.target);
LzModeManager.handleMouseEvent( owner, 'onmouseover');
}
public function handleMouse_MOUSE_OUT (event:MouseEvent) {
- trace('mouse onmouseout on ', owner, event.target);
LzModeManager.handleMouseEvent( owner, 'onmouseout');
}
@@ -223,7 +216,6 @@
o If false, sets the sprite to be unclickable and not receive mouse
events
*/
public function setClickable( c:Boolean ):void {
- trace('setClickable', owner, c);
//if (this.clickable == c) return;
this.clickable = c;
attachMouseEvents(this);
@@ -252,7 +244,6 @@
cb.graphics.beginFill(0xffffff);
cb.graphics.drawRect(this.x, this.y, this.lzwidth,
this.lzheight);
- trace('drawing click rect '+this.x+" "+this.y+"
w="+this.lzwidth+" " +this.lzheight);
cb.graphics.endFill();
} else {
this.clickbutton.graphics.clear();
@@ -378,10 +369,8 @@
var ms:Sprite = this.masksprite = new Sprite();
ms.graphics.beginFill(0xffffff);
ms.graphics.drawRect(this.x, this.y, this.lzwidth,
this.lzheight);
- trace('drawing mask '+this.x +","+ this.y + "," + this.lzwidth+
", " + this.lzheight);
ms.graphics.endFill();
addChild(ms)
- trace('adding mask');
}
this.mask = this.masksprite;
Modified:
openlaszlo/branches/devildog/WEB-INF/lps/lfc/services/LzInstantiator.js
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/services/LzInstantiator.js
2008-01-07 14:36:21 UTC (rev 7755)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/services/LzInstantiator.js
2008-01-07 19:00:43 UTC (rev 7756)
@@ -185,7 +185,6 @@
// FIXME: [2005-03-24 ptw] Somehow there are undefined
// entries on the queue?
if (c) {
- trace('makeSomeViews makeChild ', par, c);
par.makeChild( c, true );
num++;
}
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LaszloCanvas.js
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LaszloCanvas.js
2008-01-07 14:36:21 UTC (rev 7755)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LaszloCanvas.js
2008-01-07 19:00:43 UTC (rev 7756)
@@ -101,11 +101,52 @@
this._lzinitialsubviews.push( e );
}
+ // work around some parser bug with optional args
+#passthrough {
+
+override function __LZcallInit (an = null ){
+ if (this.isinited) return;
+
+ //do this now, so that others know that they're too late
+ this.isinited = true;
+
+ this.__LZresolveReferences();
+ var sl = this.subnodes;
+ if (sl) {
+ var i = 0;
+ var l = sl.length;
+ while(i < l){
+ var s = sl[ i++ ];
+ //remember next one too
+ var t = sl[ i ]
+ if ( s.isinited || s.__LZlateinit ) continue;
+ s.__LZcallInit( );
+ //if the next one is not where it was, back up till we find it or
to
+ //the beginning of the array
+ if ( t != sl[ i ] ){
+ // When does this ever happen?
+ // Debug.warn('subnodes array changed after %w ->
sl[%d]: %w', t, i, sl[i]);
+ while ( i > 0 ){
+ if ( t == sl[ --i ] ) break;
+ }
+ }
+ }
+ }
+
+ this.init();
+ this.sprite.init(true);
+ if (this.oninit.ready) this.oninit.sendEvent( this );
+ if (this.datapath && this.datapath.__LZApplyDataOnInit) {
+ this.datapath.__LZApplyDataOnInit();
+ }
+ }
+}#
+
/**
* Sends onmouseup event
* @access private
*/
-function __LZmouseup() {
+function __LZmouseup(...rest) {
if (this.onmouseup.ready) this.onmouseup.sendEvent()
}
@@ -113,7 +154,7 @@
* Sends onmousemove event
* @access private
*/
-function __LZmousemove() {
+function __LZmousemove(...rest) {
if (this.onmousemove.ready) this.onmousemove.sendEvent()
}
@@ -121,7 +162,7 @@
* Sends onmousedown event
* @access private
*/
-function __LZmousedown() {
+function __LZmousedown(...rest) {
if (this.onmousedown.ready) this.onmousedown.sendEvent()
}
@@ -131,7 +172,6 @@
*/
override function __makeSprite(args) {
this.sprite = new LzSprite(this, true, args);
- trace("making canvas sprite", this.sprite);
if ($debug) {
Debug.write("making canvas sprite", this.sprite);
}
@@ -253,16 +293,16 @@
override function __LZinstantiationDone (){
this.percentcreated = 1;
this.updatePercentCreated = null;
- if (this.onpercentcreated.ready) this.onpercentcreated.sendEvent(
this.percentcreated );
+ this.okToInit();
+}
- /* if ( this.initdelay > 0 ){
- LzInstantiator.halt();
- this.initokdel = new LzDelegate ( this , "okToInit" );
- LzTimer.addTimer( this.initokdel , this.initdelay );
- } else {
- this.okToInit();
- }
- */
+
+/**
+ * @access private
+ */
+function okToInit (){
+ LzInstantiator.resume();
+ this.__LZcallInit();
}
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LaszloView.js
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LaszloView.js
2008-01-07 14:36:21 UTC (rev 7755)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LaszloView.js
2008-01-07 19:00:43 UTC (rev 7756)
@@ -335,7 +335,6 @@
* @param LzView s: The new subview
*/
function addSubview ( s ){
- trace('addSubview', this, s, s.sprite);
if (this.sprite) {
this.sprite.addChildSprite(s.sprite);
}
@@ -1377,6 +1376,7 @@
function setX ( v, force = null ){
+ trace('setX',this,v);
if (force || this._x != v) {
this._x = v;
this.x = v;
Added: openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LzViewLinkage.js
Property changes on:
openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LzViewLinkage.js
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
_______________________________________________
Laszlo-checkins mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins