From e87a03ddc7c47dc3b37a8826f3cda557b3d9782f Mon Sep 17 00:00:00 2001 From: Morgan McMillian Date: Thu, 22 Mar 2012 20:09:14 -0400 Subject: [PATCH] added notification for blackberry on file save --- app/source/TodoTxt.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/app/source/TodoTxt.js b/app/source/TodoTxt.js index d5a43b9..31cdfe2 100644 --- a/app/source/TodoTxt.js +++ b/app/source/TodoTxt.js @@ -277,8 +277,16 @@ enyo.kind({ if (blackberry.io.file.exists(path)) { blackberry.io.file.deleteFile(path); } - blackberry.io.file.saveFile(path, - blackberry.utils.stringToBlob(data)); + var result = ""; + try { + blackberry.io.file.saveFile(path, + blackberry.utils.stringToBlob(data)); + result = "file saved"; + } catch (e) { + console.log("err: " + e); + result = "err: " + e; + } + this.showToast(result); } else { this.$.writeFile.call({ path: path, content: data }); }