On Wed, Mar 26, 2008 at 6:58 AM, John Labenski <[EMAIL PROTECTED]> wrote:
> On Sat, Mar 8, 2008 at 5:28 AM, Eero Pajarre <[EMAIL PROTECTED]> wrote:

>  >  Actually after looking more at the code, I think that doing a
>  >  IncRef in Set operations is the better way, instead of this ungc-change.
>  ...
>
> >  As a related note, I think that the target should be, that IncRef/DecRef 
> > are
>  >  not be part of wxLua Lua-API. Incorrectly using DecRef will lead to 
> program
>  >  crash, and I would rather have a "crash-proof-API".
>
>  I think this could work... so long as it's done in all the right
>  places, but we have to also make sure that we have removed them all
>  from Lua before the grid is deleted because the m_control member of
>  the editors will not be NULLed and the wxGridCellEditor will try to
>  delete it again. This is apparently has not been a problem in C++
>  since people either do not keep the editors around or they are members
>  of their own wxGrids and are deleted before the grid itself is
>  deleted.
>

Cannot help feeling that this is getting ugly...
(Should this be taken to the wxWidgets people? the
fact that an editor tries to destroy its owner feels backward)

The other alternative I considered would be letting  wxGrid adopt the
editors etc by "killing" the lua variable for the editor or attribute
at the point
when it is given to the attribute or grid to own.

This approach also has its problems. (like the "global editors"
wxGridCellBoolEditor() etc)

  Eero

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users

Reply via email to