Re: [pygtk] GtkList Problem

2000-10-01 Thread Eric Gillespie, Jr.

On Sun, Oct 01, 2000 at 05:52:28PM +0800,
James Henstridge <[EMAIL PROTECTED]> wrote:
> You must pass a sequence object to append_items.  (item) is the same as
> item.  Maybe you wanted (item,).

Thanks, that worked. So far, every question i've sent to this
list has been some stupid error on my part. Are you ever going to
get tired of me and just ignore my messages?

-- 
Eric Gillespie, Jr. <*> [EMAIL PROTECTED]
Software Developer
Progeny Linux Systems - http://progenylinux.com


 PGP signature


[pygtk] python libglade binding on win32

2000-10-01 Thread x. coolen

As I find pygtk, libglade.py and glade wonderful together on linux, I
would like to use them on win32 platform.
I already install pygtk, glade and libglade dll on win32, but i can't
get the libglade  binding (e.g. import libglade in the python script
doesn't work).
any idea ?

xavier coolen

[EMAIL PROTECTED]


___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk



Re: [pygtk] GtkList Problem

2000-10-01 Thread James Henstridge

On Sun, 1 Oct 2000, Eric Gillespie, Jr. wrote:

> The attached small program causes this error:
> 
> Traceback (innermost last):
>   File "/home/epg/src/test.py", line 12, in ?
> list.append_items((item))

You must pass a sequence object to append_items.  (item) is the same as
item.  Maybe you wanted (item,).

>   File "/usr/lib/python1.5/site-packages/gtk.py", line 1511, in append_items
> items = map(lambda i: i._o, items)
>   File "/usr/lib/python1.5/site-packages/gtk.py", line 75, in __getattr__
> raise AttributeError, attr
> AttributeError: __len__
> 
> It looks like GtkObject.__getattr__ always raises AttributeError
> no matter what. Is there any way around this? I need a list i can
> pack widgets into, so the CList won't work.
> 
> Thanks.

James.

-- 
Email: [EMAIL PROTECTED]
WWW:   http://www.daa.com.au/~james/



___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk



Re: [pygtk] GtkCTreeNode bug in 0.6.6

2000-10-01 Thread James Henstridge

On Sat, 30 Sep 2000, Alexandre Fayolle wrote:

> Hi,
> 
> I'm experiencing incoherent behaviour in pygtk 0.6.6 with GtkCTreeNode
> objects. Depending on where they come from, they do not behave in the same
> fashion. Specifically, it is not possible to access the attributes
> described in description.py from the GtkCTreeNode obtained by
> tree.selection (where tree is a GtkCTree):
>   File "Narval/narval/gui/XmlEditor.py", line 125, in
> add_attribute_activated
> if self.tree.selection.children:
> AttributeError: children

ctree.selection is a list of GtkCTreeNode objects.  Lists do not have
attributes named children.

James.

-- 
Email: [EMAIL PROTECTED]
WWW:   http://www.daa.com.au/~james/



___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk



[pygtk] GtkList Problem

2000-10-01 Thread Eric Gillespie, Jr.

The attached small program causes this error:

Traceback (innermost last):
  File "/home/epg/src/test.py", line 12, in ?
list.append_items((item))
  File "/usr/lib/python1.5/site-packages/gtk.py", line 1511, in append_items
items = map(lambda i: i._o, items)
  File "/usr/lib/python1.5/site-packages/gtk.py", line 75, in __getattr__
raise AttributeError, attr
AttributeError: __len__

It looks like GtkObject.__getattr__ always raises AttributeError
no matter what. Is there any way around this? I need a list i can
pack widgets into, so the CList won't work.

Thanks.

-- 
Eric Gillespie, Jr. <*> [EMAIL PROTECTED]
Software Developer
Progeny Linux Systems - http://progenylinux.com



#!/usr/bin/python

from gtk import *

window = GtkWindow(WINDOW_TOPLEVEL)
list = GtkList()
list.show()
window.add(list)

item = GtkListItem()
item.show()
list.append_items((item))

label = GtkLabel("test")
label.show()
item.add(label)

mainloop()

 PGP signature