Skip to content

错误依旧执行 #10

@kigkrazy

Description

@kigkrazy
public class ExampleModule implements LuaExportType{

    public String prefix;
    /**
     * 对象方法执行
     */
    public void objExec(){
        LogUtil.d("ExampleMethod#objExec..........");
    }

    /**
     * 执行静态方法
     * @return
     */
    public static LuaValue exec(){
        LogUtil.d("ExampleMethod#exec : no param");
        return null;
    }

    /**
     * 执行重载静态方法
     * @param msg
     * @return
     */
    public static LuaValue exec(String msg){
        LogUtil.d("ExampleMethod execute : param(" + msg + ")");
        return null;
    }
}
        LuaValue luaValue = XiumHelper.evalScript("print('before test');" + //调用日志
                "local ex = ExampleModule.create();" + //创建实例
                "ex.objExec();" + //给类成员变量赋值
                "print('after test');");//上面函数调用错误,依旧向下执行

ex.objExec();调用语句错误依旧向下执行print('after test');语句。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions