Re: gtk_tree_model_get_iter segfault in on_row_activated
- From: David Nečas (Yeti) <yeti physics muni cz>
- To: gtk-app-devel-list gnome org
- Subject: Re: gtk_tree_model_get_iter segfault in on_row_activated
- Date: Fri, 16 Jun 2006 19:43:36 +0200
On Thu, Jun 15, 2006 at 10:44:57PM +0100, Christopher Backhouse wrote:
I have connected to the row activated signal and want to handle it - so
I am doing this:
void on_row_activated(GtkTreeView* tree_view,GtkTreePath*
path,GtkTreeViewColumn* column,gpointer user_data)
{
std::cout<<"path was "<<gtk_tree_path_to_string(path)<<"\n";
GtkTreeModel* model=gtk_tree_view_get_model(tree_view);
if(model!=NULL)
std::cout<<"got the model OK\n";
else
std::cout<<"failed to get the model\n";
std::cout<<"trying to get the iter\n";
GtkTreeIter* iter;
^^^^^^^^^^^^^^^^^^
where exactly this pointer points to?
if(gtk_tree_model_get_iter(model,iter,path)==TRUE)
You have to do
GtkTreeIter iter;
gtk_tree_model_get_iter(model, &iter, path)...
Yeti
--
Anonyms eat their boogers.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]