[Laszlo-dev] [UPDATED^4] For Review: Change 20090130-ptw-t Summary: Implement LFC end of kernel scrolling API
P T Withington
ptw at pobox.com
Wed Feb 4 01:38:51 PST 2009
On 2009-02-04, at 03:39EST, Max Carlson wrote:
> Not approved. It's not correct. Change
> LzText.updateLineAttribute() as follows - you'll see it blow up all
> over the place - the sprite and view values don't match at all:
>
> function updateLineAttribute(name:String, value):void {
> var tsprite:LzTextSprite = this.tsprite;
> var lineNo:Number;
> if (this.capabilities.linescrolling) {
> lineNo = tsprite.pixelToLineNo(value);
> } else {
> lineNo = Math.floor(value / this.lineheight) + 1;
> }
> this.updateAttribute(name, lineNo);
> // compare sprite and view values
> if (this[name] != this.sprite[name]) {
> Debug.warn(name + ' != sprite.' + name, this[name],
> this.sprite[name], this);
> }
> }
>
> I'm going to send out my fixed change (where they do match) and we
> can adjust the semantics of scrollHeight afterwards.
Why can't we do both?
> Oh wait - I see you checked this in already... grumble...
Henry made me do it!
> P T Withington wrote:
>> [UPDATED^4: This incorporates Max's changes, with some tweaks by
>> me. The basic difference from Max's version is that per the
>> documentation he found, scroll and scrollmax are the line number of
>> the _top_ line visible in the (clipped) field -- scrollmax
>> _does_not_ include the height of the field (whereas scrollHeight
>> does).
>> I updated scrolledittext to use the modern API's and the tests that
>> Max updated seem to pass in swf8 and swf9. DHTML is not working
>> (yet).
>> If the reviewers can agree that we have enough working, I'd like to
>> check this in before it gets any more unweildy.]
>> Change 20090130-ptw-t by ptw at dueling-banjos.home on 2009-01-30
>> 18:08:40 EST
>> in /Users/ptw/OpenLaszlo/trunk-4
>> for http://svn.openlaszlo.org/openlaszlo/trunk
>> Summary: Implement LFC end of kernel scrolling API
>> Bugs Fixed: LPP-6580 scrolledittext doesn't work in 4.1 (partial)
>> Technical Reviewer: max (pending)
>> QA Reviewer: hminsky (pending)
>> Details:
>> LzSprite.*, LaszloView, LaszloCanvas: Add linescrolling
>> capability, unify capabilities as a sprite instance var.
>> swf/LzTextSprite.as: Turn on warnUndefinedReferences so we can
>> debug this. Stop making all sorts of undefined references.
>> Actually compute `lineheight`. Use that to implement the
>> pixel/line kernel API. Convert __updatefieldsize to use the new
>> scrollevent kernel API.
>> swf9/LzTextSprite: Add primitive version of setX/YScroll
>> LzInputText: Set tsprite in __makeSprite
>> LzText: Implement new kernel scrolling API. Cache tsprite for
>> efficiency.
>> newcontent, basescrollbar: Silence warnings.
>> scrolledittext: Use new API's
>> test/*: Max's improved tests
>> Tests:
>> Compiles in swf9, smokecheck in 3 runtimes, component debugger in
>> swf8/9, component sampler in 3 runtimes.
>> Files:
>> M WEB-INF/lps/lfc/kernel/swf/LzTextSprite.as
>> M WEB-INF/lps/lfc/kernel/swf/LzSprite.as
>> M WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
>> M WEB-INF/lps/lfc/kernel/dhtml/LzTextSprite.js
>> M WEB-INF/lps/lfc/kernel/swf9/LzTextSprite.as
>> M WEB-INF/lps/lfc/kernel/swf9/LzInputTextSprite.as
>> M WEB-INF/lps/lfc/kernel/swf9/LzSprite.as
>> 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 lps/components/debugger/newcontent.lzx
>> M lps/components/incubator/scrolledittext.lzx
>> M lps/components/incubator/test/newvscrollbar-test.lzx
>> M lps/components/incubator/test/scrolledittext-test.lzx
>> M lps/components/base/basescrollbar.lzx
>> Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20090130-ptw-t.tar
>
> --
> Regards,
> Max Carlson
> OpenLaszlo.org
More information about the Laszlo-dev
mailing list