On Sat, Nov 15, 2008 at 2:58 AM, Eero Pajarre <[EMAIL PROTECTED]> wrote: > > Just wanted to tell about my own experience, which I told on this > mailing list in June. wxTimers can be garbage collected even if they > are in use. So if you use timers you might want to check for that possibility. >
Could you elaborate? There is no reason why a wxTimer should be deleted and not a wxPoint for the same code. To be sure, you cannot create anything you want to outlive the current scope with the "local" keyword since it will be GCed. If you don't want to pollute the global table with objects you can tuck your wxTimer into a frame or a special table of things you want to keep. Try this in the minimal.wx.lua sample, put it just before the frame:Show(true) line. frame.timer = wx.wxTimer(frame, 100) frame:Connect(100, wx.wxEVT_TIMER, function (event) wx.wxMessageBox('This is the timer dialog of the Minimal wxLua sample.\n'.. wxlua.wxLUA_VERSION_STRING.." built with "..wx.wxVERSION_STRING, "About wxLua", wx.wxOK + wx.wxICON_INFORMATION, frame) end ) frame.timer:Start(5000, false) Hope this helps, John ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ wxlua-users mailing list wxlua-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wxlua-users