Wrong userdata pointer returned since update to luabind 0.9

Stefan Reusch <[email protected]>
Newsgroups gmane.comp.lang.lua.bind.user
Message-ID <[email protected]>
I have switched to luabind 0.9 and now the userdata pointer are wrong,
which are returned.
Any ideas to fix the problem? LuaLabel gets in my example a LuaDialog
object as parent, but
the userdata object pointer is not the same, which it was on create function.

Here is a part of the code...

luabind::class_<CLuaWndBaseClass>("LuaWndBase")
			.def(luabind::constructor<>())
			.def("Connect", &CLuaWndBaseClass::Connect)
			.def("GetText", &CLuaWndBaseClass::GetText)
			.def("SetText", &CLuaWndBaseClass::SetText)
			.def("Enable", &CLuaWndBaseClass::Enable)
			.def("Disable", &CLuaWndBaseClass::Disable)
			.def("IsEnabled", &CLuaWndBaseClass::IsEnabled)
			.def("SetFocus", &CLuaWndBaseClass::SetFocus)
			.def("SetPos", &CLuaWndBaseClass::SetPos)
			.def("GetPos", &CLuaWndBaseClass::GetPos)
			.def("UpdateWindow", &CLuaWndBaseClass::UpdateWindow)
			.def("Invalidate", &CLuaWndBaseClass::Invalidate)
			.def("Show", &CLuaWndBaseClass::Show)
			.def("Hide", &CLuaWndBaseClass::Hide),
luabind::class_<CLuaLabel, CLuaWndBaseClass>("LuaLabel")
			.def(luabind::constructor<>())
			.def("Create", &CLuaLabel::Create)
			.def("GetTextSize", &GetTextSize),
luabind::class_<CLuaDialog, CLuaWndBaseClass>("LuaDialog")
			.def(luabind::constructor<>())
			.def("Create", &CLuaDialog::Create)
			.def("ShowDialog", &CLuaDialog::ShowDialog)
			.def("HideDialog", &CLuaDialog::HideDialog)


OptionDlg = LuaDialog()
Label = LuaLabel()
Button = LuaButton()

function OnSettings()
	OptionDlg:Create("Settings", {0,0,100,100})
	Label:Create(OptionDlg, {0,0,100,10}) -- Problem is here: the
optiondlg object is not the same one line before
end

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.