added notification for blackberry on file save

This commit is contained in:
Morgan McMillian 2012-03-22 20:09:14 -04:00
parent 94b918b6b8
commit e87a03ddc7

View file

@ -277,8 +277,16 @@ enyo.kind({
if (blackberry.io.file.exists(path)) { if (blackberry.io.file.exists(path)) {
blackberry.io.file.deleteFile(path); blackberry.io.file.deleteFile(path);
} }
var result = "";
try {
blackberry.io.file.saveFile(path, blackberry.io.file.saveFile(path,
blackberry.utils.stringToBlob(data)); blackberry.utils.stringToBlob(data));
result = "file saved";
} catch (e) {
console.log("err: " + e);
result = "err: " + e;
}
this.showToast(result);
} else { } else {
this.$.writeFile.call({ path: path, content: data }); this.$.writeFile.call({ path: path, content: data });
} }