GNOME Bugzilla – Bug 324161
ClassCastException in instantiating a SimpleList
Last modified: 2006-01-09 03:02:34 UTC
Steps to reproduce: 1. Just instantiate a SimpleList. 2. 3. Stack trace: Other information: Because SimpleList extends Widget seems that calling TreeView.getTreeView(getHandle()) results in ClassCastException, because getHandle() returns not the TreeView's handle passed to super but the Handle associated with SimpleList itself. A patch that turn SimpleList to use a static factory method follows.
Created attachment 56021 [details] [review] SimpleList ClassCastException fix. switch SimpleList creation to a static factory method.
Thanks for the report and patch. It turns out that we don't need a new factory method here. Based on your patch, I simply changed the static factory method to be the public constructor and created the TreeView inside a this call. Fixed in CVS HEAD.