Build and run app directly from antOSDK

This commit is contained in:
Xuan Sang LE
2018-03-19 19:11:38 +01:00
parent cd3bba7cf8
commit e8d4815e93
7 changed files with 317 additions and 59 deletions

View File

@ -84,7 +84,8 @@ class BaseApplication extends this.OS.GUI.BaseModel
toggle: () ->
@trigger "toggle"
onexit: (evt) ->
@cleanup(evt)
if not evt.prevent

View File

@ -307,10 +307,11 @@ class FileDiaLog extends BaseDialog
if me.data and me.data.mimes
#verify the mime
m = false
for v in me.data.mimes
if f.mime.match (new RegExp v, "g")
m = true
break
if f.mime
for v in me.data.mimes
if f.mime.match (new RegExp v, "g")
m = true
break
return me.notify __("Only {0} could be selected", me.data.mimes.join(",")) unless m
d = f.path
d = f.path.asFileHandler().parent() if f.type is "file"

View File

@ -77,6 +77,11 @@ class BaseModel
@dialog.title = title
@dialog.init()
ask: (t, m, f) ->
@._gui.openDialog "YesNoDialog", (d) ->
f() if d
, t, { text: m }
publish: (t, m, e) ->
mt = @meta()
_courrier.trigger t, { id: @pid, name: @name, data: { m: m, icon: mt.icon, iconclass: mt.iconclass }, error: e }