On Wed, Jul 29, 2009 at 7:17 PM, marcos<marcos...@yahoo.com.br> wrote: > Hello, > > I have several problems with locale. > I set locale ( lua setlocale() and wx wxLocale() ) to PT-BR and it work ok! > But, the locale is reverted to EN-US in the middle of the process. And > causes many problems!!! > > I think it is problem with the garbage collection. > In old versions of wxLua, I did not have problems.
I have to plead ignorance about much of the wxLocale stuff, but from what I can tell you create a loc = wx.wxLocale(wx.wxLANGUAGE_PORTUGUESE_BRAZILIAN) and so long as 'loc' is not GCed that's your locale. I guess the obvious question to ask is if you're making your wx.wxLocale variable local? If so, you either have to put it into some table that won't be garbage collected for the life of the program or just make it global. I can't see any reason why the wxLocale userdata would be treated any differently by Lua's GC than anything else like a wxPoint for example. Regards, John ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ wxlua-users mailing list wxlua-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wxlua-users