Closed Bug 314923 Opened 20 years ago Closed 18 years ago

Firefox 1.5 RC1 draws incorrectly a custom tree view created with nsITreeView

Categories

(Core :: XUL, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: didier.moraine, Assigned: janv)

References

()

Details

Attachments

(2 files)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051025 Firefox/1.5 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051025 Firefox/1.5 No labels are displayed when building a custom tree view created with a nsITreeview. Reproducible: Always Steps to Reproduce: 1. Open the following URL with Firefox 1.5 : http://www.xulplanet.com/tutorials/xulqa/treebview.xul 2. After a few seconds click on the tree 3. Do the same with Firefox 1.0.7 to see the difference
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8) Gecko/20051103 Firefox/1.5 ID:2005110310 Confirmed
hit enter too soon I see: Error: '[JavaScript Error: "this._treeBox.invalidatePrimaryCell is not a function" {file: "http://www.xulplanet.com/tutorials/xulqa/treebview.xul" line: 267}]' when calling method: [nsITreeView::toggleOpenState] Source file: chrome://global/content/bindings/tree.xml Line: 222 and Error: this._treeBox.invalidatePrimaryCell is not a function Source file: http://www.xulplanet.com/tutorials/xulqa/treebview.xul Line: 267 in JSConsole
Solved. The problem was not the previous reported javascript error. (If you comment the lines 266 and 267, you still have the problem without any error in the JS console) The getCellText(aRow, oCol) takes now a nsITreeColumn as second argument. To get the sample working, I changed the line 88. - return this._subtreeItems[index][column]; + return this._subtreeItems[index][column.id]; In other words, column is a wstring in Firefox 1.0.7 and a nsITreeColumn in Firefox 1.5 Compare the idl: http://lxr.mozilla.org/mozilla1.7/source/layout/xul/base/src/tree/public/nsITreeView.idl#165 http://lxr.mozilla.org/seamonkey/source/layout/xul/base/src/tree/public/nsITreeView.idl#166 Of course, when doing this the sample won't work anymore with Firefox 1.0.7 This change was reported on http://www.xulplanet.com/tutorials/xultu/treeview.html
WFM per reporter comment 5
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Resolution: --- → WORKSFORME
Component: XP Toolkit/Widgets: Trees → XUL
QA Contact: xptoolkit.trees → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: