[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] Testing for button in a table in OcempGUI
- To: pygame-users@xxxxxxxx
- Subject: [pygame] Testing for button in a table in OcempGUI
- From: Johan Geldenhuys <johan@xxxxxxxxxxxxxxx>
- Date: Thu, 29 Dec 2005 18:01:51 +0200
- Delivered-to: archiver@seul.org
- Delivered-to: pygame-users-outgoing@seul.org
- Delivered-to: pygame-users@seul.org
- Delivery-date: Thu, 29 Dec 2005 11:01:58 -0500
- Organization: AccessTel
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
- User-agent: Mozilla Thunderbird 1.0.6 (X11/20050716)
Hi all,
I have a Table(15, 15).
In this table I put specific buttons at random positions and at the rest
of the positions I want to put random letters.
The way I do it now is to put my specific buttons in first and then the
random ones.
The problem is that when I get to a position in the table where a
specific buttons is in, my script stop: "Exception: Cell (7, 13) already
occupied". I understand this, but how do I test for a position in a
table and go on to the next available position? Is there a
'table.have_child()' or something else I can test it with?
Thanks,
Johan