Focus issues, see #28.

This commit is contained in:
Nuno Cruces 2022-05-12 18:16:31 +01:00
parent 5e39a48e5c
commit a9649cc64e
3 changed files with 2 additions and 7 deletions

View file

@ -24,9 +24,6 @@ $.exit(-1)}
{'rgb('+res.map(x=>Math.round(x*255))+')'} {'rgb('+res.map(x=>Math.round(x*255))+')'}
{{- end}} {{- end}}
{{define "date" -}} {{define "date" -}}
var app=Application.currentApplication()
app.includeStandardAdditions=true
app.activate()
ObjC.import('Cocoa') ObjC.import('Cocoa')
ObjC.import('stdio') ObjC.import('stdio')
ObjC.import('stdlib') ObjC.import('stdlib')
@ -88,6 +85,7 @@ if(Array.isArray(res)){res.join({{json .Separator}})}else{res.toString()}
{{define "list" -}} {{define "list" -}}
var app=Application.currentApplication() var app=Application.currentApplication()
app.includeStandardAdditions=true app.includeStandardAdditions=true
app.activate()
ObjC.import('stdio') ObjC.import('stdio')
ObjC.import('stdlib') ObjC.import('stdlib')
try{var res=app.chooseFromList({{json .Items}},{{json .Options}})}catch(e){$.dprintf(2,e) try{var res=app.chooseFromList({{json .Items}},{{json .Options}})}catch(e){$.dprintf(2,e)

View file

@ -1,7 +1,3 @@
var app = Application.currentApplication()
app.includeStandardAdditions = true
app.activate()
ObjC.import('Cocoa') ObjC.import('Cocoa')
ObjC.import('stdio') ObjC.import('stdio')
ObjC.import('stdlib') ObjC.import('stdlib')

View file

@ -1,5 +1,6 @@
var app = Application.currentApplication() var app = Application.currentApplication()
app.includeStandardAdditions = true app.includeStandardAdditions = true
app.activate()
ObjC.import('stdio') ObjC.import('stdio')
ObjC.import('stdlib') ObjC.import('stdlib')