Re: Tree Example



On Mon, 2007-01-08 at 10:35 -0600, Nik Ogura wrote:
Could someone post a simple example of using ListStore and or TreeStore?

I'm tearing my hair out.  I can't even get it to accept a call of
Gtk2::ListStore->new(); without it exploding.

you can't create an empty model with no definition of the types it must
hold.

I'm getting better at reading the POD, but apparently not fast enough.

What are they expecting for arguments to new?  It wont take @list,
\ list, (one, two, three).  Docs say 'list of strings', how is it
supposed to be?

mmh, the POD is not really that clear; as always, patches are welcome to
improve the documentation.

in this case, "strings" are "stringified types", like 'Glib::String'.

the call:

  my $model = Gtk2::ListStore->new('Glib::String', 'Glib::String');

will create a list holding two columns of strings.

the C tutorial can be of help:

  http://scentric.net/tutorial/

ciao,
 Emmanuele.

-- 
Emmanuele Bassi,  E: ebassi gmail com
W: http://www.emmanuelebassi.net
B: http://log.emmanuelebassi.net




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