[Laszlo-checkins] r13264 - openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9

bargull@openlaszlo.org bargull at openlaszlo.org
Thu Mar 12 06:33:44 PDT 2009


Author: bargull
Date: 2009-03-12 06:33:36 -0700 (Thu, 12 Mar 2009)
New Revision: 13264

Modified:
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LFCApplication.as
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/Library.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzAudioKernel.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzContextMenuKernel.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzHTTPLoader.as
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzIdleKernel.as
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzKeyboardKernel.as
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzMouseKernel.as
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzScreenKernel.as
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzXMLParser.as
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzXMLTranslator.as
Log:
Change 20090312-bargull-UOP by bargull at dell--p4--2-53 on 2009-03-12 12:12:35
    in /home/Admin/src/svn/openlaszlo/trunk
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: clean-up for AS3 import statements

New Features:

Bugs Fixed: LPP-7904 (SWF9: unnecessary imports) (partial)

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

Documentation:

Release Notes:

Details:
LFCApplication:
- updated import statements
- removed (now) unused "write" class variable
- added missing typing

LzAudioKernel:
- added missing typing

LzXMLTranslator/LzXMLParser:
- updated @subtopic

LzContextMenuKernel:
- updated import statements
- added missing typing

LzHTTPLoader:
- updated import statements
- added missing typing

LzIdleKernel:
- updated import statements
- added missing typing

LzKeyboardKernel:
- updated import statements
- added missing typing

LzMouseKernel:
- updated import statements
- added missing typing

LzScreenKernel:
- updated import statements
- added missing typing
    

Tests:
smoke (swf9)



Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LFCApplication.as
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LFCApplication.as	2009-03-12 12:50:08 UTC (rev 13263)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LFCApplication.as	2009-03-12 13:33:36 UTC (rev 13264)
@@ -14,15 +14,15 @@
     // This serves as the superclass of DefaultApplication, currently that is where
     // the compiler puts top level code to run.
 
-    #passthrough (toplevel:true) {  
-    import flash.display.*;
-    import flash.events.*;
-    import flash.utils.*;
-    import flash.text.*;
-    import flash.system.*;
-    import flash.net.*;
-    import flash.ui.*;
-    import flash.text.Font;
+    #passthrough (toplevel:true) {
+    import flash.display.DisplayObject;
+    import flash.display.Sprite;
+    import flash.display.Stage;
+    import flash.display.StageAlign;
+    import flash.display.StageScaleMode;
+    import flash.events.Event;
+    import flash.events.FocusEvent;
+    import flash.system.Capabilities;
     }#
 
     // The application sprite
@@ -43,9 +43,6 @@
     // Allow anyone access to the stage object (see ctor below)
     public static var stage:Stage = null;
 
-    // Allow anyone access to write to the debugger
-    public static var write:Function;
-
     // global tabEnabled flag for TextField
     public static var textfieldTabEnabled:Boolean = false;
 
@@ -55,13 +52,13 @@
         LFCApplication._sprite.addEventListener(Event.ADDED_TO_STAGE, initLFC);
     }
 
