Author: hqm
Date: 2008-01-04 21:03:38 -0800 (Fri, 04 Jan 2008)
New Revision: 7734
Added:
openlaszlo/branches/devildog/WEB-INF/lps/lfc/debugger/swf9stubs.lzs
openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf9/LzApplication.as
Modified:
openlaszlo/branches/devildog/WEB-INF/lps/lfc/LaszloLibrary.lzs
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/core/dummyclasses.js
openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf9/Library.lzs
openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf9/LzSprite.as
openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf9/LzTextSprite.as
Log:
checkpoint swf9 micro lfc
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/LaszloLibrary.lzs
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/LaszloLibrary.lzs
2008-01-04 23:53:13 UTC (rev 7733)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/LaszloLibrary.lzs
2008-01-05 05:03:38 UTC (rev 7734)
@@ -21,10 +21,13 @@
#include "events/Library.lzs"
#include "kernel/Library.lzs"
- //#include "views/Library.lzs"
+#include "views/Library.lzs"
//#include "controllers/Library.lzs"
+ //Debugger placeholder
+#include "debugger/swf9stubs.lzs"
+
} else {
if ($debug) {
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/buildlfc
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/buildlfc 2008-01-04
23:53:13 UTC (rev 7733)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/buildlfc 2008-01-05
05:03:38 UTC (rev 7734)
@@ -1,6 +1,6 @@
#! /bin/bash -f
# * P_LZ_COPYRIGHT_BEGIN ******************************************************
-# * Copyright 2001-2006 Laszlo Systems, Inc. All Rights Reserved. *
+# * Copyright 2001-2006, 2008 Laszlo Systems, Inc. All Rights Reserved.
*
# * Use is subject to license terms. *
# * P_LZ_COPYRIGHT_END ********************************************************
@@ -16,6 +16,12 @@
if [ "$runtime" == "dhtml" ]; then
suffix="js"
fi
+
+if [ "$runtime" == "swf9" ]; then
+ options="${options} --option buildSharedLibrary=true"
+fi
+
+
ant -Dlfc.output=${output:-LFC${runtime#swf}.${suffix:-"lzl"}}
-Dlfc.runtime=${runtime} -Dlfc.source=LaszloLibrary.lzs \
-Dlfc.options="${options}" lfc
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/core/LzNode.js
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/core/LzNode.js 2008-01-04
23:53:13 UTC (rev 7733)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/core/LzNode.js 2008-01-05
05:03:38 UTC (rev 7734)
@@ -45,7 +45,7 @@
var data:* = null;
///////////////////////////////////////////////////////////////////
- // temporary definition
+ // temporary definition
function addProperty(key:*,val:*):void {
if (val instanceof Function) {
trace('called addProperty with a function as val ' + key+" = "
+val);
@@ -79,7 +79,14 @@
// var instcall:* = rest[3];
////////////////////////////////////////////////////////////////
+ this.setters = this.constructor.setters;
+ this.getters = this.constructor.getters;
+ this.defaultattrs = this.constructor.defaultattrs;
+ this.options = this.constructor.options;
+ this.__LZdelayedSetters = this.constructor.__LZdelayedSetters;
+ this.earlySetters = this.constructor.earlySetters;
+
this.__LZUID = "__U" + ++LzNode.__UIDs;
this.__LZdeferDelegates = true;
var qpos = LzDelegate.__LZdelegatesQueue.length;
@@ -294,12 +301,12 @@
// Ensure you have your own private dictionaries, not one
// inherited from your superclass
- for (var hash in {setters: true, getters: true, defaultattrs: true, options:
true, __LZdelayedSetters: true, earlySetters: true} ) {
+ /* for (var hash in {setters: true, getters: true, defaultattrs:
true, options: true, __LZdelayedSetters: true, earlySetters: true} ) {
if (! prototype.hasOwnProperty(hash)) {
prototype[hash] = new LzInheritedHash(prototype[hash]);
}
}
-
+ */
}
/** This event is sent right before a node becomes active --
@@ -351,7 +358,8 @@
var __LZdelegates = null;
/** @access private */
-var defaultattrs = { $hasdefaultattrs : true };
+static var defaultattrs:* = new LzInheritedHash({ $hasdefaultattrs : true });
+var defaultattrs:*;
/**
* Indicates that a <varname>node</varname>'s <method>init</method> method has
been
@@ -876,7 +884,7 @@
* Applies a dictionary of args
* @access private
*/
-function __LZapplyArgs ( args , constcall ){
+ function __LZapplyArgs ( args , constcall = null ){
var oset = {};
var hasset = [];
var hasearly = null;
@@ -1141,7 +1149,7 @@
/** @access private */
-var setters:* ={
+ static var setters:* =new LzInheritedHash({
name : "setName" ,
id : "setID" ,
$events : "__LZsetEvents" ,
@@ -1153,8 +1161,12 @@
$setters : -1,
$classrootdepth : "__LZsetClassRoot",
$datapath : "__LZmakeDatapath"
-};
+ });
+/** @access private */
+ // Declare the instance var.
+ var setters:*;
+
/* this is for the doc generator:
setters.name = "setName"
setters.id = "setID"
@@ -1191,12 +1203,13 @@
* @access private
*/
function __LZaddSetter ( key , val ) {
- // Ensure you have your own private setters dictionary, not one
- // inherited from your superclass
- if (! this.hasOwnProperty('setters')) {
-// Debug.debug('__LZaddSetter: creating setters dictionary');
- this.setters = new LzInheritedHash(this.setters);
- }
+ // Ensure you have your own private setters dictionary
+ 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 {
@@ -1226,24 +1239,27 @@
}
/** @access private */
-var __LZdelayedSetters ={
+static var __LZdelayedSetters = new LzInheritedHash({
$refs : "__LZresolveRefs"
-};
+ });
+var __LZdelayedSetters;
+
/** @access private */
-var earlySetters ={
+static var earlySetters = new LzInheritedHash({
name : 1 ,
id : 2 ,
$events : 3 ,
$delegates : 4 ,
$classrootdepth : 5 ,
$datapath : 6
-};
+ });
+var earlySetters;
/** @access private */
-var getters ={};
+static var getters:* =new LzInheritedHash({});
+var getters:*;
-
/**
* @access private
*/
@@ -1621,8 +1637,10 @@
* @keywords final
* @access private
*/
-var options = {};
+static var options:* = new LzInheritedHash({});
+var options:*;
+
/**
* Setter to install options on a class or instance
*
@@ -1632,8 +1650,8 @@
// Ensure you have your own private options dictionary, not the one
// inherited from your class, nor the default empty one inherited
// from LzNode!
- if (! this.hasOwnProperty('options')) {
- this.options = new LzInheritedHash(this.options);
+ if (this.options == this.constructor.options) {
+ this.options = new LzInheritedHash(this.constructor.options);
}
for (var key in hash) {
this.options[ key ] = hash[key];
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/core/dummyclasses.js
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/core/dummyclasses.js
2008-01-04 23:53:13 UTC (rev 7733)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/core/dummyclasses.js
2008-01-05 05:03:38 UTC (rev 7734)
@@ -6,12 +6,23 @@
var global:* = {};;
+var canvas:LzCanvas;
+
+
public class LzInstantiator {
public static var syncNew:Boolean = true;
- public static function createImmediate(a:*, b:*):void {}
- public static function completeTrickle(a:*):void {}
- public static function trickleInstantiate(a:*,b:*):void {}
- public static function requestInstantiation(a:*,b:*):void {}
+ public static function createImmediate(a:*, b:*):void {
+ trace("LzInstantiator.createImmediate called with ",a,b);
+ }
+ public static function completeTrickle(a:*):void {
+ trace("LzInstantiator.completeTrickle called with ",a);
+ }
+ public static function trickleInstantiate(a:*,b:*):void {
+ trace("LzInstantiator.trickleInstantiate called with ",a,b);
+ }
+ public static function requestInstantiation(a:*,b:*):void {
+ trace("LzInstantiator.requestInstantiation called with ",a,b);
+ }
}
public class LzParsedPath {
@@ -28,6 +39,7 @@
}
public class LzIdle {
+ trace('dummy LzIdle declared in core/dummyclasses.js');
}
public class LzCSSStyle {
@@ -36,26 +48,8 @@
}
-public class LzView extends LzNode {
- public function LzView(...rest){
- super(null, null, null, null);
- }
-}
-public class LzCanvas extends LzView {
- public function LzCanvas(...rest){
- super(null, null, null, null);
- }
-
- public function initiatorAddNode ( e:* , n:* ){
- }
-
-}
-
-
-var canvas:LzCanvas = null;
-
function LzInstantiateView(e, tn:* = null)
{
if ( tn == null) {
@@ -66,4 +60,5 @@
public class LzAnimator {
public function LzAnimator(...rest){}
+ trace('dummy LzAnimator declared in core/dummyclasses.js');
}
Added: openlaszlo/branches/devildog/WEB-INF/lps/lfc/debugger/swf9stubs.lzs
Property changes on:
openlaszlo/branches/devildog/WEB-INF/lps/lfc/debugger/swf9stubs.lzs
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
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-04 23:53:13 UTC (rev 7733)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf9/Library.lzs
2008-01-05 05:03:38 UTC (rev 7734)
@@ -8,6 +8,7 @@
* @subtopic AS2
*/
+#include "kernel/swf9/LzApplication.as"
#include "kernel/swf9/LzIdleKernel.as"
#include "kernel/swf9/LzSprite.as"
#include "kernel/swf9/LzTextSprite.as"
Added: openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf9/LzApplication.as
Property changes on:
openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf9/LzApplication.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/LzSprite.as
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf9/LzSprite.as
2008-01-04 23:53:13 UTC (rev 7733)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf9/LzSprite.as
2008-01-05 05:03:38 UTC (rev 7734)
@@ -72,7 +72,8 @@
}
}
- public function init ():void {
+ public function init (v:Boolean = true):void {
+ this.setVisible(v);
}
/** addChildSprite(Sprite:sprite)
@@ -87,7 +88,7 @@
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(this.x, this.y, this.lzwidth,
this.lzheight);
+ this.graphics.drawRect(0, 0, this.lzwidth, this.lzheight);
this.graphics.endFill();
}
}
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-04 23:53:13 UTC (rev 7733)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf9/LzTextSprite.as
2008-01-05 05:03:38 UTC (rev 7734)
@@ -52,9 +52,25 @@
public function LzTextSprite (... initargs) {
// owner:*, isroot:Boolean
- this.textfield = createTextField(0,0,100,20);
+ this.textfield = createTextField(0,0,400,20);
}
+
+ override public function setWidth( width:Number ):void {
+ this.textfield.width = width;
+ trace('lztextsprite setwidth', width);
+ super.setWidth(width);
+ }
+
+ override public function setHeight( width:Number ):void {
+ this.textfield.height = height;
+ super.setWidth(width);
+ }
+
+
+
+
+
private function createTextField(x:Number, y:Number, width:Number,
height:Number):TextField {
var tfield:TextField = new TextField();
tfield.x = x;
@@ -62,19 +78,21 @@
tfield.width = width;
tfield.height = height;
tfield.border = false;
- tfield.cacheAsBitmap = true;
+ //tfield.cacheAsBitmap = true;
addChild(tfield);
return tfield;
}
public function __initTextProperties (args:Object):void {
this.password = args.password ? true : false;
- var textclip:TextField = this.textfield;
+ var textclip:TextField = this.textfield;
textclip.displayAsPassword = this.password;
textclip.selectable = args.selectable;
- textclip.autoSize = TextFieldAutoSize.NONE;
+ textclip.autoSize = TextFieldAutoSize.LEFT;
+ // TODO [hqm 2008-01] have to figure out how the Flex textfield
multiline
+ // maps to Laszlo model.
this.setMultiline( args.multiline );
//inherited attributes, documented in view
@@ -84,6 +102,7 @@
this.__setFormat();
textclip.htmlText = this.format + this.text + this.closeformat;
+
textclip.background = false;
// To compute our width:
@@ -115,7 +134,7 @@
if (!this.multiline) {
// But turn off autosizing for single line text, now that
// we got a correct line height from flash.
- textclip.autoSize = TextFieldAutoSize.NONE;
+ //textclip.autoSize = TextFieldAutoSize.NONE;
}
} else {
textclip.height = args.height;
@@ -125,6 +144,15 @@
this.scrollheight = this.height;
}
+ override public function setBGColor( c:* ):void {
+ if (c == null) {
+ this.textfield.background = false; }
+ else {
+ this.textfield.background = true;
+ this.textfield.backgroundColor = c;
+ }
+ }
+
public function setBorder ( onroff:Boolean):void {
this.textfield.border = (onroff == true);
}
@@ -190,6 +218,7 @@
* @param String t: the string to which to set the text
*/
public function setText ( t:String ):void {
+ //this.textfield.cacheAsBitmap = false;
if (typeof(t) == 'undefined' || t == 'null') {
t = "";
} else if (typeof(t) != "string") {
@@ -225,7 +254,7 @@
LzIdle.callOnIdle(scrolldel);
}
*/
-
+ //this.textfield.cacheAsBitmap = true;
}
/**
_______________________________________________
Laszlo-checkins mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins