quickjs-wrapper icon indicating copy to clipboard operation
quickjs-wrapper copied to clipboard

how to get and run Function

Open WavePlayz opened this issue 9 months ago • 0 comments

my code, says not a function

app.set( "queue", args -> {
			try {
				
				int delay = args.length > 1 ? (int) args[1] : 0;
				
				
				
				task.run(() -> {try {
					JSFunction func = (JSFunction) args[0];
				
					func.call(new Object[]{"wave"});
				} catch (Exception e0) {
					runOnUiThread(() -> toast(e0.toString()));
				}}, delay); 
			} catch (Exception e) {
				
				runOnUiThread(() -> toast(e.getMessage()));
			}
		});

WavePlayz avatar Apr 28 '24 23:04 WavePlayz