Created attachment 147268 [details] xul tree view selecting a row triggers function usertable_select(), getCellText() fails
Bug 221619 recently changed the interface for getCellText, it now takes a column as the second argument rather than a string, see: http://lxr.mozilla.org/mozilla/source/layout/xul/base/src/tree/public/nsITreeView.idl#155 Changing your code to something like this should work with both the old and the new interfaces: var col = tree.columns ? tree.columns["id"] : "id"; curSel = tree.view.getCellText (tree.currentIndex, col); p.s. I don't know much beyond the basics of XUL so there may be a better way, but this seems to work OK.
I see, the xul API in recent firefox builds is incompatible with the documented version 1.0 one. Before submitting the bug, I searched _all_ of their summaries for "getcelltext" with no meaningful hit; so this bug may at least serve to document that change. I also see, that there is a new property on the tree widget that can be used, by the usual methods of object detection, to write code that supports both the 1.0 API and the forthcoming one.
I'm not sure which resolution to use to close this bug (assuming it should be), José what do you think?
Uff, no clue, since bug 221619 will be available in 1.8a, meaning that Firefox 1.0 will not have this fix.
I still get the error using todays trunk build on Windows XP.
Assignee: firefox → jan
Component: General → XP Toolkit/Widgets: Trees
OS: Linux → All
Product: Firefox → Core
Version: unspecified → Trunk
(In reply to comment #6) > I still get the error using todays trunk build on Windows XP. Do you mean with the testcase? That testcase is still using the old interface so it should error on trunk builds (which use the newer interface) but work on Aviary which I think used the older interface. Or have I misunderstood?
Ah ok, that makes sense, then this bug should be marked as WFM, right?
(In reply to comment #8) > Ah ok, that makes sense, then this bug should be marked as WFM, right? ->WORKSFORME
Status: UNCONFIRMED → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → WORKSFORME
*** Bug 296483 has been marked as a duplicate of this bug. ***
*** Bug 296917 has been marked as a duplicate of this bug. ***
Component: XP Toolkit/Widgets: Trees → XUL
QA Contact: xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.