Re: wxGlade tutorial

Dietmar Schwertberger <[email protected]>
Newsgroups gmane.comp.python.wxglade
Message-ID <[email protected]>
Hi Peter!

On 11/13/2017 11:56 PM, Peter Bradley wrote:
>
> I have been trying to follow the wxGlade tutorial.  With some 
> difficulty I got some generated code that looked as though it would be 
> OK, but when I tried to run it, I got the following error from Python3:
>

> NameError: name '_' is not defined
>
Please deactivate Application -> Properties -> "Enable gettext support".
Then, there should be no translation calls _("...") for all the strings 
any more.
I will make this the default with the next update. If anyone doesn't 
know about gettext, then he/she probably doesn't need or want it anyway.


The application code that was generated by wxGlade should have included 
gettext support, though, which would have replaced the underscore with 
the appropriate function call:

*import gettext*
....

if __name__ == "__main__":
*gettext.install("app")* # replace with the appropriate catalog name

     app = MyApp(0)
     app.MainLoop()


I'm still working on the documentation. Please continue to report the 
issues that you observe. I'm very interested in having a smooth user 
experience for people who are new to wxGlade and / or wxPython.

The crashes that you observed: please report the traceback and / or 
describe how to reproduce it.
If there's a Python traceback, then there's a problem in the program 
logic. That should be easy to fix.
If it's a hard crash, then it's probably a bit more difficult to track 
down and fix.


Regards,

Dietmar

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

_______________________________________________
wxGlade-general mailing list
wxGlade-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/wxglade-general
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.