I'm trying to get the Entry from a ComboBoxText as I need it to show text which is not in the list, calling setActiveText just sets the Entry to the first item. I tried the following code, but am getting a Seg Fault, on the cast to Entry, what am I doing wrong?

When I look at it with a debugger, widget looks like a valid object. The GTK docs say to use gtkbinget_child which is what the getChild is doing in Bin.d.

Widget widget = cbPath.getChild();
if (widget !is null) {
	Entry entry = cast(Entry) widget;
	entry.setText(dialog.getFilename());
}