The App object initializes the toolkit.
Some of it's functionality cannot be used without an app object being created.
Now to your questions:
1. yes, the script ends after the dialog is destroyed.
2. yes, the dialog becomes the application's TopWindow. Try print
app.GetTopWindow() after you create the dialog.
3. upon creation of the Dialog, wx adds it to the application.
Have you programmed in an Event Driven Environment before? Do you have
any GUI code experience?
Peter
···
On Sat, Sep 6, 2008 at 1:00 PM, Aigars Aigars <srad@inbox.lv> wrote:
Good day,
I am learning wxPython from wxPython in action by R.Dunn.
The App object initializes the toolkit.
Some of it’s functionality cannot be used without an app object being created.
Now to your questions:
yes, the script ends after the dialog is destroyed.
yes, the dialog becomes the application’s TopWindow. Try print
app.GetTopWindow() after you create the dialog.
upon creation of the Dialog, wx adds it to the application.
Have you programmed in an Event Driven Environment before? Do you have
any GUI code experience?
Peter
On Sat, Sep 6, 2008 at 1:00 PM, Aigars Aigars <srad@inbox.lv> wrote:
> Good day,
>
> I am learning wxPython from wxPython in action by R.Dunn.
>
> There is used code like this:
>
> import wx
>
> if name == "main":
> app = wx.PySimpleApp()
> dialog = wx.Dialog(None, -1, "Test dialog")
> dialog.ShowModal()
> dialog.Destroy()
>
>
> I am little confused about this code, so there are questions:
>
> Is app instance exited after dialog is Destroyed?
> Does dialog belongs to app?
> How does app knows that dialog belongs to it?
>
>
>
> Thanks,
>
> Aigars
> _______________________________________________
> wxpython-users mailing list
> wxpython-users@lists.wxwidgets.org
> http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
>
>
WxPython in Action is very well written. You should be able to do
fairly complex GUI stuff after you finish it.
Download and look at The Demo. It has tons of live code and a lot of
beginners used it extensively to learn about wxPython.
I still use it to get inspiration for the widgets I haven't used yet.
Since you are coming from Access, maybe you could also take a look at
Dabo (a framework designed to ease working with the databases) http://dabodev.com/wiki/FrontPage
Peter
···
On Sat, Sep 6, 2008 at 3:36 PM, Aigars Aigars <srad@inbox.lv> wrote:
Thank you for your answers.
Have you programmed in an Event Driven Environment before? Do you have
any GUI code experience?
No only MS Access experience. Want to migrate to Python + MySQL.
Have read "Learning Python" by Mark Lutz, now reading Python In Action By
N.Rappin and R.Dunn. Maybe you could advice something for futher reading?
Aigars
Quoting Peter Damoc <pdamoc@gmail.com>:
The App object initializes the toolkit.
Some of it's functionality cannot be used without an app object being
created.
Now to your questions:
1. yes, the script ends after the dialog is destroyed.
2. yes, the dialog becomes the application's TopWindow. Try print
app.GetTopWindow() after you create the dialog.
3. upon creation of the Dialog, wx adds it to the application.
Have you programmed in an Event Driven Environment before? Do you have
any GUI code experience?
Peter
On Sat, Sep 6, 2008 at 1:00 PM, Aigars Aigars <srad@inbox.lv> wrote:
> Good day,
>
> I am learning wxPython from wxPython in action by R.Dunn.
>
> There is used code like this:
>
> import wx
>
> if __name__ == "__main__":
> app = wx.PySimpleApp()
> dialog = wx.Dialog(None, -1, "Test dialog")
> dialog.ShowModal()
> dialog.Destroy()
>
>
> I am little confused about this code, so there are questions:
>
> Is app instance exited after dialog is Destroyed?
> Does dialog belongs to app?
> How does app knows that dialog belongs to it?
>
>
>
> Thanks,
>
> Aigars
> _______________________________________________
> wxpython-users mailing list
> wxpython-users@lists.wxwidgets.org
> http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
>
>
You took the words right out of my mouth. Aigars, I strongly agree with Peter
check out Dabo. Dabo was designed with you in mind. It has very strong GUI
and data integration making it ideal for a access person.
···
On Saturday 06 September 2008 06:01:27 am Peter Damoc wrote:
Hi Aigars,
WxPython in Action is very well written. You should be able to do
fairly complex GUI stuff after you finish it.
Download and look at The Demo. It has tons of live code and a lot of
beginners used it extensively to learn about wxPython.
I still use it to get inspiration for the widgets I haven't used yet.
Learn about code structuring and isolation. GUI code tends to evolve
into complex spaghetti code and if you do not manage it properly, you
will have very hard time maintaining it.
Read about: ModelViewController - wxPyWiki
and ModelViewPresenter - wxPyWiki
Since you are coming from Access, maybe you could also take a look at
Dabo (a framework designed to ease working with the databases) http://dabodev.com/wiki/FrontPage
I believe the current Dabo Running Engine is far behind the current SVN. So I
suggest you use the svn. Just check the site for install instructions and
how to setup SVN on windows along with setup for DAbo.
···
On Saturday 06 September 2008 09:09:01 am raffaello wrote:
The idea is good, but I couldn't find a working URL to download the Windows
installer for Dabo Running Engine. Anybody is willing to help?