[Tutor] How to reference a wx.grid.Grid outside the method inwhich it was created?
lauren at protopc.com
lauren at protopc.com
Mon Aug 11 18:26:16 CEST 2008
I have created a wx.grid.Grid attached to a panel which is attached to a
frame within one method (Method #1). Inside this method I also created a
combobox.
When an item is selected in the combobox another method is called (i.e.
When the event is called the method is run
)
Inside this method I want to fill the grid created in Method #1 with data
generated/calculated from within Method #2 based on which item was
selected from the combobox.
How do I reference the grid from method #1 when I am in method #2?
Currently I am receving this error message:
"NameError: global name 'myGrid' is not defined."
It's an error against this statement in method #2:
myGrid.SetCellValue(i, 0, myValue)
Thanks!
Lauren
More information about the Tutor
mailing list