[Laszlo-dev] For Review: Change 20071105-jcrowley-a Summary: Find source of basedatacombobox-based components
jcrowley at laszlosystems.com
Mon Nov 5 22:49:15 PST 2007
Change 20071105-jcrowley-a by jcrowley at DoctorManhattan.mshome.net on
2007-11-05 14:07:01 EST
Summary: Find source of basedatacombobox-based components
with selectfirst="false" emits Debugger warnings
Bugs Fixed: LPP-4704 : Find source of basedatacombobox-based
components with selectfirst="false" emits Debugger
Technical Reviewer: henry
QA Reviewer: max
Doc Reviewer: (pending)
Details: This is a workaround for an issue involving
xpathQuery() calls from an oninit handler.
Basedatacombobox kept getting "p is null"
warnings because it was requesting data
before the data was actually there, and because
it doesn't itself have a datapath, but rather
string attributes like "itemdatapath" that it
uses in xpathQuery() calls, I couldn't just
move things from oninit to ondata.
My solution, then, was to add a private
datapointer. The basedatacombobox sets the
datapointer's xpath to the first node of
itemdatapath, so that it's listening for at
least the initial data call. The ondata
handler for this datapointer then makes the
calls to the method that has the various
xpathQuery() calls that had been getting called
The "p is null" errors are expected in
situations where calls like this are made, but
we shouldn't be generating them from our own
I'm not sure if this is the best possible
solution, necessarily, but it fixes the
issues while not seeming to break anything.
Tests: The example attached to the bug. Notice there
are no "p is null" warnings. (You can compare
with an unmodified branch, if you'd like.)
It operates as before, minus the "p is null"
More information about the Laszlo-dev