On Fri, Aug 16, 2013 at 3:21 PM, Milind Gupta <milind.gu...@gmail.com>wrote:

> Hi,
>       I am trying to find out if there is an easy way I can add
> mathematical equation writing support to my page. I have never done this
> before so any pointers would be helpful. Can I use any existing library
> with wxlua to achieve this? Or would it be easier to make it from scratch.
>
>
I have used this library before and it works as advertised :
http://warp.povusers.org/FunctionParser/

However, a pure Lua solution is probably what you want and I have not
attempted to do that either. I would think that if you get a string from a
user then run it through some checks to make sure it doesn't have 'if',
'for', 'os.execute', or any other nastyness, prepend "return" to it then
use pcall() to run it that should work. The hard part is getting all the
check rights so you don't have any security holes and the user can't
crash/lock-up your program.

Regards,
    John


ps. I'll check the controls later tonight when I can get to a MS Win
machine and respond in your other thread.
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users

Reply via email to