I wanted to change string into erlang fun, either on java side or on erlang. I 
need it to create MatchSpecs from funs (there is dbg:fun2ms function). I'd like 
user to enter fun in text area and then, if it's correct, turn into MatchSpec. 
How can I do it?
regards,
Piotrek

----- "Vlad Dumitrescu" <vladd...@gmail.com> wrote:

> On Mon, Aug 16, 2010 at 16:12, Piotr Dorobisz
> <piotr.dorob...@erlang-solutions.com> wrote:
> > Is it possible to change string into erlang fun? Let say I have sth
> like that:
> > fun(X,Y)->X+Y end
> > I'd like to change it into OtpErlangFun and send to erlang node so
> it could be executed there.
> 
> After creating the backend, you can do whatever you want with it,
> including call call("module", "fun", args)... The string arguments
> are
> really meant for when they come from the end user, defined in some
> dialogue, but sometimes it's useful to use them as an initialization
> step.
> 
> OtpErlangFun can't be used to call anything (except by looking in the
> beam file and guessing the right index). It is only a reference to a
> fun that is already present in Erlang code.
> 
> regards,
> Vlad

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Erlide-devel mailing list
Erlide-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlide-devel

Reply via email to