Examples of LdoString()


Examples of org.keplerproject.luajava.LuaState.LdoString()

    L.openLibs();
   
    L.newTable();
    L.newTable();
    L.pushString("__index");
    L.LdoString("return function()" +
        "io.write( 'metatest\\n') io.stdout:flush() " +
        "return 'foo' " +
        "end");
    L.setTable(-3);
    L.setMetaTable(-2);
View Full Code Here

Examples of org.keplerproject.luajava.LuaState.LdoString()

    L.pop(1);
    L.pushString("testTable");
    L.pushValue(-2);
    L.setTable(LuaState.LUA_GLOBALSINDEX.intValue());
    L.pop(1);
    L.LdoString("str = testTable.ff; print(str..'fromLua');" +
        " io.stdout:flush()");
   
    L.close();
  }
}
View Full Code Here

Examples of org.keplerproject.luajava.LuaState.LdoString()

  public static void main(String[] main_args) throws LuaException, ClassNotFoundException
  {
    LuaState L = LuaStateFactory.newLuaState();
    L.openBase();
   
    L.LdoString(str);

    LuaObject func = L.getLuaObject("imprime");
    Object[] teste = func.call(new Object[] { "TESTANDO"}, 2);
    System.out.println(teste[0]);
    System.out.println(teste[1]);
View Full Code Here

Examples of org.keplerproject.luajava.LuaState.LdoString()

    LuaState L = LuaStateFactory.newLuaState();
    L.openBase();
    L.openIo();
    //L.openLibs();
   
    L.LdoString(lua);
   
    for(int i = 0 ;i < 100; i++)
    {
      LuaObject obj = L.getLuaObject("tb");
      Object runnable = obj.createProxy("java.lang.Runnable");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.