On Mon, Mar 31, 2014 at 4:52 PM, Paul K <paulclin...@yahoo.com> wrote:
> Hi John, > > I'm trying to create wxTreeEvent and ran into unexpected difficulties. > > I'm wondering why you want to create a wxTreeEvent? > I've tried the following (item_id is wxTreeItemId I got from > event:GetItem()): > > 1. wx.wxTreeEvent(wx.wxEVT_COMMAND_TREE_ITEM_ACTIVATED, item_id) > > Try using item_id:GetValue(). > got an error saying that the second parameter is a userdata, but needs > to be a number > > 2. Tried to get id from wxTreeItemId, but it doesn't have GetID() even > though the documentation references it > (http://docs.wxwidgets.org/trunk/classwx_tree_item_id.html). > > This is the GetValue() function, there's not much you can do with the void* ptr from GetID() in Lua. > 3. local treeevent = > wx.wxTreeEvent(wx.wxEVT_COMMAND_TREE_ITEM_ACTIVATED) > treeevent:SetClientObject(tree:GetItemData(item_id)) > > got an error saying that wxTreeEvent doesn't have SetClientObject. > > Added in SVN. Regards, John
------------------------------------------------------------------------------
_______________________________________________ wxlua-users mailing list wxlua-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wxlua-users