The reason we needed early access to args.text was to measure text before a sprite was attached. Now that .text is assigned earlier, this doesn't appear to be needed! So yes, I believe we can optimize lztext now - I was just plugging some holes so trunk remained functional.

P T Withington wrote:
Actually, I have a question:

Why does LzText have to pull `text` out of args in construct anyways? Why not just wait for it to be set when node runs applyArgs (which is what will happen if text is constrained). In fact, ditto for all the work that LzText#construct is doing. No other subclass of view goes to the trouble of trying to parse args on its own. Is this just a hangover from the trials of swf5 text implementation? Could we simplify the implementation of LzText now?

On 2008-02-19, at 09:18 EST, P T Withington wrote:

Approved, and thanks!

Note André's comment that LzConstraintExpr is a subclass of LzInitExpr, so you only have to test for the latter.

On 2008-02-14, at 22:56 EST, Max Carlson wrote:

Change 20080214-maxcarlson-B by [EMAIL PROTECTED] on 2008-02-14 19:19:09 PST
  in /Users/maxcarlson/openlaszlo/trunk
  for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Fix states and constrained text in DHTML, fix drawview

New Features:

Bugs Fixed: LPP-1587 'ECMA4: Compile LZX declarations as JS declarations' (partial)

Technical Reviewer: promanik
QA Reviewer: ptw
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details: LzTextSprite.js - Don't store args.text from construct.

LzText.lzs - Default to '' in construct() when args.text instanceof LzConstraintExpr || args.text instanceof LzInitExpr

LzState.lzs - More safety checking when unpacking args.

drawview.lzx - Don't use args.height/width/clip to init drawview.

Tests: drawview works again, no warnings under IE when reloading pages. Constrained text works again.

Files:
M      WEB-INF/lps/lfc/kernel/dhtml/LzTextSprite.js
M      WEB-INF/lps/lfc/views/LzText.lzs
M      WEB-INF/lps/lfc/helpers/LzState.lzs
M      lps/components/extensions/drawview.lzx

Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20080214-maxcarlson-B.tar



--
Regards,
Max Carlson
OpenLaszlo.org

Reply via email to