> the example helped
fortunatly
and Richard Jones asked me to post it on the list, as I
guess joined pieces
are not allowed, it's there: http://n
orth.chez-alice.fr/dummy_example.tgz
> below is my solution:
> you manage the callback list in ocaml and register just
one callback to the
> ocamlside: that callback calls the dumplist function in
ocaml.
> You can add more code to remove functions from the list
etc.
> I didn't tried it, but it should be o.k.....
the problem is that in the small sample example, dump_list()
simulates events
in the library that makes call the callbacks, and with your
solution the
library won't be able to call individualy each callbacks.
(Sorry your solution does work with my small sample example,
because I haven't
made a complete event management in the sample, I don't even
know how to do
this in C, lol)
Putting the callbacks in an ocaml list is a solution close
to the one for
glutTimerFunc() in LablGlut, but in LablGlut this is a
Hashtable so callbacks
can be retrieved individualy with an index.
Archives up to November 11, 2006 are also downloadable at http://www.connettivo.net/cntprojects/ocaml_beginners/
The archives of the very official ocaml list (the seniors'
one) can be found at http://caml.inria.fr
Attachments are banned and you're asked to be polite, avoid
flames etc.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http:/
/groups.yahoo.com/group/ocaml_beginners/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
ht
tp://groups.yahoo.com/group/ocaml_beginners/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:ocaml_beginners-digest@yahoogroups.com
mailto:ocaml_beginners-fullfeatured@yahoogroups.com
<*> To unsubscribe from this group, send an email to:
ocaml_beginners-unsubscribe@yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.c
om/info/terms/
|