<[EMAIL PROTECTED]>> Still the combination: my exe ; a sqlite3 module loaded, and a relatively
> big table with strings or similar will gives wxLua Memory allocation error.

Hummm, you mean a lua table created and used in lua? No ideas...


Yeah the lua table, created and used in lua. Very strange indeed, it gives error even before running it; Lets say:

1 Load sqlite3 and init stuff

2. wx.wxMessageDialod("Check to see if it reaches here")

3. local sql_strs={}

4. many   table.insert(sql_strs, "sql string here")

6. even not do anything with table here, just end script

Run the file, got error, line 2. not reached.
If comment out 4  no error. If not load the sqlite3 modules  no error.

of course the solution is easy, just put a text file each line has a sql command and iterate io.lines() on it ; it works. But you know it is one example of correct usage

Another case that it gives error is the following simple echo server

local socket=require"socket" local copas=require"copas"  local host = host or "localhost" local port = port or 8080 if arg then     host = arg[1] or host     port = arg[2] or port end 
 local function handle_server(skt)     skt=copas.wrap(skt)          table.foreach (skt,print)          -- If client do not send quit command it will loop forever :-)     while true do --        local line, err = copas.receive(skt)  local line, err=skt:receive()         print(line, err)         if line=="quit" then break end      end end  print("Binding to host '" ..host.. "' and port " ..port.. "...\n")
 local server = assert(socket.bind(host, port)) local i, p   = server:getsockname() assert(i, p) print(i, p,"\n") copas.addserver(server, handle_server) copas.loop()
Last night I have removed all custom bindings but in the exe one still have two wxLuaState one in main thread, the other is in a another thread to run a log.lua to process log that wxLuaEvent sends (I like that way); this time the simpler server  works but the script using sqlite3 still failled.

<[EMAIL PROTECTED]><[EMAIL PROTECTED]>
About the picker, I just add a quick code to use it so it is not concrete yet at least I think, it does not check conditions wxLuaUseXXX  etc..

I have tested it, it display ; can GetValue()  can DynamicCast when using XRC;  but not tested all other functions, as I am still busy with the win98 errors...; Just simply add

%include "wx/datectrl.h"
%enum
wxDP_DEFAULT
wxDP_SPIN
wxDP_DROPDOWN
wxDP_SHOWCENTURY
wxDP_ALLOWNONE
%endenum

%class wxDatePickerCtrl, wxControl

%constructor wxDatePickerCtrl(wxWindow *parent,wxWindowID id, const wxDateTime& date = wxDefaultDateTime, const wxPoint& pos = wxDefaultPosition,const wxSize& size = wxDefaultSize,long style = wxDP_DEFAULT | wxDP_SHOWCENTURY,const wxValidator& validator = wxDefaultValidator, const wxString& name = wxDatePickerCtrlNameStr)

bool GetRange(wxDateTime *dt1, wxDateTime *dt2)
wxDateTime GetValue()
void SetRange(const wxDateTime& dt1, const wxDateTime& dt2)
void SetValue(const wxDateTime& dt)
wxDateTime GetValue()

%endclass
into my custom .i  file is all I have done.

Will go to winXP now and continue to compile without the loging thread and see ....

Cheers
<[EMAIL PROTECTED]>








S.KIEU

Send instant messages to your online friends http://au.messenger.yahoo.com

_______________________________________________
Wxlua-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wxlua-users

Reply via email to