Boost logo

Boost :

From: Kevin Dahlhausen (kdahlhaus_at_[hidden])
Date: 2001-04-08 01:00:54


I'm looking into wrapping the Fast Light Toolkit with
BPL. Some member functions take pointers to static
functions which will be used as callbacks.

The callback function signature is:
        void callback( Fl_Widget *, void *)

This is registered with:
  typedef void (Fl_Callback)(Fl_Widget *, void *);
  void Fl_Widget::callback(Fl_Callback *c, void *p);

The error this results in is:
no matching function for call to `from_python
(PyObject *&, boost::python::type<void (*)(Fl_Widget
*, void *)>)'
candidates are: long int from_python(PyObject *,
boost::python::type<long int>)

So, do I need to add the widget type to boost, that
doesn't sound right.

Do I need to change the interface to a Py_Object?

Searching the archives did not reveal anything.
Would someone be kind enough to post an example of
registering a callback function?

Thanks for your help!

Kevin Dahlhausen kdahlhaus_at_[hidden]

"Do or do not. There is no 'Try.' Yoda

Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.

Boost list run by bdawes at, gregod at, cpdaniel at, john at