Hi,

John Labenski yazmış:
> On Mon, Feb 25, 2008 at 11:31 AM, Hakkı Doğusan <[EMAIL PROTECTED]> wrote:
>> Hi,
>>
>>  (ubuntu-7.10, wxlua-2.8.7 compiled as lua module, with static wx)
>>
>>  I'm trying to use a wxGrid (feed by wxGridTable) in a frame. wxGrid is
>>  the only control in the frame.
>>
>>  If I move mouse on grid I'm getting "Segmentation fault (core dumped)"
>>  or "Illegal instruction (core dumped)" error. If I don't touch mouse,
>>  everything works as expected, ie. there is no error with keyboard
>>  navigation.
>>
>>  Changing my overriding code with gridtable.wx.lua's "connectvirtuals"
>>  function didn't help.
>>
>>  Did you see anything like that?
>>
> 
> I haven't used the wxGrid in any serious way. Do you have a small bit
> of Lua code that shows this.
> 

It took too many hours, but I found the bug.. It's about the lifetime of 
objects.

Crashing code was:

     frame.gt = wx.wxLuaGridTableBase()
     frame.gt:SetView( frame.grid )
     connectvirtuals(frame.gt)
     frame.grid:SetTable(frame.gt)

I changed it to:

     gt = wx.wxLuaGridTableBase() --made gt module global
     gt:SetView( frame.grid )
     connectvirtuals(gt)
     frame.grid:SetTable(gt)

I was thinking that, while frame is alive, then a variable "attached" to 
it, will too. Apparently I was wrong!


> -John

--
Regards,
Hakki Dogusan


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
wxlua-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wxlua-users

Reply via email to