[Laszlo-dev] For Review: Change 20071102-ptw-t Summary: Uses 'plists' rather than Object's to pass instance attributes

André Bargull a.bargull at intensis.de
Mon Nov 5 15:33:51 PST 2007


Approved!
 
comments:
1) you may want to assign someone else for reviewing the changes in 
"CommonGenerator.java", because I haven't got any experience of the 
OL-Server
2) you missed these files for updating DeclareEvent(..) to LzDeclaredEvent.
    trunk/lps/components/extensions/drawview.lzx
    trunk/lps/components/utils/replicator/replicator.lzx
    trunk/lps/components/utils/traits/cssable.lzx
3) some notes on Class.lzs:
    a) do you really want to pop all name-value pairs from the 
static-/instanceProperties arrays? What if someone needs to reuse these 
plists?
    b) this.instanceProperties.push(name);
        this.instanceProperties.push(value);
        => just for brevity: this.instanceProperties.push(name, value);
4) toString for user-classes does not work, but this is not related to 
this changeset.
    (all toString-methods for user-classes get installed on 
"_instanceAttrs", do we have got a JIRA for this?)
5) I guess it's not that important if "toString" et. al. are skipped in 
"Instance.validateClassStructure(..)" for IE, is it?

On 11/5/2007 12:05 AM, P T Withington wrote:
> Change 20071102-ptw-t by ptw at dueling-banjos.local on 2007-11-02 
> 22:24:07 EDT
>     in /Users/ptw/OpenLaszlo/ringding-2
>     for http://svn.openlaszlo.org/openlaszlo/trunk
>
> Summary: Uses 'plists' rather than Object's to pass instance attributes
>     to Class.make
>
> Bugs Fixed:
> LPP-4997 'DHTML: text.format() doesn't work unless debugging enabled.'
>
> Technical Reviewer: a.bargull at intensis.de (pending)
> QA Reviewer: philip at pbrdev.com (pending)
>
> Details:
>     Using Object's as hashes is fraught with danger because our
>     favorite browser has quirks in how it enumerates the properties of
>     an object; hence replace all uses of Object/hash in the Class
>     framework with a 'plist' (i.e., a property list, i.e., an array of
>     alternating key/value entries).
>
>     lztest-class-impl, UserClass: Use new protocol.
>
>     LzLoader, LzMediaLoader, LzContextMenuItem, LzLibrary,
>     LzContextMenu, LzKeys, LzHistory, LzGlobalMouse, LzFocus, LzNode,
>     LzInputText, LzText, LaszloView, LaszloCanvas, LzCommand, LzState,
>     LzAnimatorGroup, LzReplicationManager, LzDatapointer, LzDataText,
>     LzDataNode, LzDataRequest, LzDataElement, LzDataset, LzDatapath,
>     Replace all calls to DeclareEvent with instance var declaration
>     with LzDeclaredEvent initial value.  (We want this anyways so we
>     don't have to munge class prototypes at runtime, but it is needed
>     in this change because Mixin's no longer store their instance
>     properties on a psuedo-prototype object.)
>
>     LzDefs: remove DeclareEvent(s).
>
>     LzFormatter: Make the bootstrap LzMessage class more like the real
>     class.  Fix some type-ohs.
>
>     Class, CommonGenerator: replace hashes with plists.
>
>     Class: remove obsolete 'make' and passThrough's.
>
> Tests:
>     Test case from bug passes (in IE6)
>
>     smokecheck, lztest
>
> Files:
> M      test/lztest/lztest-class-impl.lzx
> M      WEB-INF/lps/lfc/kernel/swf/LzLoader.lzs
> M      WEB-INF/lps/lfc/kernel/swf/LzMediaLoader.lzs
> M      WEB-INF/lps/lfc/kernel/swf/LzContextMenu.lzs
> M      WEB-INF/lps/lfc/kernel/dhtml/LzLibrary.js
> M      WEB-INF/lps/lfc/kernel/dhtml/LzContextMenu.js
> M      WEB-INF/lps/lfc/services/platform/swf/LzKeys.as
> M      WEB-INF/lps/lfc/services/platform/swf/LzHistory.as
> M      WEB-INF/lps/lfc/services/platform/dhtml/LzHistory.js
> M      WEB-INF/lps/lfc/services/platform/dhtml/LzKeys.js
> M      WEB-INF/lps/lfc/services/LzGlobalMouse.lzs
> M      WEB-INF/lps/lfc/services/LzIdle.lzs
> M      WEB-INF/lps/lfc/services/LzFocus.lzs
> M      WEB-INF/lps/lfc/services/LzModeManager.lzs
> M      WEB-INF/lps/lfc/core/LzNode.lzs
> M      WEB-INF/lps/lfc/core/UserClass.lzs
> M      WEB-INF/lps/lfc/core/LzDefs.lzs
> M      WEB-INF/lps/lfc/views/LzInputText.lzs
> M      WEB-INF/lps/lfc/views/LzText.lzs
> M      WEB-INF/lps/lfc/views/LaszloView.lzs
> M      WEB-INF/lps/lfc/views/LaszloCanvas.lzs
> M      WEB-INF/lps/lfc/helpers/LzCommand.lzs
> M      WEB-INF/lps/lfc/helpers/LzState.lzs
> M      WEB-INF/lps/lfc/controllers/LzAnimatorGroup.lzs
> M      WEB-INF/lps/lfc/data/LzReplicationManager.lzs
> M      WEB-INF/lps/lfc/data/LzDatapointer.lzs
> M      WEB-INF/lps/lfc/data/LzDataText.lzs
> M      WEB-INF/lps/lfc/data/LzDataNode.lzs
> M      WEB-INF/lps/lfc/data/LzDataRequest.lzs
> M      WEB-INF/lps/lfc/data/LzDataElement.lzs
> M      WEB-INF/lps/lfc/data/LzDataset.lzs
> M      WEB-INF/lps/lfc/data/LzDatapath.lzs
> M      WEB-INF/lps/lfc/compiler/LzFormatter.lzs
> M      WEB-INF/lps/lfc/compiler/Class.lzs
> M      WEB-INF/lps/server/src/org/openlaszlo/sc/CommonGenerator.java
>
> Changeset: 
> http://svn.openlaszlo.org/openlaszlo/patches/20071102-ptw-t.tar
>


More information about the Laszlo-dev mailing list