Ok Unity3d允许您在应用程序首选项中设置外部脚本编辑器。所以我想使用applescript来启动我自己的编辑器。到目前为止,这个applescript对我来说工作得很好,但是我无法跳到行号。
根据Unity的说法,“行号应该通过AppleEvent中的一个参数发送。它应该是typeChar和keyAEPosition ('kpos')。通过这个参数发送的结构具有以下布局:”
struct TheSelectionRange
{
short unused1; // 0 (not used)
short lineNum; // line to select
是否可以在v8中确定回调的源信息(文件、行号、列号)?
function foo(callback) {
var x = callback();
if (typeof x !== "string") {
//hmmm, x is not as expected, I want to know more about the callback.
}
}