pass parameter in 2-phase creation?

Robin Dunn wrote:

Stuart McGraw wrote:

Hello all,
I am using a custom Grid subclass with a layout
done with XRCed and thus using a 2-step creation.
like in the code below. I would like to pass a value
that is known in MainFrame.__init__(), for example
'tablename' in the code below, to MyGrid.__init__().
Is there any way to do that cleanly? (I am using
global variables now but that is rather, err, ugly.)

Probably the easiest thing is to just delay that part of the
initialization until after everything is created, and give your grid
class a method that you can call to pass it the tablename and whatever
else it will need. Then after the panel has been loaded get a reference
to the grid using XRCCTRL and then call that method.

OK. I had a faint hope there was some undocumented way
of passing parameters through the XRC subclassing process
but it seems not. Thanks (again) for your help!