Is there any better way of deciding when a datapath is immediate? Other than searching it for ':/'? Oh, I see, these are not datapaths, they are datapath specifications? This stuff makes my head hurt...

On 2007-11-06, at 18:31 EST, André Bargull wrote:

[Note: Modified changeset of "20071105-jcrowley-a"]

Change 20071106-bargull-8 by [EMAIL PROTECTED] on 2007-11-06 21:06:22
in /home/Admin/src/svn/openlaszlo/trunk
for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Find source of basedatacombobox-based components
with selectfirst="false" emits Debugger warnings

New Features:

Bugs Fixed:
LPP-4704 : Find source of basedatacombobox-based
components with selectfirst="false" emits Debugger
warnings

Technical Reviewer: jcrowley
QA Reviewer: max
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details:
Josh said: 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.
---
Workaround: Check for data by querying the itemdatapath and if we don't get any results, install a delegate to listen for the "ondata"- event of the dataset.
---
Josh said: 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 base components.

Other changes:
Check for valid datapointer in "_updateSelectionByIndex",
+ nullpointer-check in the same method
Removed a nondescriptive comment and an unnecessary debug-output.


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.)

Also, run: test/components/base/lzunit-basedatacombobox.lzx
It operates as before, minus the "p is null" warnings.

Files:
M lps/components/base/basedatacombobox.lzx

Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20071106-bargull-8.tar


Reply via email to