-    private function initLFC(event:Event = null) {
+    private function initLFC(event:Event = null) :void {
         LFCApplication._sprite.removeEventListener(Event.ADDED_TO_STAGE, initLFC);
         // Allow anyone to access the stage object
         LFCApplication.stage = LFCApplication._sprite.stage;
         runToplevelDefinitions()
 
-        var idleTimerPeriod = 14; // msecs
+        var idleTimerPeriod:Number = 14; // msecs
 
         //trace('idle timer period = ', idleTimerPeriod , 'msecs');
         LzIdleKernel.startTimer( idleTimerPeriod );
@@ -85,7 +82,7 @@
         LzKeyboardKernel.setCallback(lz.Keys, '__keyEvent');
     }
 
-    function preventFocusChange(event:FocusEvent):void {
+    private function preventFocusChange(event:FocusEvent):void {
         if (event.keyCode == 9) {
             event.preventDefault();
         }
@@ -100,4 +97,4 @@
 // Resource library
 // contains {ptype, class, frames, width, height}
 // ptype is one of "ar" (app relative) or "sr" (system relative)
-var LzResourceLibrary = {};
+var LzResourceLibrary :Object = {};

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/Library.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/Library.lzs	2009-03-12 12:50:08 UTC (rev 13263)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/Library.lzs	2009-03-12 13:33:36 UTC (rev 13264)
@@ -1,11 +1,11 @@
 /**
-  * Library.js
+  * Library.lzs
   *
-  * @copyright Copyright 2001-2008 Laszlo Systems, Inc.  All Rights Reserved.
+  * @copyright Copyright 2001-2009 Laszlo Systems, Inc.  All Rights Reserved.
   *            Use is subject to license terms.
   *
   * @topic Kernel
-  * @subtopic AS2
+  * @subtopic swf9
   */
 
 // A class for loading and executing debug code at runtime

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzAudioKernel.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzAudioKernel.lzs	2009-03-12 12:50:08 UTC (rev 13263)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzAudioKernel.lzs	2009-03-12 13:33:36 UTC (rev 13264)
@@ -1,11 +1,11 @@
 /**
-  * LzAudioKernel.as
+  * LzAudioKernel.lzs
   *
-  * @copyright Copyright 2001-2008 Laszlo Systems, Inc.  All Rights Reserved.
+  * @copyright Copyright 2001-2009 Laszlo Systems, Inc.  All Rights Reserved.
   *            Use is subject to license terms.
   *
   * @topic Kernel
-  * @subtopic AS2
+  * @subtopic swf9
   */
 
 /**
@@ -21,13 +21,13 @@
       import flash.media.SoundMixer;
       import flash.media.SoundTransform;
     }#
-    
+
     /**
       * Sets the current sound resource and starts playing it. 
       * @param String snd: Name of a sound resource to play
       * @param LzSprite t: Sprite for sound to act upon (optional)
       */
-    static function playSound (snd:String, t:LzSprite = null){
+    static function playSound (snd:String, t:LzSprite = null) :void {
         if (t == null) {
             if (LzAsset.isSoundAsset(snd)) {
                 //TODO: check for swf8 compatibility
@@ -38,7 +38,7 @@
             t.setResource(snd);
         }
     }
-    
+
     /**
       * Stop playing the current sound
       * @param LzSprite t: Sprite for sound to act upon (optional)
@@ -51,21 +51,21 @@
             t.stop();
         }
     }
-    
+
     /**
       * Start playing the current sound
       * */
-    static function startSound (t:Sprite = null) {
+    static function startSound (t:Sprite = null) :void {
         //TODO: check for swf8 compatibility
     }
-    
+
     /**
       * @access private
       */
     static function getSoundObject (t:LzSprite) :* {
         return t ? t.soundChannel ? t.soundChannel : t : SoundMixer;
     }
-    
+
     /**
       * Get the global volume
       * @return Number: volume from 0 to 100 (0 is silent).
@@ -74,7 +74,7 @@
     static function getVolume (t:LzSprite = null) :Number {
         return getSoundObject(t).soundTransform.volume * 100;
     }
-    
+
     /**
       * Set the global volume.
       * @param Number v: linear volume from 0 to 100 (0 is silent).
@@ -86,7 +86,7 @@
         sndTransform.volume = (v < 0 ? 0 : v > 100 ? 100 : v) / 100;
         soundObj.soundTransform = sndTransform;
     }
-    
+
     /**
       * Get the global pan.
       * @return Number: linear pan from -100 to +100 (left to right)
@@ -95,7 +95,7 @@
     static function getPan (t:LzSprite = null) :Number {
         return getSoundObject(t).soundTransform.pan * 100;
     }
-    
+
     /**
       * Set the global pan.
       * @param Number p: linear pan from -100 to +100 (left to right)

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzContextMenuKernel.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzContextMenuKernel.lzs	2009-03-12 12:50:08 UTC (rev 13263)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzContextMenuKernel.lzs	2009-03-12 13:33:36 UTC (rev 13264)
@@ -1,6 +1,6 @@
 /**
   *
-  * @copyright Copyright 2001-2008 Laszlo Systems, Inc.  All Rights Reserved.
+  * @copyright Copyright 2001-2009 Laszlo Systems, Inc.  All Rights Reserved.
   *            Use is subject to license terms.
   *
   * @access public
@@ -14,13 +14,10 @@
   */
 class LzContextMenuKernel {
 
-    #passthrough (toplevel:true) {  
-    import flash.display.*;
-    import flash.events.*;
-    import flash.utils.*;
-    import flash.text.*;
-    import flash.system.*;
-    import flash.ui.*;
+    #passthrough (toplevel:true) {
+    import flash.events.ContextMenuEvent;
+    import flash.ui.ContextMenu;
+    import flash.ui.ContextMenuBuiltInItems;
     }#
 
 function LzContextMenuKernel (newowner:LzContextMenu) {
@@ -42,9 +39,9 @@
   * 
   * @access private
   */
-function setDelegate (delegate) :void {
-  var __litem__ = this.owner;
-  var callback = function (mc, cmitem) {
+function setDelegate (delegate:LzDelegate) :void {
+  var __litem__:LzContextMenu = this.owner;
+  var callback:Function = function (e:ContextMenuEvent) :void {
       if (delegate != null) delegate.execute(__litem__);
       if (__litem__.onmenuopen.ready) __litem__.onmenuopen.sendEvent(__litem__);
   };
@@ -57,7 +54,7 @@
   * @param LzContextMenuItem item: LzContextMenuItem to install on this menu
   * @access private
   */
-function addItem (item) :void {
+function addItem (item:LzContextMenuItem) :void {
     this.cm.customItems.push(item.kernel.cmenuitem);
 }
 
@@ -109,16 +106,12 @@
   */
 class LzContextMenuItemKernel {
 
-    #passthrough (toplevel:true) {  
-    import flash.display.*;
-    import flash.events.*;
-    import flash.utils.*;
-    import flash.text.*;
-    import flash.system.*;
-    import flash.ui.*;
+    #passthrough (toplevel:true) {
+    import flash.events.ContextMenuEvent;
+    import flash.ui.ContextMenuItem;
     }#
 
-function LzContextMenuItemKernel (newowner:LzContextMenuItem, title, del) {
+function LzContextMenuItemKernel (newowner:LzContextMenuItem, title:String, del:*) {
     this.owner = newowner;
     this.cmenuitem = new ContextMenuItem(title);
     this.setDelegate(del);
@@ -137,8 +130,8 @@
   * @access private
   */
 function setDelegate (delegate:*) :void {
-  var __litem__ = this.owner;
-  var callback = function (mc, cmitem) {
+  var __litem__:LzContextMenuItem = this.owner;
+  var callback:Function = function (e:ContextMenuEvent) :void {
       if (delegate != null) {
           if (delegate is Function) {
               delegate();

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzHTTPLoader.as
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzHTTPLoader.as	2009-03-12 12:50:08 UTC (rev 13263)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzHTTPLoader.as	2009-03-12 13:33:36 UTC (rev 13264)
@@ -1,7 +1,7 @@
 /**
   * LzHTTPLoader.as
   *
-  * @copyright Copyright 2007, 2008 Laszlo Systems, Inc.  All Rights Reserved.
+  * @copyright Copyright 2007-2009 Laszlo Systems, Inc.  All Rights Reserved.
   *            Use is subject to license terms.
   *
   * @topic Kernel
@@ -11,11 +11,19 @@
 
 public class LzHTTPLoader {
 
-    #passthrough (toplevel:true) {  
-        import flash.events.*;
-        import flash.net.*;
-        import flash.utils.*;
-        import flash.xml.*;  
+    #passthrough (toplevel:true) {
+        import flash.events.IEventDispatcher;
+        import flash.events.Event;
+        import flash.events.IOErrorEvent;
+        import flash.events.ProgressEvent;
+        import flash.events.SecurityErrorEvent;
+        import flash.net.URLLoader;
+        import flash.net.URLLoaderDataFormat;
+        import flash.net.URLRequest;
+        import flash.net.URLRequestHeader;
+        import flash.net.URLRequestMethod;
+        import flash.utils.clearTimeout;
+        import flash.utils.setTimeout;
     }#
 
     static const GET_METHOD:String    = "GET";
@@ -61,9 +69,9 @@
     }
 
     // Default callback handlers
-    public var loadSuccess:Function = function (...data) { trace('loadSuccess callback not defined on', this); }
-    public var loadError:Function   = function (...data) { trace('loadError callback not defined on', this); };
-    public var loadTimeout:Function = function (...data) { trace('loadTimeout callback not defined on', this); };
+    public var loadSuccess:Function = function (...data) :void { trace('loadSuccess callback not defined on', this); }
+    public var loadError:Function   = function (...data) :void { trace('loadError callback not defined on', this); };
+    public var loadTimeout:Function = function (...data) :void { trace('loadTimeout callback not defined on', this); };
 
     /* Returns the response as a string  */
     public function getResponse () :String {
@@ -120,11 +128,11 @@
     }
 
     /* @public */
-    public function setQueryParams (qparams) :void {
+    public function setQueryParams (qparams:Object) :void {
     }
 
     /* @public */
-    public function setQueryString (qstring) :void {
+    public function setQueryString (qstring:String) :void {
     }
 
     /*
@@ -214,7 +222,7 @@
         var lid:uint = httploader.__loaderid;
     
         LzHTTPLoader.activeRequests[lid] = [httploader, endtime];
-        var callback:Function = function () {
+        var callback:Function = function () :void {
             LzHTTPLoader.__LZcheckXMLHTTPTimeouts(lid);
         }
         var timeoutid:uint = flash.utils.setTimeout(callback, duration);
@@ -249,7 +257,7 @@
             } else {
                 // if it hasn't timed out, add it back to the list for the future
                 //Debug.write("recheck timeout");
-                var callback:Function = function () {
+                var callback:Function = function () :void {
                     LzHTTPLoader.__LZcheckXMLHTTPTimeouts(lid);
                 }
                 var timeoutid:uint = flash.utils.setTimeout(callback, now - dstimeout);
@@ -303,7 +311,7 @@
                                                               options.trimwhitespace,
                                                               options.nsprefix);
                         }
-                    } catch (err) {
+                    } catch (err:Error) {
                         trace("caught error parsing xml", err);
                         loadError(this, null);
                         return;

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzIdleKernel.as
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzIdleKernel.as	2009-03-12 12:50:08 UTC (rev 13263)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzIdleKernel.as	2009-03-12 13:33:36 UTC (rev 13264)
@@ -1,41 +1,39 @@
 /**
-  * LzIdleKernelSWF9.as
+  * LzIdleKernel.as
   *
-  * @copyright Copyright 2001-2006, 2008 Laszlo Systems, Inc.  All Rights Reserved.
+  * @copyright Copyright 2001-2006, 2008, 2009 Laszlo Systems, Inc.  All Rights Reserved.
   *            Use is subject to license terms.
   *
   * @topic Kernel
-  * @subtopic DHTML
+  * @subtopic swf9
   * @author Henry Minsky 
   */
 
 public class LzIdleKernel  {
 
-    #passthrough (toplevel:true) {  
-    import flash.display.*;
-    import flash.events.*;
-    import flash.utils.*;
+    #passthrough (toplevel:true) {
+    import flash.events.Event;
+    import flash.utils.getTimer;
     }#
-  
-        #passthrough  {  
-        public static var __callbacks:* = [];
 
+        #passthrough {
+        public static var __callbacks:Array = [];
+
         public static  function addCallback (scope:*, funcname:String):void {
             __callbacks.push([scope, funcname]);
         }
 
-
         public static function removeCallback (scope:*, funcname:String):* {
             for (var i:int = __callbacks.length - 1; i >= 0; i--) {
                 if (__callbacks[i][0] == scope && __callbacks[i][1] == funcname) {
-                    return __callbacks.splice(i, 1)        
-                }    
-            }    
+                    return __callbacks.splice(i, 1);
+                }
+            }
         }
 
         public static function __update(event:Event):void{
             for (var i:int = __callbacks.length - 1; i >= 0; i--) {
-                var s = (__callbacks[i])[0];
+                var s:* = (__callbacks[i])[0];
                 s[__callbacks[i][1]]( getTimer() );
             }
         }
@@ -47,7 +45,3 @@
 
     }#
 }
-
-
-
-

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzKeyboardKernel.as
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzKeyboardKernel.as	2009-03-12 12:50:08 UTC (rev 13263)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzKeyboardKernel.as	2009-03-12 13:33:36 UTC (rev 13264)
@@ -1,33 +1,31 @@
 /**
-  * LzKeyboardKernel.lzs
+  * LzKeyboardKernel.as
   *
   * @copyright Copyright 2001-2009 Laszlo Systems, Inc.  All Rights Reserved.
   *            Use is subject to license terms.
   *
   * @topic Kernel
-  * @subtopic AS2
+  * @subtopic swf9
   */
 
 // Receives keyboard events from the runtime
-class LzKeyboardKernel
-{
-    #passthrough (toplevel:true) {  
-    import flash.events.*;
-    import flash.ui.*;
+class LzKeyboardKernel {
+    #passthrough (toplevel:true) {
+    import flash.events.KeyboardEvent;
     }#
 
-    static function __keyboardEvent ( e:KeyboardEvent ){   
-        var t = 'on' + e.type.toLowerCase();
-        var delta = {};
-        var s, k = e.keyCode;
-        var keyisdown = t == 'onkeydown';
-        s = String.fromCharCode(k).toLowerCase();
+    static function __keyboardEvent (e:KeyboardEvent) :void {   
+        var t:String = 'on' + e.type.toLowerCase();
+        var delta:Object = {};
+        var k:uint = e.keyCode;
+        var keyisdown:Boolean = t == 'onkeydown';
+        var s:String = String.fromCharCode(k).toLowerCase();
 
 
         // prevent duplicate onkeydown events - see LPP-7432 
         if (__keyState[k] == keyisdown) return;
         __keyState[k] = keyisdown;
-        
+
         delta[s] = keyisdown;
         var ctrl:Boolean = e.ctrlKey;
 
@@ -36,12 +34,12 @@
         if (__callback) __scope[__callback](delta, k, t, ctrl);
     }
 
-    static var __callback = null;
-    static var __scope = null;
+    static var __callback:String = null;
+    static var __scope:* = null;
     static var __keyState:Object = {};
     static var __listeneradded:Boolean = false;
 
-    static function setCallback (scope, funcname) {
+    static function setCallback (scope:*, funcname:String) :void {
         if (__listeneradded == false) {
             __scope = scope;
             __callback = funcname;
@@ -52,8 +50,6 @@
     }    
 
     // Called by lz.Keys when the last focusable element was reached.
-    static function gotLastFocus() {
+    static function gotLastFocus() :void {
     }
 } // End of LzKeyboardKernel
-
-

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzMouseKernel.as
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzMouseKernel.as	2009-03-12 12:50:08 UTC (rev 13263)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzMouseKernel.as	2009-03-12 13:33:36 UTC (rev 13264)
@@ -5,27 +5,27 @@
   *            Use is subject to license terms.
   *
   * @topic Kernel
-  * @subtopic AS2
+  * @subtopic swf9
   */
 
 // Receives mouse events from the runtime
 class LzMouseKernel  {
-    #passthrough (toplevel:true) {  
-    import flash.display.*;
-    import flash.events.*;
-    import flash.utils.*;
-    import flash.ui.*;
+    #passthrough (toplevel:true) {
+    import flash.display.Sprite;
+    import flash.events.Event;
+    import flash.events.MouseEvent;
+    import flash.ui.Mouse;
     }#
 
 
     // sends mouse events to the callback
-    static function __sendEvent(view, eventname) {
+    static function __sendEvent(view:*, eventname:String) :void {
         if (__callback) __scope[__callback](eventname, view);
         //Debug.write('LzMouseKernel event', eventname);
     }
-    static var __callback = null;
-    static var __scope = null;
-    static var __lastMouseDown = null;
+    static var __callback:String = null;
+    static var __scope:* = null;
+    static var __lastMouseDown:LzSprite = null;
     static var __mouseLeft:Boolean = false;
     static var __listeneradded:Boolean = false;
 
@@ -34,7 +34,7 @@
      */
     static var showhandcursor:Boolean = true;
 
-    static function setCallback (scope, funcname) {
+    static function setCallback (scope:*, funcname:String) :void {
         __scope = scope;
         __callback = funcname;
         if (__listeneradded == false) {
@@ -54,7 +54,7 @@
 
     // Handles global mouse events
     static function __mouseHandler(event:MouseEvent):void {
-        var eventname = 'on' + event.type.toLowerCase();
+        var eventname:String = 'on' + event.type.toLowerCase();
         if (eventname == 'onmouseup' && __lastMouseDown != null) {
             // call mouseup on the sprite that got the last mouse down  
             __lastMouseDown.__globalmouseup(event);
@@ -71,7 +71,7 @@
     // sends mouseup and calls __globalmouseup when the mouse goes up outside the app - see LPP-7724
     static function __mouseUpOutsideHandler():void {
         if (__lastMouseDown != null) {
-            var ev = new MouseEvent('mouseup');
+            var ev:MouseEvent = new MouseEvent('mouseup');
             __lastMouseDown.__globalmouseup(ev);
             __lastMouseDown = null;
         }
@@ -91,7 +91,7 @@
     * Shows or hides the hand cursor for all clickable views.
     * @param Boolean show: true shows the hand cursor for buttons, false hides it
     */
-    static function showHandCursor (show) {
+    static function showHandCursor (show:Boolean) :void {
         showhandcursor = show;
     }
 
@@ -104,12 +104,12 @@
     * Sets the cursor to a resource
     * @param String what: The resource to use as the cursor. 
     */
-    static function setCursorGlobal ( what:String ){
+    static function setCursorGlobal (what:String) :void {
         globalCursorResource = what;
         setCursorLocal(what);
     }
 
-    static function setCursorLocal ( what:String ) {
+    static function setCursorLocal (what:String) :void {
         if ( __amLocked ) { return; }
         Mouse.hide();
         cursorSprite.x = LFCApplication.stage.mouseX;
@@ -119,7 +119,7 @@
             if (cursorSprite.numChildren > 0) {
                 cursorSprite.removeChildAt(0);
             }
-            var resourceSprite = getCursorResource(what);
+            var resourceSprite:Sprite = getCursorResource(what);
             cursorSprite.addChild( resourceSprite );
             lastCursorResource = what;
         }
@@ -135,9 +135,9 @@
 
 
     static function getCursorResource (resource:String):Sprite {
-          var resinfo = LzResourceLibrary[resource];
-          var assetclass;
-          var frames = resinfo.frames;
+          var resinfo:Object = LzResourceLibrary[resource];
+          var assetclass:Class;
+          var frames:Array = resinfo.frames;
           var asset:Sprite;
           // single frame resources get an entry in LzResourceLibrary which has
           // 'assetclass' pointing to the resource Class object.
@@ -162,7 +162,7 @@
     * 
     * @access private
     */
-    static function restoreCursor ( ){
+    static function restoreCursor () :void {
         if ( __amLocked ) { return; }
         cursorSprite.stopDrag();
         cursorSprite.visible = false;
@@ -172,7 +172,7 @@
 
     /** Called by LzSprite to restore cursor to global value.
      */
-    static function restoreCursorLocal ( ){
+    static function restoreCursorLocal () :void {
         if ( __amLocked ) { return; }
         if (globalCursorResource == null) {
             // Restore to system default pointer
@@ -187,7 +187,7 @@
     * Prevents the cursor from being changed until unlock is called.
     * 
     */
-    static function lock (){
+    static function lock () :void {
         __amLocked = true;
     }
 
@@ -195,12 +195,12 @@
     * Restores the default cursor.
     * 
     */
-    static function unlock (){
+    static function unlock () :void {
         __amLocked = false;
         restoreCursor(); 
     }
 
-    static function initCursor () {
+    static function initCursor () :void {
         cursorSprite = new Sprite();
         cursorSprite.mouseChildren = false;
         cursorSprite.mouseEnabled = false;

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzScreenKernel.as
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzScreenKernel.as	2009-03-12 12:50:08 UTC (rev 13263)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzScreenKernel.as	2009-03-12 13:33:36 UTC (rev 13264)
@@ -5,20 +5,15 @@
   *            Use is subject to license terms.
   *
   * @topic Kernel
-  * @subtopic AS2
+  * @subtopic swf9
   */
-
-// Receives mouse events from the runtime
-// Sent from org/openlaszlo/compiler/SWFFile.java
 public class LzScreenKernel {
-    #passthrough (toplevel:true) {  
-    import flash.display.*;
-    import flash.events.*;
-    import flash.utils.*;
+    #passthrough (toplevel:true) {
+    import flash.events.Event;
     }#
 
-    public static var width = null;
-    public static var height = null;
+    public static var width:* = null;
+    public static var height:* = null;
     public static function handleResizeEvent(event:Event = null):void {
         width = LFCApplication.stage.stageWidth;
         height = LFCApplication.stage.stageHeight;
@@ -28,14 +23,14 @@
         }
     }
 
-    static var __callback = null;
-    static var __scope = null;
+    static var __callback:String = null;
+    static var __scope:* = null;
     static var __listeneradded:Boolean = false;
 
     // N.B. The kernel API implementation used by LzCanvas currently
     // requires a call to handleResizeEvent when the callback is
     // set. This is the way that the canvas initial size gets set.
-    public static function setCallback (scope, funcname) {
+    public static function setCallback (scope:*, funcname:String) :void {
         //Debug.write('setCallback', scope, funcname);
         if (__listeneradded == false) {
             __scope = scope;

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzXMLParser.as
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzXMLParser.as	2009-03-12 12:50:08 UTC (rev 13263)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzXMLParser.as	2009-03-12 13:33:36 UTC (rev 13264)
@@ -1,11 +1,11 @@
 /**
-  * LzXMLParser.lzs
+  * LzXMLParser.as
   *
-  * @copyright Copyright 2001-2008 Laszlo Systems, Inc.  All Rights Reserved.
+  * @copyright Copyright 2001-2009 Laszlo Systems, Inc.  All Rights Reserved.
   *            Use is subject to license terms.
   *
   * @topic Kernel
-  * @subtopic AS2
+  * @subtopic swf9
   */
 
 /**

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzXMLTranslator.as
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzXMLTranslator.as	2009-03-12 12:50:08 UTC (rev 13263)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzXMLTranslator.as	2009-03-12 13:33:36 UTC (rev 13264)
@@ -1,11 +1,11 @@
 /**
-  * LzXMLTranslator.lzs
+  * LzXMLTranslator.as
   *
   * @copyright Copyright 2001-2009 Laszlo Systems, Inc.  All Rights Reserved.
   *            Use is subject to license terms.
   *
   * @topic Kernel
-  * @subtopic AS2
+  * @subtopic swf9
   */
 
 /**



More information about the Laszlo-checkins mailing list