Re: GtkTreeView
- From: David Bryant <daveb acres com au>
- To: Owen Taylor <otaylor redhat com>
- Cc: Charlie Schmidt <ishamael themes org>, gtk-list gnome org
- Subject: Re: GtkTreeView
- Date: 13 Aug 2001 12:45:40 +0930
> >
> > 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]