Examples of pushString()


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

    LuaState L = LuaStateFactory.newLuaState();
    L.openLibs();
   
    String testCheckStr = "testCheck";
   
    L.pushString(testCheckStr);
    assertEquals(testCheckStr, L.LcheckString(-1));
    assertEquals(testCheckStr, L.LoptString(-1, "test"));
   
    L.pushNumber(1.0);
    L.LcheckNumber(-1);
View Full Code Here

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

    LuaState L = LuaStateFactory.newLuaState();
    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);
View Full Code Here

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

    L.pop(1);
    L.LgetMetaField(-1, "__index");
    L.call(0, 1);
    System.out.println(L.toString(-1));
    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()");
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.