GtkD: Best way to get TreeStore out of TreeView.Model

Mike Wey mike-wey at example.com
Thu Jun 20 10:45:15 PDT 2013


On 06/20/2013 07:53 AM, Alex Horvat wrote:
>>
>> I seem to have missed a few cases in the last commit, would you mind
>> trying again?
>>
>> https://github.com/gtkd-developers/GtkD/commit/7e95380bbb4f569c95fc9435711e1f2ec73122fe
>>
>
> Sorry, no changes - still getting the same errors as before.

Does this code run successfully for you?

----
import gtk.Main;
import gtk.TreeStore;
import gtk.TreeView;

void main(string[] args)
{
	Main.init(args);

	TreeStore ts = new TreeStore([GType.STRING, GType.STRING]);
	TreeView tv = new TreeView();

	tv.setModel(ts);

	TreeStore store = cast(TreeStore)tv.getModel();

	assert(store !is null);
	store.getNColumns();
}
----

-- 
Mike Wey


More information about the Digitalmars-d-learn mailing list