[Laszlo-dev] [BULK] Re: UPDATED: For Review: Change 20071011-jcrowley-2 Summary: Various contributor bug fixes, from Andre Bargull (3) and Ludovic Gasc (1)
André Bargull
a.bargull at intensis.de
Wed Oct 17 13:50:51 PDT 2007
Approved!
J Crowley wrote:
> Change 20071011-jcrowley-2 by jcrowley at doctormanhattan.mshome.net on
> 2007-10-11 00:30:04 EDT
> in /Users/jcrowley/src/svn/openlaszlo/trunk-c
> for http://svn.openlaszlo.org/openlaszlo/trunk
>
> Summary: Various contributor bug fixes, from Andre Bargull (3) and
> Ludovic Gasc (1)
>
> New Features:
>
> Bugs Fixed: LPP-4319 - "basegrid#makeCellsAndColumns()" may ignore
> "shownitems"
> LPP-4318 - "basegrid#getNumItems()" returns wrong value
> LPP-4317 - no setter for "contentdatapath" in basegrid
> LPP-4296 - [patch] add showvscroll attribute for the grid class
>
> Technical Reviewer: pbr
> QA Reviewer: andre
> Doc Reviewer:
>
> Documentation:
>
> Release Notes:
>
> Details: Applied fixes provided by Andre Bargull (LPP-4319, LPP-4318,
> LPP-4317) and
> Ludovic Gasc (LPP-4296).
>
> UPDATE: At Phil's recommendation, I fixed getNumItems() in
> datalistselector.lzx
> instead of in basegrid.lzx. (See: LPP-4318)
>
> UPDATE 2: At Andre's recommendation, I revised getNumItems() in
> datalistselector.lzx to only return 1 if the subview has data, and
> 0 if
> the subview doesn't.
>
> This change adds public method setContentdatapath() to basegrid
> (LPP-4317)
> and public attribute showvscroll to grid (LPP-4296).
>
> Tests: <canvas>
> <dataset name="singledata">
> <results>
> <info first="Bill" last="Henders" phone="1-888-888-8888"/>
> </results>
> </dataset>
>
> <dataset name="multidata">
> <results>
> <info first="Bill" last="Henders" phone="1-888-888-8888"
> hat="no"/>
> <info first="Joan" last="Liszt" phone="1-888-877-8778"
> hat="no"/>
> <info first="Michael" last="Banyon" phone="1-777-778-7788"
> hat="yes"/>
> <info first="Sylvia" last="Conners" phone="1-877-878-8877"
> hat="no"/>
> <info first="Josef" last="Regnola" phone="1-887-778-8787"
> hat="no"/>
> <info first="Olivia" last="Estaban" phone="1-778-778-7788"
> hat="yes"/>
> </results>
> </dataset>
>
> <window title="Single Row / Set Content Datapath" width="400"
> height="150" name="win1">
> <grid id="sgrid" contentdatapath="singledata:/results/info[1]"
> width="${parent.width}" height="${parent.height}">
> <gridtext editable="false" textalign="center"
> datapath="@first">
> First
> </gridtext>
> <gridtext editable="false" textalign="center"
> datapath="@last">
> Last
> </gridtext>
> </grid>
> </window>
> <window title="Vertical Scroll Test" width="400" height="150" y="150"
> name="win2">
> <grid id="vscgrid" contentdatapath="multidata:/results/*"
> showvscroll="false"
> width="${immediateparent.width}"
> height="${immediateparent.height}">
> <gridtext editable="false" textalign="center"
> datapath="@first">
> First Name
> </gridtext>
> <gridtext editable="false" textalign="center"
> datapath="@last">
> Last Name
> </gridtext>
> <gridtext editable="false" textalign="center"
> datapath="@phone">
> Phone Number
> </gridtext>
> <gridtext editable="false" textalign="center"
> datapath="@hat">
> Wears Hat
> </gridtext>
> </grid>
> </window>
>
> <window title="poke" layout="axis:'y'" x="${win1.width+10}">
> <button text="getNumItems">
> <method event="onclick">
> Debug.write(sgrid.getNumItems());
> </method>
> </button>
> <button text="setContentdatapath">
> <method event="onclick">
> // LPP-4317
> Debug.write('bef:', sgrid.contentdatapath);
> sgrid.setContentdatapath('multidata:/results/*');
> Debug.write('aft:', sgrid.contentdatapath);
> </method>
> </button>
> <button text="Toggle W2 Vert Scroll">
> <method event="onclick">
> vscgrid.setAttribute('showvscroll',
> !vscgrid.showvscroll);
> </method>
> </button>
> <button text="Toggle W2 Horiz Scroll">
> <method event="onclick">
> vscgrid.setAttribute('showhscroll',
> !vscgrid.showhscroll);
> </method>
> </button>
> </window>
>
> </canvas>
>
> getNumItems should now return 1 instead of 0 on a single row of data.
> setContentdatapath should set the datapath from the first dataset to
> the second one.
> After using setContentdatapath, getNumItems should return the appropriate
> count for the new number of items.
> You should be able to toggle scrollbars in the vertical direction, now,
> as well, instead of just horizontal.
>
> Files:
> M lps/components/lz/grid.lzx
> M lps/components/base/datalistselector.lzx
> M lps/components/base/basegrid.lzx
>
> Changeset:
> http://svn.openlaszlo.org/openlaszlo/patches/20071011-jcrowley-2.tar
>
More information about the Laszlo-dev
mailing list