SetLocale problem in wx

BlitzMax Forums/Brucey's Modules/SetLocale problem in wx

Henri(Posted 2014) [#1]
I get this error message;


It appears in this line;
toolbar3_1.AddTool(userID_REPORT, "Hae", wxBitmap.CreateFromFile("graphics/open.png", wxBITMAP_TYPE_PNG), wxNullBitmap, wxITEM_NORMAL, "Raportti", "")


I have commented out the import wx.wxLocale line , but this makes no difference.
Hmmm...

-Henri


Henri(Posted 2014) [#2]
I have a portion of code which uses bah.odbc to get information from Oracle database. If I execute that code after I have initialized everything then the error goes away. This is something I can live with, but curious though.

-Henri


Henri(Posted 2014) [#3]
Okey, found a real solution. You have to init locale to something like;
Import wx.wxLocale
'------------------
Local locale:wxlocale = New wxlocale.Create()
locale.init(wxLANGUAGE_ENGLISH, wxLOCALE_LOAD_DEFAULT)

If Not locale.GetLocale() Then Notify "Error: Could not init locale!"

I'm not sure, but locale might influence the way printf-function works (comma vs. colon)

-Henri