Author: hqm
Date: 2007-12-22 06:22:50 -0800 (Sat, 22 Dec 2007)
New Revision: 7664
Modified:
openlaszlo/branches/devildog/WEB-INF/lps/lfc/controllers/LaszloAnimation.js
openlaszlo/branches/devildog/WEB-INF/lps/lfc/core/LzNode.js
openlaszlo/branches/devildog/WEB-INF/lps/lfc/events/LaszloEvents.js
Log:
Change 20071222-hqm-4 by [EMAIL PROTECTED] on 2007-12-22 08:35:14 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 of micro-lfc
New Features:
Bugs Fixed:
Technical Reviewer: ptw (pending)
QA Reviewer: dda (pending)
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
use new optional args support for constructor functions
Tests:
Modified:
openlaszlo/branches/devildog/WEB-INF/lps/lfc/controllers/LaszloAnimation.js
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/controllers/LaszloAnimation.js
2007-12-22 05:32:44 UTC (rev 7663)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/controllers/LaszloAnimation.js
2007-12-22 14:22:50 UTC (rev 7664)
@@ -3,12 +3,16 @@
* Use is subject to license terms.
*/
public class LzAnimatorGroup extends LzNode {
- public function LzAnimatorGroup(foo:*, bar:*, ...rest) { }
+ public function LzAnimatorGroup(...rest) {
+ super(rest[0],rest[1]);
+ }
}
public class LzAnimator extends LzAnimatorGroup {
- public function LzAnimator(foo:*, bar:*, ...rest) { }
+ public function LzAnimator(...rest) {
+ super(rest[0],rest[1]);
+ }
}
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/core/LzNode.js
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/core/LzNode.js 2007-12-22
05:32:44 UTC (rev 7663)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/core/LzNode.js 2007-12-22
14:22:50 UTC (rev 7664)
@@ -69,14 +69,17 @@
* @param Boolean instcall
* @access private
*/
- public function LzNode ( parent:* , attrs:* , ...rest){
- // ////////////////////////////////////////////////////////////////
- // TODO [hqm 2007-12 ]Change these to optional args when compiler is
fixed to accept them.
- var children:* = rest[2];
- var instcall:* = rest[3];
- //
- // ////////////////////////////////////////////////////////////////
+ function LzNode ( parent:* , attrs:* , children:* = null, instcall:* =
null){
+ //function LzNode (...rest) {
+ // TODO [hqm 2007-12] replace this with optional args declaration when the
compiler accepts this
+ ////////////////////////////////////////////////////////////////
+ // var parent:* = rest[0];
+ // var attrs:* = rest[1];
+ // var children:* = rest[2];
+ // var instcall:* = rest[3];
+ ////////////////////////////////////////////////////////////////
+
this.__LZUID = "__U" + ++LzNode.__UIDs;
this.__LZdeferDelegates = true;
var qpos = LzDelegate.__LZdelegatesQueue.length;
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/events/LaszloEvents.js
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/events/LaszloEvents.js
2007-12-22 05:32:44 UTC (rev 7663)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/events/LaszloEvents.js
2007-12-22 14:22:50 UTC (rev 7664)
@@ -34,14 +34,7 @@
* @param String eventName: Optional, but required if eventSender is used;
The name
* of the event to register the new delegate for.
*/
-function LzDelegate (context, functionName, ...rest) {
- // ////////////////////////////////////////////////////////////////
- // TODO [hqm 2007-12 ]Change these to optional args when compiler is
fixed to accept them.
-var eventSender:* = rest[2] == undefined ? null : rest[2];
-var eventName:* = rest[3] == undefined ? null : rest[3];
- // ////////////////////////////////////////////////////////////////
-
-
+ function LzDelegate (context, functionName, eventSender:* = null,
eventName:* = null) {
// too expensive to leave on all the time
// if ($debug) {
// this._dbg_created = Debug.backtrace();
@@ -350,7 +343,7 @@
* @param Object eventSender: The owner of this event
* @param String eventName: The name of this event.
*/
- public function LzEvent ( eventSender:* , eventName:* , d:* ){
+ function LzEvent ( eventSender:* , eventName:* , d:* = null){
super();
var _evs = eventSender._events;
if (_evs == null ){
_______________________________________________
Laszlo-checkins mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins