From: Andreas F. <an...@fa...> - 2013-11-15 22:33:39
|
On 15.11.2013 at 23:28 John Labenski wrote: > On Fri, Nov 15, 2013 at 4:23 PM, Andreas Falkenhahn <an...@fa...>wrote: > > Hi, > > how is manual delete supposed to work in wxLua? I tried to call > > myButton = wx.wxButton(....) > myButton:delete() > > You are supposed to use myButton:Destroy() to let wxWidgets > properly delete it. The delete() function is available only for > objects that are not owned by something else. It works on wxRects > for example, but all wxWindows are supposed to be owned by their parent. Ok, but is myButton:Destroy() really equivalent to doing a "delete myButton" in C++? I ask because I'm porting some C++ code to wxLua and the code often deletes and then re-creates the button and I'm trying to imitate this behaviour in wxLua.... -- Best regards, Andreas Falkenhahn mailto:an...@fa... |