Fredrik Lundh, TerÃa 21 Dezembro 2004 16:33, wrote:
> well, in my applications, subsystems usually consists of one or more
> classes, or at least
> one or more functions. code that needs the global context usually gets
> the content either as a constructor argument, or as an argument to
> individ
Jorge Luiz Godoy Filho wrote:
> > or a single "application context class" instance, which is passed to
> > various parts of the system as necessary.
>
> Wouldn't that cause a chicken & egg problem? How, then, would one pass such
> an instance across modules?
well, in my applications, subsystems
Fredrik Lundh, TerÃa 21 Dezembro 2004 14:02, wrote:
> or a single "application context class" instance, which is passed to
> various parts of the system as necessary.
Wouldn't that cause a chicken & egg problem? How, then, would one pass such
an instance across modules?
I'm sorry for my ignoran
Jorge Luiz Godoy Filho wrote:
>> An even better approach might be to find a way to avoid
>> having to access the main window through a global, but
>> I'll have to leave this up to you, as it may depend on
>> your program structure.
>
> This might be a problem also to share a database connection, w
Peter Hansen, Segunda 20 Dezembro 2004 08:01, wrote:
> An even better approach might be to find a way to avoid
> having to access the main window through a global, but
> I'll have to leave this up to you, as it may depend on
> your program structure.
This might be a problem also to share a databa
Martin Drautzburg wrote:
My wxPython program starts execution in mainFrame.py like this
[...]
class MainApp(wxApp):
def OnInit(self):
self.mainFrame = MainFrame(None)
self.mainFrame.Show()
self.S
I also struggled with this until I looked into many
of the wxWindows examples. They all tend to pass in
the parent to each subsequent layer of classes so that
they can easily refer backwards in the hierarchy.
Example
In your code you will find that inside of SetTopWindow
you have parent as the fir
Martin Drautzburg wrote:
My wxPython program starts execution in mainFrame.py like this
def main():
global application
application=MainApp(0)
application.MainLoop()
I need to access the "application" object from other modules, actually
the win
Martin Drautzburg wrote:
> My wxPython program starts execution in mainFrame.py like this
>[...]
>class MainApp(wxApp):
>def OnInit(self):
>self.mainFrame = MainFrame(None)
>self.mainFrame.Show()
>