[wxpython-users] Re: [newbie] Connection between app and frame?

Raffaello Barella barbarossa.platz at gmail.com
Thu Apr 3 09:19:51 PDT 2008


This argument seems mere 'lana caprina'.
 Whatever the name  we limited human beings give to an object (frame or
anything else), any programming language assigns to it at the first
occurrence an unique number (usually an integer or a long) and thereinafter
always refers to it by that number. Try using GetId() at the first
occurrence of your frame, then change its name with SetName() and use again
GetI(): the result will be the same.
By the way, wx.Object who is the base class of wx.Window and wx.Frame, but
is not normally used directly by us laymen, does NOT have an attribute
SetName().

2008/4/3, Peter Damoc <pdamoc at gmail.com>:
>
> When you create a the first wx.Frame, this frame becomes the TopWindow.
> You can get this frame using app.GetTopWindow()
>
> Peter
>
> On Thu, Apr 3, 2008 at 5:55 PM, Gilles <gilles.ganault at free.fr> wrote:
>
> > On Thu, 3 Apr 2008 07:09:42 +0200, "Raffaello Barella"
> > <barbarossa.platz at gmail.com> wrote:
> > >>> if __name__ =3D=3D '__main__':
> > >         app =3D wx.PySimpleApp()
> > >         frame =3D StaticTextFrame()
> > >         frame.Show()
> > >         app.MainLoop()
> > >
> > >The connection is in MainLoop().
> >
> > But since I can call the frame class and instance whatever I like, how
> > does app knows about frame?
> >
> > _______________________________________________
> > wxpython-users mailing list
> > wxpython-users at lists.wxwidgets.org
> > http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
> >
>
>
>
> --
> There is NO FATE, we are the creators.
> _______________________________________________
> wxpython-users mailing list
> wxpython-users at lists.wxwidgets.org
> http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/200804=
03/f89ebd6e/attachment.htm


More information about the wxpython-users mailing list