Closed
Bug 291797
Opened 20 years ago
Closed 20 years ago
Controls using index() fail
Categories
(Core Graveyard :: XForms, defect)
Core Graveyard
XForms
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: allan, Assigned: allan)
References
()
Details
Attachments
(2 files, 1 obsolete file)
If a controls tries to bind to a node using 'index()' it fails to bind with
these warnings:
WARNING: NS_ENSURE_TRUE(repeatEle) failed, file nsXFormsUtilityService.cpp, line 235
WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file XFormsFunctionCall.cpp,
line 207
WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file PredicateList.cpp, line 99
WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file LocationStep.cpp, line 231
WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file nsXPathExpression.cpp,
line 122
I think it is because we start evaluating the expression to soon. If you use
output @value, then it works, but it is also evaluated quite late. I haven't
investigated it further,,,
| Assignee | ||
Comment 1•20 years ago
|
||
| Assignee | ||
Comment 2•20 years ago
|
||
Problem was the above. Controls using index() was refering to non-existant
document elements, when they were bound during initialization. I've changed
rebuild, etc. to not bind/refresh controls on initialization, and let
InitializeControls handle both bind and refresh. (This also saves an unneeded
refresh during initialization).
The patch depends on (bug 289534), and also include a leak-fix in
nsXFormsModelElement::Rebuild(): oldFormList was never deleted.
| Assignee | ||
Updated•20 years ago
|
Attachment #181865 -
Flags: review?(smaug)
Comment 3•20 years ago
|
||
With this patch the test case doesn't seem to work:
I see the following:
bind nodeset='value[index('repeat_id')]' =
initially it should be == bind nodeset='value[1]' = 1
ref='value[index('repeat_id')]' =
initially it should be == ref='value[1]' = 1
| Assignee | ||
Comment 4•20 years ago
|
||
(In reply to comment #3)
> With this patch the test case doesn't seem to work:
> I see the following:
>
> bind nodeset='value[index('repeat_id')]' =
> initially it should be == bind nodeset='value[1]' = 1
>
> ref='value[index('repeat_id')]' =
> initially it should be == ref='value[1]' = 1
It's because I'm quite stupid, and has uploaded a testcase with errors in :(
Status: NEW → ASSIGNED
| Assignee | ||
Comment 5•20 years ago
|
||
Argh, I had used 'repeatid' instead of 'repeat_id' in a couple of places in the
other testcase.
Attachment #181767 -
Attachment is obsolete: true
Updated•20 years ago
|
Attachment #181865 -
Flags: review?(smaug) → review+
| Assignee | ||
Updated•20 years ago
|
Attachment #181865 -
Flags: review?(doronr)
Comment 6•20 years ago
|
||
Comment on attachment 181865 [details] [diff] [review]
Patch
r=me
Attachment #181865 -
Flags: review?(doronr) → review+
| Assignee | ||
Comment 7•20 years ago
|
||
Checked in.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Updated•9 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•