nsTreeBoxObject::GetView needs to improve

RESOLVED WONTFIX

Status

()

RESOLVED WONTFIX
16 years ago
3 years ago

People

(Reporter: bugs, Assigned: janv)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

It's easily possible to create a tree that doesn't work by forgetting a
<treechildren/> (treebody) tag because nsTreeBoxObject::GetView is faulty. 

nsTreeBoxObject::SetView first tries to obtain the tree body, and if it finds
one calls SetView on it. If it fails, it calls SetPropertyAsSupports to set the
"view" property of the box object to be the supplied view. 

when nsTreeBO::GetView is called, it tries to obtain the tree body, and if it
finds one it returns its view. If it fails however the function just returns null.

|GetView| should be modifed to either:

a) call GetPropertyAsSupports for the "view" property to get the view set with
SetView

or

b) assert for null tree body, to at least alert the developer what is going on.

Updated

10 years ago
Component: XP Toolkit/Widgets: Trees → XUL
QA Contact: shrir → xptoolkit.widgets
Status: NEW → RESOLVED
Last Resolved: 3 years ago
OS: Windows XP → Unspecified
Hardware: x86 → Unspecified
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.