GNOME Bugzilla – Bug 325837
Nullable parameters not handled correctly in TreeView and ListStore.
Last modified: 2006-01-09 02:43:43 UTC
Please describe the problem: In the doc for this method (TreeView.setCursor) is said @param focusColumn A TreeViewColumn, or NULL in order to not start editing the row you must supply the third param false and you can pass for column null. But in the source I saw gtk_tree_view_set_cursor(getHandle(), path.getHandle(), focusColumn.getHandle(), startEditing); And if you pass NULL for focusColumn it will always throw NullPointerException Steps to reproduce: 1. create TreeView 2. pass null to TreeView.setCursor as second param 3. Actual results: NullPointerException Expected results: to be focused on the appropriate row. Does this happen every time? yes Other information:
It seems that this problem is also prevalent in various other places within TreeView.java with moveColumn(TreeViewColumn, TreeViewColumn), setExpanderColumn(TreeViewColumn), scrollToCell(TreePath), setModel(TreeModel), and the other setCursor(TreePath, TreeViewColumn, CellRenderer, boolean) method. There are similar problems with ListStore's insertRowBefore(TreeIter) and insertRowAfter(TreeIter) methods.
Updating summary to better reflect the problem, considering comment #1.
Thanks for reporting this. A fix has been applied to CVS HEAD. I've also updated the summary once again to mention ListStore. :)