You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bsf-user@jakarta.apache.org by Chris Brown <br...@reflexe.fr> on 2003/08/04 09:03:30 UTC

Loading a script then calling specific functions

Hello,

One possible use I've thought of for BSF is to allow end users of my
application to upload a script, in which they may define functions with a
specific name, accepting a certain combination of parameters.  In this way,
I can allow them the possibility to customise my application by calling
their code at specific moments to modify the default behaviour (sort of
event-driven code).

In specific engine implementations, such as Rhino JavaScript, I can look up
Function objects, but I can't see how to do this in a generic manner with
BSF (I'd like to provide this functionality in an engine-independent
manner).

Anyone able to point me in the right direction?

Thanks
Chris