On Tue, Nov 25, 2008 at 8:04 AM, arpin <[EMAIL PROTECTED]> wrote:
> How to reproduce:
>
> change
>    gridtable.GetTypeName = function( self, row, col )
>        if col == Col_Id or col == Col_Priority then
>            return wx.wxGRID_VALUE_NUMBER
>
> to
>    gridtable.GetTypeName = function( self, row, col )
>        if col == Col_Id or col == Col_Priority then
>            return wx.wxEmptyString
>
> I realize that this is not a type but this is purely to demonstrate the
> problem I found it in a more complex situation.
>
> Returning '' will properly report the error it seems to be related to
> wx.wxEmptyString.
>
> Hope someone can figure out how to fix the problem

This is always going to be a problem I imagine. wxLua merely wraps
wxWidgets and doesn't rewrite it. Therefore, when you return nil, but
a string is expected, a lua_error is thrown (actually a long jump) and
the C++ stack is corrupted since we're in a virtual C++ function
handling your Lua function. A good fix for this would take a lot of
work and make updating to new versions of wxWidgets very painful since
they would have to be done by hand. You do get an error stating that a
string was expected right? The best I can say is take heed of the
error message and return a string!

Regards,
    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

Reply via email to