History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: LPP-5307
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: P0 P0
Assignee: Unassigned
Reporter: P T Withington
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
OpenLaszlo

Our class constructor/initializer don't match JS2

Created: 20/Dec/07 02:10 PM   Updated: 09/Jan/08 01:51 PM
Component/s: Compiler - JavaScript
Affects Version/s: RingDing (4.1)
Fix Version/s: RingDing (4.1)

Time Tracking:
Not Specified

Severity: Minor
Fixed in Change#: 7,702
Runtime: N/A
Fix in hand: True


 Description  « Hide
We write them as an 'initialize' method, but JS2 will use the class name as the distinguished name of the initializer.

(I don't call it the constructor, because it really isn't. The constructor is a hidden function that takes the storage allocated by new and installs the initial values for any instance variables, then it calls the initializer. Sure, the rest of the world calls this the constructor, but it ain't.)

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
P T Withington - 02/Jan/08 12:12 PM
r7702 | ptw | 2008-01-02 15:09:38 -0500 (Wed, 02 Jan 2008) | 26 lines
Changed paths:
   M /openlaszlo/trunk/WEB-INF/lps/lfc/compiler/Class.lzs
   M /openlaszlo/trunk/WEB-INF/lps/lfc/compiler/LzFormatter.lzs
   M /openlaszlo/trunk/WEB-INF/lps/lfc/core/LzDictionary.lzs
   M /openlaszlo/trunk/WEB-INF/lps/lfc/core/LzNode.lzs
   M /openlaszlo/trunk/WEB-INF/lps/lfc/core/UserClass.lzs
   M /openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataAttrBind.lzs
   M /openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataElement.lzs
   M /openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataRequest.lzs
   M /openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataText.lzs
   M /openlaszlo/trunk/WEB-INF/lps/lfc/data/LzParsedPath.lzs
   M /openlaszlo/trunk/WEB-INF/lps/lfc/debugger/LzMemory.lzs
   M /openlaszlo/trunk/WEB-INF/lps/lfc/events/LaszloEvents.lzs
   M /openlaszlo/trunk/WEB-INF/lps/lfc/helpers/LzFont.lzs
   M /openlaszlo/trunk/WEB-INF/lps/lfc/kernel/LzLibraryCleanup.lzs
   M /openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzContextMenu.js
   M /openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzContextMenu.lzs
   M /openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzLibraryLoader.lzs
   M /openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzLoader.lzs
   M /openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzMediaLoader.lzs
   M /openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/dojo/flash6/DojoExternalInterface.as
   M /openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/dojo/flash8/DojoExternalInterface.as
   M /openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/dojo/flash8/ExpressInstall.as
   M /openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzContextMenu.lzs
   M /openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzHTTPLoader.lzs
   M /openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzInputTextSprite.lzs
   M /openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzLibraryLoader.lzs
   M /openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzLoadQueue.lzs
   M /openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzLoader.lzs
   M /openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzMediaLoader.lzs
   M /openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzSoundMC.lzs
   M /openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzSprite.lzs
   M /openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzTextSprite.lzs
   M /openlaszlo/trunk/WEB-INF/lps/lfc/services/LzIdle.lzs
   M /openlaszlo/trunk/WEB-INF/lps/lfc/services/LzInstantiator.lzs
   M /openlaszlo/trunk/WEB-INF/lps/lfc/services/LzTrack.lzs
   M /openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloCanvas.lzs
   M /openlaszlo/trunk/WEB-INF/lps/lfc/views/LzScript.lzs
   M /openlaszlo/trunk/WEB-INF/lps/lfc/views/LzViewLinkage.lzs
   M /openlaszlo/trunk/WEB-INF/lps/server/sc/src/org/openlaszlo/sc/Parser.jjt
   M /openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/sc/CommonGenerator.java

Change 20071220-ptw-4 by ptw@dueling-banjos.local on 2007-12-20 16:36:26 EST
    in /Users/ptw/OpenLaszlo/ringding-2
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Use modern class constructor syntax

Bugs Fixed:
LPP-5307 'Our class constructor/initializer don't match JS2'

Technical Reviewer: dda@ddanderson.com (Message-Id: <347A6E41-4116-4AAE-BF9B-AFCE3377DA78@ddanderson.com>)
QA Reviewer: max@laszlosystems.com (pending)

Details:
    CommonGenerator: Output the initializer as a compiler function
    $lzsc$initizlize. Translate super() calls to calls to
    super.$lzsc$initialize.

    Parser: accept super() calls

    *: Rename initialize methods to the class name, use super() calls
     to invoke the superclass initializer.

Tests:
    smokecheck, sample apps


Mamye Kratt - 09/Jan/08 01:51 PM
(trunk 4 local build r7775)
smokecheck.lzx returns the following in swf7 and swf8
  Tests: 845 Failures: 0 Errors: 0

smokecheck.lzx returns the following in dhtml
  Tests: 836 Failures: 0 Errors: 0

Looked at the following applications in swf and dhtml
Weather
Survey
Contact List
Animation
Image Loading
Music