Re: GtkTreeView



> > 
> > And I get the data back by doing:
> > 
> > GValue value;
> > memset(&value, 0, sizeof(value));	// not sure about this
> > gtk_tree_model_get_value(model, iter, 2, &value);
> > gpointer user_data = value.data[0].v_pointer;	// is this "right" ?
> > 
> 
> Easier:
> 
>  gpointer data;
>  gtk_tree_model_get (model, iter, 2, &data, NULL);
> 
> Regards,
>                                         Owen

That's neater, but if you don't want it to crash you'll do this:
gtk_tree_model_get(model, iter, 2, &data, -1);

It feels very unnatural finish an arg list with -1...But then
again arg lists feel altogether unnatural to C++ programmers :^)

Dave





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]