[MonoDevelop] trouble showing data in NodeView
Daniel Petersen
samuraidanieru at gmail.com
Tue Mar 17 17:49:13 EDT 2009
Hello,
I'm new to Mono/GTK development, hoping someone can help me:-) I've read
over the NodeView
<http://www.mono-project.com/GtkSharpNodeViewTutorial>tutorial and I
pretty much get how it works. I'm basically following the
same steps as far as I can tell, and other than I'm trying to use a NodeView
that stetic created. the problem is the nodeview is still turning up blank
during runtime so I'm missing something. Here's my code within the
'MainWindow' class:
******
public MainWindow (): base (Gtk.WindowType.Toplevel)
{
Build ();
populateNodeView();
}
private void populateNodeView()
{
NodeStore store = new NodeStore (typeof (MyTreeNode));
store.AddNode(new MyTreeNode ("yomama", "yesterday!"));
store.AddNode(new MyTreeNode ("walk", "like it's the first"));
jobsView = new NodeView (store);
jobsView.AppendColumn ("ID", new CellRendererText(), "text", 0);
jobsView.AppendColumn ("Title", new CellRendererText(), "text", 1);
jobsView.ShowAll();
}
******
...I'm using the 'MyTreeNode' class from the tutorial, and 'jobsView' is the
NodeView created by stetic. I noticed that stetic is instantiating jobsView
with the no arg constructor. I couldn't find any methods to tie it to my
NodeStore other than the constructor, so I'm assuming it's ok to instantiate
a new 'NodeView' object here and pass my NodeStore to it, but maybe this is
where I'm going wrong, I don't know. Any help/insight appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/monodevelop-list/attachments/20090317/28ecdeee/attachment.html
More information about the Monodevelop-list
mailing list