Author: hqm
Date: 2008-01-12 21:19:45 -0800 (Sat, 12 Jan 2008)
New Revision: 7814

Modified:
   openlaszlo/branches/devildog/WEB-INF/lps/lfc/buildlfc
   openlaszlo/branches/devildog/WEB-INF/lps/lfc/core/LzNode.js
   openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf9/LzSprite.as
   openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf9/LzTextSprite.as
   openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LaszloCanvas.js
   openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LaszloView.js
   openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LzText.js
Log:
Change 20080113-hqm-4 by [EMAIL PROTECTED] on 2008-01-13 00:17:39 EST
    in /cygdrive/c/users/hqm/openlaszlo/devildog/WEB-INF/lps/lfc
    for http://svn.openlaszlo.org/openlaszlo/branches/devildog/WEB-INF/lps/lfc

Summary: checkpoint swf9 lfc

New Features:

Bugs Fixed:

Technical Reviewer: hqm (pending)
QA Reviewer: (pending)
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details:
    
got lztext working ; still lots of bugs; 
something about the clipping on text causes it to blank out;
need to update lzsprite setwidth, setheight to resize the clip
mask when width and height are changed.





Tests:






Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/buildlfc
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/buildlfc       2008-01-12 
23:13:15 UTC (rev 7813)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/buildlfc       2008-01-13 
05:19:45 UTC (rev 7814)
@@ -19,6 +19,7 @@
 
 if [ "$runtime" == "swf9" ]; then
     options="${options} --option buildSharedLibrary=true"
