diff --git a/Makefile b/Makefile
index 4b9455f..8335db4 100644
--- a/Makefile
+++ b/Makefile
@@ -52,7 +52,7 @@ coffees= src/core/core.coffee \
-packages = CoreServices ActivityMonitor Setting ShowCase DummyApp # Files MarkOn MarketPlace Preview NotePad wTerm
+packages = CoreServices ActivityMonitor Files Setting ShowCase MarkOn# Files MarketPlace Preview NotePad wTerm
main: initd build_coffees build_themes schemes libs build_packages languages
- cp src/index.html $(BUILDDIR)/
diff --git a/src/core/Announcerment.coffee b/src/core/Announcerment.coffee
index 82ba3aa..1e5c163 100644
--- a/src/core/Announcerment.coffee
+++ b/src/core/Announcerment.coffee
@@ -72,12 +72,12 @@ Ant.OS.announcer =
Ant.OS.announcer.listeners[a.pid].push { e: e, f: f }
Ant.OS.announcer.observable.on e, f
trigger: (e, d) -> Ant.OS.announcer.observable.trigger e, d
- osfail: (m, e, s) ->
- Ant.OS.announcer.ostrigger "fail", { m: m, e: e, s: s }
- oserror: (m, e, s) ->
- Ant.OS.announcer.ostrigger "error", { m: m, e: e, s: s }
+ osfail: (m, e) ->
+ Ant.OS.announcer.ostrigger "fail", { m: m, e: e }
+ oserror: (m, e) ->
+ Ant.OS.announcer.ostrigger "error", { m: m, e: e }
osinfo: (m) ->
- Ant.OS.announcer.ostrigger "info", { m: m, e: null, s: null }
+ Ant.OS.announcer.ostrigger "info", { m: m, e: null }
ostrigger: (e, d) ->
Ant.OS.announcer.trigger e, { id: 0, data: d, name: "OS" }
unregister: (app) ->
diff --git a/src/core/BaseDialog.coffee b/src/core/BaseDialog.coffee
index 9eca427..0e432eb 100644
--- a/src/core/BaseDialog.coffee
+++ b/src/core/BaseDialog.coffee
@@ -233,7 +233,7 @@ class YesNoDialog extends BasicDialog
init: () ->
super.init()
me = @
- @find("lbl").set "text", @data.label if @data and @data.label
+ @find("lbl").set "*", @data if @data
(@find "btnYes").set "onbtclick", (e) ->
me.handle(true) if me.handle
me.quit()
diff --git a/src/core/api.coffee b/src/core/api.coffee
index be43cce..d029102 100644
--- a/src/core/api.coffee
+++ b/src/core/api.coffee
@@ -289,42 +289,47 @@ Ant.OS.API =
libready: (l) ->
return Ant.OS.API.shared[l] || false
- require: (l,f) ->
- if not Ant.OS.API.shared[l]
- if l.match /^(https?:\/\/[^\s]+)/g
- Ant.OS.API.script l, () ->
- Ant.OS.API.shared[l] = true
- Ant.OS.announcer.trigger "sharedlibraryloaded", l
- f() if f
- , (e, s) ->
- Ant.OS.announcer.oserror __("Cannot load 3rd library at: {0}", l), e, r
+ requires: (l) ->
+ new Promise (resolve, reject) ->
+ if not Ant.OS.API.shared[l]
+ link = l
+ if not l.match /^(https?:\/\/[^\s]+)/g
+ path = "os://scripts/"
+ cssFile = "#{path}#{l}.css".asFileHandle()
+ cssFile.onready()
+ .then () ->
+ $('', {
+ rel: 'stylesheet',
+ type: 'text/css',
+ 'href': "#{cssFile.getlink()}"
+ })
+ .appendTo 'head'
+ .catch (e) ->
+ js = "#{path}#{l}.js"
+ link = js.asFileHandle().getlink()
+ Ant.OS.API.script link
+ .then () ->
+ Ant.OS.API.shared[l] = true
+ console.log "loaded:", l
+ Ant.OS.announcer.trigger "sharedlibraryloaded", l
+ resolve(l)
+ .catch (e) ->
+ reject e
else
- path = "os://scripts/"
- js = "#{path}#{l}.js"
- js.asFileHandle().onready (d) ->
- Ant.OS.API.shared[l] = true
- el = $ '