Closed GirkovArpa closed 3 years ago
view.foo("foo", function(result) { stdout.println("result:", result); });
impl EventHandler { fn foo(&self, filename: String, callback: sciter::Value) -> sciter::Value { image_magick_test(); callback.call(None, &make_args!(1, "2", 3.0), Some(file!())).unwrap(); sciter::Value::from(bar(filename.as_str())) } } impl sciter::EventHandler for EventHandler { dispatch_script_call! ( fn foo(String, sciter::Value); ); } fn bar(filename: &str) -> &str { return filename; }
When I do cargo run, I get an error at fn foo(String, sciter::Value) saying that "no rules expected this token in macro call" (referring to sciter::Value).
cargo run
fn foo(String, sciter::Value)
sciter::Value
I know it's not a minimal reproducible example, but if it's unclear I can simplify it further.
I found an example at rust-sciter/examples/threads.rs.
rust-sciter/examples/threads.rs
When I do
cargo run
, I get an error atfn foo(String, sciter::Value)
saying that "no rules expected this token in macro call" (referring tosciter::Value
).