Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » U++ Developers corner » v8 JavaScript in U++
v8 JavaScript in U++ [message #32321] Mon, 09 May 2011 13:06 Go to previous message
tojocky is currently offline  tojocky
Messages: 607
Registered: April 2008
Location: UK
Contributor

Hello All,

v8 JavaScript can be integrated in U++.
I use shared library of v8 because it take less space.

I have attached a simple example with screen shot.
index.php?t=getfile&id=3233&private=0

To run this example need to have a builded v8 3.3.4.0, add in include folders v8.lib (for windows) and run.

To run a simple JavaScript code is simple:
		V8JS::Locker locker;
		V8JS::HandleValue result = curr_V8JS.Execute(CodeForExecution.GetData());
		if(curr_V8JS.IsError()){
			PromptOK(DeQtf(Format("JavaScriptError: %s", curr_V8JS.GetLastError())));
		}


I added some functions(system.write(), alert(), ...) and handlers(onexit());

Any comment are welcome.
  • Attachment: v8_test.PNG
    (Size: 20.14KB, Downloaded 1035 times)
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: TheIde new look and new features
Next Topic: MVC example
Goto Forum:
  


Current Time: Sun Apr 28 18:50:50 CEST 2024

Total time taken to generate the page: 0.02000 seconds