0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

el capitan の osascript には " -l JavaScript" と言語指定するとプロトコルを認識しないバグがある?

Posted at
objc-sandbox.js
ObjC.registerSubclass({
    name: "Delegate",
    superclass: "NSObject",
    protocols: ["NSApplicationDelegate"]
})

上記コードを言語指定オプション付きで実行するとプロトコルが存在しないというエラー。

$ osascript -l JavaScript objc-sandbox.js
objc-sandbox.js:0:23: execution error: Error on line 1: Error: protocol does not exist (-2700)

言語指定なしで実行すると問題なくプロトコルを認識する。

$ osascript objc-sandbox.js

osascript.js拡張子のテキストファイルをJavaScriptコードとして自動認識し実行するようなので言語指定しなければ実質問題はないようだ。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?