Do we need a different protocol here, where you should be allowed to
make a query when 'p is null' and just get back undefined?
Or is it always an error to try to make a query when 'p is null'?
Can we have a better error message, so that a mere mortal might know
what 'p is null' means to them? What they might do to address the
problem?
On 2007-11-07, at 14:30 EST, J Crowley wrote:
Change 20071107-jcrowley-O by [EMAIL PROTECTED] on
2007-11-07 14:20:42 EST
in /Users/jcrowley/src/svn/openlaszlo/trunk-g
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Deferring initstage of a Grid results problems
New Features:
Bugs Fixed: LPP-4116 - Deferring initstage of a Grid results
problems
Technical Reviewer: pbr
QA Reviewer: max
Doc Reviewer:
Documentation:
Release Notes:
Details: The description provided in the bug was
no longer reproducible. I believe someone
at some point added a check to make sure
datapath existed before trying to call
xpathQuery(). However, there was still an
issue with "p is null" showing up, so I
added a check to make sure that didn't
happen.
Tests: Run the following in DHTML and Flash:
<canvas>
<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="Defer Test" width="400" height="150"
name="win1">
<grid id="vscgrid" contentdatapath="multidata:/results/*"
bgcolor0="0x00FF00" bgcolor1="0xFF0000"
width="${immediateparent.width}" height="$
{immediateparent.height}" initstage="defer">
<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="Complete Instantiation">
<method event="onclick">
vscgrid.completeInstantiation();
</method>
</button>
</window>
</canvas>
Click the button. Note that there is no "p is null" error, nor is
there
(as described in the bug) an error about xpathQuery(), and that
the alternating colors work as before.
Files:
M lps/components/base/basegridrow.lzx
Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20071107-jcrowley-O.tar