+    suffix="swc"
 fi
 
 

Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/core/LzNode.js
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/core/LzNode.js 2008-01-12 
23:13:15 UTC (rev 7813)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/core/LzNode.js 2008-01-13 
05:19:45 UTC (rev 7814)
@@ -683,6 +683,9 @@
   *
   */
 function construct ( parent , args ){
+    if (parent == null) {
+        trace("LzNode construct parent == null, args=", 
lzutils.objAsString(args));
+    }
 
   var lp = parent; // lp == lexical parent
   this.parent = lp;
@@ -726,6 +729,9 @@
     this.nodeLevel = nl ? nl + 1 : 1;
 
     this.immediateparent = ip;
+    if (ip == null) {
+        trace("   immediateparent == null", this, 'parent=', parent);
+    }
 
   } else {
     this.nodeLevel = 1;
@@ -1137,7 +1143,7 @@
 
         // TODO [hqm 2008-01] enable this warning unconditionally for now for 
swf9 debugging
         //    if ($debug) {
-        if ((! x) || (! (x is Function))) {
+        if ((! x) || (! (x is Class))) {
             trace('Class for tag ', e.name, ' has not been defined yet', x); }
         //}
 

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-12 23:13:15 UTC (rev 7813)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf9/LzSprite.as        
2008-01-13 05:19:45 UTC (rev 7814)
@@ -83,7 +83,6 @@
       }
 
       public function init (v:Boolean = true):void {
-          trace('calling LzSprite.init', v, this.owner);
           this.setVisible(v);
       }
 
@@ -288,8 +287,10 @@
       /** setWidth( Number:width )
           o Sets the sprite to the specified width 
       */
-      public function setWidth( width:Number ):void {
-          this.lzwidth = width;
+      public function setWidth( v:* ):void {
+          this.lzwidth = v;
+          // TODO [hqm 2008-01] We need to add back in the code here to
+          // update the clipping mask size, and resource stretching as well, 
see swf8 kernel
           draw();
       }
 
@@ -297,8 +298,10 @@
       /** setHeight( Number:height )
           o Sets the sprite to the specified height 
       */
-      public function setHeight( height:Number ):void {
-          this.lzheight = height;
+      public function setHeight( v:* ):void {
+          this.lzheight = v;
+          // TODO [hqm 2008-01] We need to add back in the code here to
+          // update the clipping mask size, and resource stretching as well, 
see swf8 kernel
           draw();
       }
 

Modified: 
openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf9/LzTextSprite.as
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf9/LzTextSprite.as    
2008-01-12 23:13:15 UTC (rev 7813)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf9/LzTextSprite.as    
2008-01-13 05:19:45 UTC (rev 7814)
@@ -54,20 +54,21 @@
             super(newowner,false)
             // owner:*, isroot:Boolean
             this.textfield = createTextField(0,0,400,20);
-            trace('new LzTextSprite owner=', this.owner);
         }
 
 
-        override public function setWidth( width:Number ):void {
+        override public function setWidth( width:* ):void {
             super.setWidth(width);
-            this.textfield.width = width;
-            trace('lztextsprite setwidth', width);
+            if (width) {
+                this.textfield.width = width;
+            }
         }
 
-        override public function setHeight( height:Number ):void {
+        override public function setHeight( height:* ):void {
             super.setHeight(height);
-            this.textfield.height = height;
-            trace('lztextsprite setheight', height);
+            if (height) {
+                this.textfield.height = height;
+            }
         }
 
         private function createTextField(x:Number, y:Number, width:Number, 
height:Number):TextField {
@@ -83,7 +84,6 @@
         }
 
         public function __initTextProperties (args:Object):void {
-            trace("__initTextProperties ", lzutils.objAsString(args));
             this.password = args.password  ? true : false;
             var textclip:TextField = this.textfield;
             textclip.displayAsPassword = this.password;
@@ -145,6 +145,7 @@
         }
 
         override public function setBGColor( c:* ):void {
+            trace("LzTextSprite. setBGColor  ", c);
             if (c == null) {
                 this.textfield.background = false; }
             else {
@@ -361,37 +362,37 @@
 }
 
 function setScroll ( h ){
-    trace("LzTextSprite.setScroll not yet implemeneted");
+    trace("LzTextSprite.setScroll not yet implemented");
 }
 function getScroll (  ){
-    trace("LzTextSprite.getScroll not yet implemeneted");
+    trace("LzTextSprite.getScroll not yet implemented");
 }
 
 function getMaxScroll (  ){
-    trace("LzTextSprite.getMaxScroll not yet implemeneted");
+    trace("LzTextSprite.getMaxScroll not yet implemented");
 }
 
 function getBottomScroll (  ){
-    trace("LzTextSprite.getBottomScroll not yet implemeneted");
+    trace("LzTextSprite.getBottomScroll not yet implemented");
 }
 
 function setXScroll ( n ){
-    trace("LzTextSprite.setXScroll not yet implemeneted");
+    trace("LzTextSprite.setXScroll not yet implemented");
 }
 
 function setYScroll ( n ){
-    trace("LzTextSprite.setYScroll not yet implemeneted");
+    trace("LzTextSprite.setYScroll not yet implemented");
 }
 
 function setWordWrap ( wrap ){
-    trace("LzTextSprite.setWordWrap not yet implemeneted");
+    trace("LzTextSprite.setWordWrap not yet implemented");
 }
 
 function getSelectionPosition ( ){
-    trace("LzTextSprite.getSelectionPosition not yet implemeneted");
+    trace("LzTextSprite.getSelectionPosition not yet implemented");
 }    
 function getSelectionSize ( ){
-    trace("LzTextSprite.getSelectionSize not yet implemeneted");
+    trace("LzTextSprite.getSelectionSize not yet implemented");
 }    
 
     }#

Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LaszloCanvas.js
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LaszloCanvas.js  
2008-01-12 23:13:15 UTC (rev 7813)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LaszloCanvas.js  
2008-01-13 05:19:45 UTC (rev 7814)
@@ -271,7 +271,8 @@
 
     //this.isinited = false;
     //Debug.write('LzCanvas.initDone');
-    LzInstantiator.requestInstantiation(  this, sva );
+    //LzInstantiator.requestInstantiation(  this, sva );
+    LzInstantiator.createImmediate(  this, sva );
 
 }
 

Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LaszloView.js
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LaszloView.js    
2008-01-12 23:13:15 UTC (rev 7813)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LaszloView.js    
2008-01-13 05:19:45 UTC (rev 7814)
@@ -258,6 +258,9 @@
     super.construct( (parent ? parent : canvas), args );
 
     var ip = this.immediateparent;
+    if (ip == null) {
+        trace("LzView.construct immediateparent == null", this.id);
+    }
     
     if (ip) {
         this.mask = ip.mask;
@@ -314,6 +317,7 @@
   */
 function __makeSprite(args) {
     this.sprite = new LzSprite(this, false, args);
+    trace("LzView.__makeSprite", sprite, args);
 }
 
 /**
@@ -370,7 +374,10 @@
 override function __LZinstantiationDone (){
     if (this.immediateparent) {
         this.immediateparent.addSubview( this );
+    } else {
+        trace("LaszloView.__LZinstantiationDone immediateparent = null");
     }
+
     //this.callInherited( '__LZinstantiationDone' , arguments.callee );
     super.__LZinstantiationDone.apply(this, arguments);
 }
@@ -1112,7 +1119,7 @@
         this.sprite.setWidth(newsize);
         if (this.onwidth.ready) this.onwidth.sendEvent( newsize );
 
-        if (this.immediateparent.__LZcheckwidth)
+        if (this.immediateparent && this.immediateparent.__LZcheckwidth)
             this.immediateparent.__LZcheckwidthFunction( this );
     }
 
@@ -1137,7 +1144,7 @@
         this.sprite.setHeight(newsize);
         if (this.onheight.ready) this.onheight.sendEvent( newsize );
 
-        if (this.immediateparent.__LZcheckheight) 
+        if (this.immediateparent && this.immediateparent.__LZcheckheight) 
             this.immediateparent.__LZcheckheightFunction( this );
 
     }
@@ -1394,7 +1401,7 @@
         if ( this.pixellock ) v = Math.floor( v );
         this.sprite.setX(v)
         
-        if (this.immediateparent.__LZcheckwidth)
+        if (this.immediateparent &&  this.immediateparent.__LZcheckwidth)
             this.immediateparent.__LZcheckwidthFunction( this );
         if (this.onx.ready) this.onx.sendEvent( this.x );
     }
@@ -1421,7 +1428,7 @@
         
         if ( this.pixellock ) v = Math.floor( v );
         this.sprite.setY(v)
-            if (this.immediateparent.__LZcheckheight)
+            if (this.immediateparent && this.immediateparent.__LZcheckheight)
                 this.immediateparent.__LZcheckheightFunction( this );
         if (this.ony.ready) this.ony.sendEvent( this.y );
     }
@@ -1444,9 +1451,9 @@
         this.setY( this.y, true );
     }
 
-    if (this.immediateparent.__LZcheckwidth)
+    if (this.immediateparent &&  this.immediateparent.__LZcheckwidth)
         this.immediateparent.__LZcheckwidthFunction( this );
-    if (this.immediateparent.__LZcheckheight)
+    if (this.immediateparent &&  this.immediateparent.__LZcheckheight)
         this.immediateparent.__LZcheckheightFunction( this );
 }
 
@@ -1484,7 +1491,7 @@
         
         //this.__LZbgRef._xscale = v;
 
-        if (this.immediateparent.__LZcheckwidth)
+        if (this.immediateparent && this.immediateparent.__LZcheckwidth)
             this.immediateparent.__LZcheckwidthFunction( this );
 
 
@@ -1531,7 +1538,7 @@
         }
         this.hassetheight = true;
         
-        if (this.immediateparent.__LZcheckheight)
+        if (this.immediateparent && this.immediateparent.__LZcheckheight)
             this.immediateparent.__LZcheckheightFunction( this );
 
 

Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LzText.js
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LzText.js        
2008-01-12 23:13:15 UTC (rev 7813)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LzText.js        
2008-01-13 05:19:45 UTC (rev 7814)
@@ -113,7 +113,6 @@
         }
         */
 
-        trace('lztext constructor called');
     }
 
     var password;
@@ -241,13 +240,13 @@
   */
 override function construct ( parent, args ) {
 
-    this.password = ('password' in args && args.password)  ? true : false;
-    this.multiline = ('multiline' in args) ? args.multiline : null;
+    //    this.password = ('password' in args && args.password)  ? true : 
false;
+    //    this.multiline = ('multiline' in args) ? args.multiline : null;
 
     super.construct(parent, args);
 
-    this.sizeToHeight = false;
 
+    //    this.sizeToHeight = false;
     this.fontname  = ('font' in args)       ? args.font      : 
this.searchParents( "fontname"  ).fontname ;
     this.fontsize  = ('fontsize' in args)   ? args.fontsize  : 
this.searchParents( "fontsize"  ).fontsize ;
     this.fontstyle = ('fontstyle' in args)  ? args.fontstyle : 
this.searchParents( "fontstyle" ).fontstyle ;
@@ -256,18 +255,12 @@
     args.fontsize = this.fontsize;
     args.fontstyle = this.fontstyle;
     this.tsprite.__initTextProperties(args);
+    trace("__initTextProperties", lzutils.objAsString(args));
 
     args.font      = LzNode._ignoreAttribute;
     args.fontsize  = LzNode._ignoreAttribute;
     args.fontstyle = LzNode._ignoreAttribute;
 
-    //this.callInherited( "construct", arguments.callee ,  parent , args );
-    this.yscroll = 0;
-    this.xscroll = 0;
-
-    this.resize = ('resize' in args) ? (args.resize == true) : this.resize;
-    this.setResize(this.resize);
-    
     if ('maxlength' in args && args.maxlength != null) {
         this.setMaxLength(args.maxlength);
     }
@@ -275,12 +268,23 @@
     this.text =  (!('text' in args) || args.text == null) ? "" : args.text;
     if(this.maxlength != null && this.text.length > this.maxlength){
         this.text = this.text.substring(0, this.maxlength);
+        args.text = this.text;
     }
 
+
+    //this.callInherited( "construct", arguments.callee ,  parent , args );
+    this.yscroll = 0;
+    this.xscroll = 0;
+
+    this.resize = ('resize' in args) ? (args.resize == true) : this.resize;
+    this.setResize(this.resize);
+
     this.setMultiline( this.multiline );
-
     this.tsprite.setText( this.text );
 
+
+    /*
+      
     // To compute our width:
     // + if text is multiline:
     //    if no width is supplied, use parent width
@@ -347,6 +351,7 @@
             this.setThickness(0);
         }
     }
+    */
 
 }
 
@@ -356,15 +361,13 @@
   * @access private
   */
 override function __makeSprite(args) {
-    trace("LzText __makeSprite", lzutils.objAsString(args));
     this.sprite = new LzTextSprite(this);
-    #passthrough {
-    this.tsprite = sprite as LzTextSprite;
-    }#
-    trace("LzText this.sprite", lzutils.objAsString(this.sprite));
+    this.tsprite = LzTextSprite(this.sprite);
 }
 
 
+
+
 /**
   * Get a reference to the control mc (overridden from LzView)
   * @access private
@@ -422,7 +425,10 @@
 setters.pattern = "setPattern";
 
 
-defaultattrs.clip = true;
+    // ++++ TODO [hqm 2008-01] make this true again when I figure out
+    // why clipping is messing up for text sprite
+    //defaultattrs.clip = true;
+defaultattrs.clip = false;
 
 
 


_______________________________________________
Laszlo-checkins mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins

Reply via email to