[wxPython] Problems with wxCheckListBox

Now i get the error:

NameError: global name 'Getint' is not defined

Any help would be appriciated...

Thomas

···

-----Original Message-----
From: Robin Dunn [mailto:robin@alldunn.com]
Sent: den 3 maj 2002 22:14
To: wxpython-users@lists.wxwindows.org
Subject: Re: [wxPython] Problems with wxCheckListBox

First of all i have a gadfly database i.e: [('1','Thomas'), ('0',

'Jacob'),

('1', 'SomethingElse')]

The 1 or 0 is the checkbox value. I fill out the checklistbox with the

code:

import module1
database = module1.database()
def loadchecks(self):
for x in database.LoadValues():
x, y = (x[0], x[1])
self.checkListBox.Check(int(x))
self.checkListBox.Append(y)

Look at the docs for Check again. YOu have to pass the item index to it as
well as the boolean value. Also, it would be kinda hard to check an item
that hasn't been added to the list yet. Try this:

    self.checkListBox.Append(y)
    self.checkListBox.Check(self.checkListBox.GetCount(), Getint(x))

--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwindows.org
http://lists.wxwindows.org/mailman/listinfo/wxpython-users

Now i get the error:

NameError: global name 'Getint' is not defined

Sorry, that was a typo. Just take off the "Get".

···

--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!