ldlework Posted March 1, 2022 Share Posted March 1, 2022 I have a JXA script library with a single function ``` function foo(cb) { cb("Hello World") } ``` And I have a JXA script with the following: ```var mylib = Library("mylib") mylib.foo(str => console.log(str)) ``` But no matter what I do, I get an error that `cb` is not a function but an object. Other datatypes work but I can't seem to pass functions. Is this a limitation or am I holding it wrong? Link to comment
vitor Posted March 4, 2022 Share Posted March 4, 2022 Welcome @ldlework, Your question isn’t Alfred-related; it only concerns JXA behaviour. Have you tried somewhere more general, like Ask Different? On 3/1/2022 at 5:46 PM, ldlework said: Is this a limitation Quite possibly. JXA has quite a few things left unfinished. The folks at the JXA Cookbook might have an insight on this particular case. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now