How to embed scripting parser like MS Excel VBA? Topic is solved

This forum can be used to talk about general design strategies, new ideas and questions in general related to wxWidgets. If you feel your questions doesn't fit anywhere, put it here.
Post Reply
bluelarva
Earned a small fee
Earned a small fee
Posts: 16
Joined: Sun Aug 27, 2006 4:38 am

How to embed scripting parser like MS Excel VBA?

Post by bluelarva »

Hi,

If I want to create a application which let user customize it by using scripting language, like Excel VBA or FLASH actionScript, How to do that?


Thanks.
Ryan Wilcox
I live to help wx-kind
I live to help wx-kind
Posts: 194
Joined: Mon Aug 30, 2004 1:26 pm
Location: PA, USA
Contact:

Post by Ryan Wilcox »

Off the top of my head, you can embed wxPython and wxLua. Lua I believe is the current "hot thing to embed" because it was designed to do that.
Ryan Wilcox
Wilcox Development Solutions
http://www.wilcoxd.com
Jorg
Moderator
Moderator
Posts: 3971
Joined: Fri Aug 27, 2004 9:38 pm
Location: Delft, Netherlands
Contact:

Post by Jorg »

I would also favor wxPyhon you could write the whole GUI in wxPython instead of C++ to make it even more flexible.

-Jorgen
Forensic Software Engineer
Netherlands Forensic Insitute
http://english.forensischinstituut.nl/
-------------------------------------
Jorg's WasteBucket
http://www.xs4all.nl/~jorgb/wb
bluelarva
Earned a small fee
Earned a small fee
Posts: 16
Joined: Sun Aug 27, 2006 4:38 am

Post by bluelarva »

I would like to emb those popular scripting language like javascript or vbscript into my app. I use C/C++ to code my app. I've never learn Python or LUA before.

I know there is a project called SeaMonkey by mozilla, but i wonder if it's easy for integrating it into my app. For Java user, they can easily use Rhino.
Ryan Wilcox
I live to help wx-kind
I live to help wx-kind
Posts: 194
Joined: Mon Aug 30, 2004 1:26 pm
Location: PA, USA
Contact:

Post by Ryan Wilcox »

There's wxJS. Don't know how good it does on the embeding front, but apparently you can have it call C++ libaries, so it sounds promising, but don't know what that means for the rest of your app (like does the entire app need to be written in JavaScript to start with, then call C++ functions, or can it be written mostly in C++, and call bits of JavaScript here and there?). I don't know.
Ryan Wilcox
Wilcox Development Solutions
http://www.wilcoxd.com
bluelarva
Earned a small fee
Earned a small fee
Posts: 16
Joined: Sun Aug 27, 2006 4:38 am

Post by bluelarva »

I use C/C++ to build my application, and let user use javascript to customize it. That means my app should have a internal script parser.

To the best of my knowledge, wxJS is using Javascript to build the whole application.

If you have ever use Flash, you can use ActionScript to script your flash, but the Macromedia Flash itself is not coded using ActionScript.
Likewise for Excel or Access, you can program your code using VBA. But I believe Excel or Access is not built by VBA.
phlox81
wxWorld Domination!
wxWorld Domination!
Posts: 1387
Joined: Thu Aug 18, 2005 7:49 pm
Location: Germany
Contact:

Post by phlox81 »

For JS you could take SpiderMonkey, its the JS Implementation from Mozilla.
fbronx
Knows some wx things
Knows some wx things
Posts: 38
Joined: Tue Nov 29, 2005 8:37 am
Location: Belgium

Post by fbronx »

Ryan Wilcox wrote:There's wxJS. Don't know how good it does on the embeding front, but apparently you can have it call C++ libaries, so it sounds promising, but don't know what that means for the rest of your app (like does the entire app need to be written in JavaScript to start with, then call C++ functions, or can it be written mostly in C++, and call bits of JavaScript here and there?). I don't know.
You can use the wxJS ported classes by loading the modules from your application. You also need to port your application classes to JavaScript. You can use SpiderMonkey for that.
Use wxWidgets in JavaScript: GLUEscript
Post Reply