Author: jmorliaguet
Date: Sat Feb 25 18:28:59 2006
New Revision: 2460

Modified:
   cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js
Log:

- added a readData() method that reads from the storage without requesting
  newer data.



Modified: cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js
==============================================================================
--- cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js (original)
+++ cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js Sat Feb 25 
18:28:59 2006
@@ -932,18 +932,21 @@
   },
 
   // high-level I/O
+  readData: function() {
+    return this.storage.read();
+  },
+
   getData: function() {
     this.storage.readTransaction(); /* asynchronous call */
-    return this.storage.read();
+    return this.readData();
   },
 
   setData: function(data) {
     this.storage.writeTransaction(data);
   },
 
-  // TODO: to rewrite: this might not work if called asynchronously.
   updateData: function(data) {
-    var current_data = this.def.data || new Object();
+    var current_data = this.storage.read() || new Object();
     new_data = $H(current_data).merge(data);
     this.setData(new_data);
   },
@@ -1013,7 +1016,7 @@
   },
 
   readTransaction: function(data) {
-    // TODO: implement a read access sequences
+    // TODO: implement read access sequences
     this.requestData();
   },
 
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to