Hi All
I am a newbie to Python and Pygtk, so please bear with me if this is the
millionth time you have been asked this.
I have written my first program with Radio buttons and need to
understand how do I pass AND use a a parameter by reference (list called
Company), rather than by value. Is it possible? Basic aim is that the
action effected in the callback routine should be reflected AFTER it
returns which it does not do, the value of Company appears to stay at
what I initially set it to.
Thanks
Peter
The relevent parts of the code are as follows
Callback routine
def callback(win, widget, Company, data):
if (widget.get_active() == True):
Company.insert(0,data)
Creation and connect routines
Company = ['Argent',]
button = GtkRadioButton(None, "Argent")
button.connect("toggled", callback, button, Company, "Argent")
box2.pack_start(button, TRUE, TRUE, 0)
button.set_active(TRUE)
button.show()
button = GtkRadioButton(button, "Ashlyn")
button.connect("toggled", callback, button, Company, "Ashlyn")
box2.pack_start(button, TRUE, TRUE, 0)
button.show()
button = GtkRadioButton(button, "Clearance IT")
button.connect("toggled", callback, button, Company, "Clearance IT")
box2.pack_start(button, TRUE, TRUE, 0)
button.show()
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/