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

Re: [pygtk] Does ctree.selection work?



This bit of python works for me.  I've defined a GtkCList in glade
called 'includeList':

l = []
for i in self.includeList.selection:
   l.append(self.includeList.get_text(i, 0))

--- Christian Robottom Reis <kiko@async.com.br> wrote:
> 
> Has anybody successfully used ctree's selection attribute? In my
> case, it
> returns:
> 
> [137051380]
> 
> or another odd list with an int inside it. Is this expected? From my
> view
> of the code:
> 
> for (selection = GTK_CLIST(PyGtk_Get(clist))->selection; selection !=
> NULL;
>        selection = selection->next) {
>     row = GPOINTER_TO_UINT(selection->data);
>     py_int = PyInt_FromLong(row);
> 
> this might be wrong - isn't selection->data a GtkCTreeRow?
> 
> Take care,
> --
> Christian Reis, Senior Engineer, Async Open Source, Brazil.
> http://async.com.br/~kiko/ | [+55 16] 272 3330 | NMFL
> 
> _______________________________________________
> pygtk mailing list   pygtk@daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk


=====
1024D/6CE00097 2001-02-24 David Everly <deckrider@yahoo.com>
Key fingerprint = E587 30C6 167F 9F25 6869  90B9 18F2 E454 6CE0 0097

__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/




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