Problem with gtk_tree_store_new



Hi,

        Just a warning:  I'm pretty much a newbie to gtk+, so be prepared. 
        Anyway, I'm having problems using gtk_tree_store_new.  For some reason,
when I call it, my program seg faults.  Here is the relevant code
(pretty much ripped off from the tree store demo in gtk-demo):



/* columns  */
enum
  {
    UNIT_COLUMN = 0,
    POINT_COLUMN,
    
    CAV_COLUMN,
    NUM_COLUMNS 
  };

....
....

  GtkTreeStore *model;
  GtkTreeIter iter;

  
  model =  gtk_tree_store_new(NUM_COLUMNS,
                              G_TYPE_STRING,
                              G_TYPE_STRING,
                              G_TYPE_POINTER
                              ); 



        I'm probably doing something really stupid, but, for the life of me, I
can't figure it out.  Is there anything else that I should be doing
before calling gtk_tree_store_new?  I tried passing in different
arguments (a different number of columns and different G_TYPES), but it
still seg faults.  I even tried calling gtk_tree_store_newv, but same
result.  Any suggestions?  
        I'm using gtk+ 2.0 on debian unstable, if it matters.  

Thanks,
Jonathan 




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