Refactor API's related to compiling and loading scripts and character encoding handling.
This commit is contained in:
@@ -4,9 +4,7 @@ import javax.microedition.midlet.MIDlet;
|
||||
import javax.microedition.midlet.MIDletStateChangeException;
|
||||
|
||||
import org.luaj.vm2.*;
|
||||
import org.luaj.vm2.lib.*;
|
||||
import org.luaj.vm2.lib.jme.JmePlatform;
|
||||
import org.luaj.vm2.compiler.LuaC;
|
||||
|
||||
|
||||
public class SampleMIDlet extends MIDlet {
|
||||
@@ -21,8 +19,8 @@ public class SampleMIDlet extends MIDlet {
|
||||
script = DEFAULT_SCRIPT;
|
||||
|
||||
// create an environment to run in
|
||||
LuaValue _G = JmePlatform.standardGlobals();
|
||||
_G.get("require").call( LuaValue.valueOf(script) );
|
||||
Globals globals = JmePlatform.standardGlobals();
|
||||
globals.get("require").call( LuaValue.valueOf(script) );
|
||||
}
|
||||
|
||||
protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
|
||||
|
||||
Reference in New Issue
Block a user