On 4/21/10 2:54 PM, André Bargull wrote:
Not approved.

1) __LZdeleted is LFC-internal, it must not be used in the components

Should we have a public flag, or make __LZdeleted public?

Otherwise, I can't see how to ignore the setStyle() call in your testcase at LPP-8880:
      c.destroy();
      // setStyle() calls _applystyle() later
      c.setStyle({textcolor: 0});

2) strict equality check to avoid string coercion, re-throw error if e
!=== '__LZdeleted'!
+ } catch(e) {
+ // Construct may, through many tangled webs of replication and
+ // placement, actually end up deleting us! Bail out completely.
+ if (e == '__LZdeleted') {
+ return;
+ }
+ }

Will do.

3) There's an important devnote right before the added
"throw('__LZdeleted');":
// @devnote only add to subnodes if this node is not deleted which
// may happen as a side-effect of calling determinePlacement().
// We still need to set 'immediateparent' because legacy constructors
// expect to see this property.

This shouldn't matter anymore, because the throw() should prevent any super calls from continuing... I'll remove/update the devnote.

On 4/21/2010 11:21 PM, Max Carlson wrote:
Change 20100421-maxcarlson-v by maxcarl...@friendly on 2010-04-21
14:09:52 PDT
in /Users/maxcarlson/openlaszlo/trunk-clean
for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Update basecomponent to not set styles, construct() to
automatically halt for deleted nodes

Bugs Fixed: LPP-8880 - ERROR @lz/textlistitem.lzx?23: TypeError: Error
#1009 in swf10, LPP-8929 - Prevent construction of destroyed LzNode
subclasses

Technical Reviewer: [email protected]
QA Reviewer: ptw

Details: LzNode - Throw an exception when __LZdeleted is true in
LzNode.construct().

LzInputText, LzText, LaszloView - Remove unneeded __LZdeleted test in
construct().

textlistitem - Remove unneeded test.

basecomponent - Don't try to set styles for deleted components.

Tests: See LPP-8880,
examples/components/component_sampler.lzx?debug=true in all runtimes

Files:
M WEB-INF/lps/lfc/core/LzNode.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 lps/components/lz/textlistitem.lzx
M lps/components/base/basecomponent.lzx

Changeset:
http://svn.openlaszlo.org/openlaszlo/patches/20100421-maxcarlson-v.tar


Reply via email to