[luabind] Re: luabind and boost::signals
Brought to you by:
arvidn,
daniel_wallin
From: Daniel W. <dal...@st...> - 2004-04-26 00:10:26
|
Richard Garand wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Is there any way to connect a function to a boost signal from lua with either > beta6 or beta7 of luabind? This sounds a bit more complicated than what the > library allows for... AFAICT there should be no problems doing something like this: typedef boost::signal1<void, int> sig_t; sig_t& signal() { static sig_t x; return x; } void connect(luabind::functor<void> const& fn) { signal().connect(fn); } ... def("connect", &connect); Does this help? -- Daniel Wallin |