Jim,
This method is called by a delegate that tracks the visibility of the
scrollbar. The text area's width is constrained to a factor of this
width as well as the border property of the scrolledittext.
The constraint was already named vscrollwidth, so we just wired up the
new 'instantiated' delegate to it to replace the broken declarative
constraint.
thoughts?
MG
On Tue, Jun 20, 2006 at 8:30 AM, Jim Grandy wrote:
> Possibly reading this out of context, it's strange given our setter
> naming conventions that the argument to a function named
> "setvscrollwidth" should be "v" for "visible" rather than "v" for
> "vscrollwidth". Might you consider renaming this function?
>
> jim
>
> On Jun 19, 2006, at 9:53 PM, Michael Gregor wrote:
>
>> v is for visible.
>>
>> the latter method of eval still stands though...
>>
>> so
>>
>>
>> this.setAttribute("vscrollwidth", (v ? this._vs.width : 0));
>>
>>
>> no?
>>
>> ________________________
>> MG
>> 415 577 9184
>>
>>
>>
>> From: Philip Romanik To: [EMAIL PROTECTED]
>> CC: [email protected]
>> Subject: Code Review: (LPP-2181) incubator component
>> scrolledittext.lzx
>> Date: Mon, 19 Jun 2006 22:40:52 -0400
>>
>> Code Review of scrolledittext.lzx
>>
>>
>> 1. A piece of debugging code crept into the code (tstDbg in this
>> case)
>>>
>>
>> 2. The event function is mixing variables. Both v and this._vs refer
>> to the
>> same variable, and they should not be used in the same method. For
>> example:
>>
>> Original:
>>
>>
>> if(v){
>> this.setAttribute( "vscrollwidth", this._vs.width);
>> }else{
>> this.setAttribute( "vscrollwidth", 0);
>> }
>>
>>
>>
>> Consistent (and streamlined) version:
>>
>>
>> this.setAttribute("vscrollwidth", (this._vs ? this._vs.width :
>> 0));
>>>
>>
>> _______________________________________________
>> Laszlo-dev mailing list
>> [email protected]
>> http://www.openlaszlo.org/mailman/listinfo/laszlo-dev
>
> _______________________________________________
> Laszlo-dev mailing list
> [email protected]
> http://www.openlaszlo.org/mailman/listinfo/laszlo-dev
_______________________________________________
Laszlo-dev mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev