Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: error setting argument 2 - writeInt64: Number/String 64-bit value required #112

Open
nicolas-b12 opened this issue Sep 25, 2018 · 2 comments

Comments

@nicolas-b12
Copy link

This is caused by the Cocoa example in this repo.

Code causing the error : app('setActivationPolicy', $.NSApplicationActivationPolicyRegular)

/Users/nsurleraux/Documents/test-cocoa/node_modules/nodobjc/lib/class.js:193
      else throw e;
           ^

TypeError: error setting argument 2 - writeInt64: Number/String 64-bit value required
    at Buffer.writeInt64LE (/Users/nsurleraux/Documents/test-cocoa/node_modules/ref/lib/ref.js:1355:18)
    at Object.set (/Users/nsurleraux/Documents/test-cocoa/node_modules/ref/lib/ref.js:953:52)
    at Object.set (/Users/nsurleraux/Documents/test-cocoa/node_modules/ref/lib/ref.js:482:10)
    at Object.alloc (/Users/nsurleraux/Documents/test-cocoa/node_modules/ref/lib/ref.js:516:13)
    at proxy (/Users/nsurleraux/Documents/test-cocoa/node_modules/ffi/lib/_foreign_function.js:50:22)
    at unwrapper (/Users/nsurleraux/Documents/test-cocoa/node_modules/nodobjc/lib/core.js:301:31)
    at ID.module.exports.Class.msgSend (/Users/nsurleraux/Documents/test-cocoa/node_modules/nodobjc/lib/class.js:189:34)
    at rtn (/Users/nsurleraux/Documents/test-cocoa/node_modules/nodobjc/lib/core.js:375:47)
    at Object.<anonymous> (/Users/nsurleraux/Documents/test-cocoa/index.js:97:1)
    at Module._compile (module.js:652:30)
@btsimonh
Copy link

btsimonh commented Aug 1, 2019

did you get a result on this?
For me, app works on el capitan, (build against 6.9.5 on el capitan), but not on Majave (same 6.9.5 node).

@btsimonh
Copy link

btsimonh commented Aug 1, 2019

this solved it for me:
$.import('AppKit');
$.import('Foundation');
$.import('Cocoa');

seems the last one is not enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants