Browse Source

TrappedSnapshot>>read:

Herbert Vojčík 11 years ago
parent
commit
b05add83b3
2 changed files with 20 additions and 0 deletions
  1. 16 0
      js/Trapped-Frontend.js
  2. 4 0
      st/Trapped-Frontend.st

+ 16 - 0
js/Trapped-Frontend.js

@@ -1143,6 +1143,22 @@ referencedClasses: []
 }),
 smalltalk.TrappedSnapshot);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "read:",
+category: 'action',
+fn: function (aBlock){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(self._model())._read_do_(_st(self._path())._allButFirst(),aBlock);
+return self}, function($ctx1) {$ctx1.fill(self,"read:",{aBlock:aBlock},smalltalk.TrappedSnapshot)})},
+args: ["aBlock"],
+source: "read: aBlock\x0a\x09self model read: self path allButFirst do: aBlock",
+messageSends: ["read:do:", "model", "allButFirst", "path"],
+referencedClasses: []
+}),
+smalltalk.TrappedSnapshot);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "watch:",

+ 4 - 0
st/Trapped-Frontend.st

@@ -426,6 +426,10 @@ modify: aBlock
 	self model modify: self path allButFirst do: aBlock
 !
 
+read: aBlock
+	self model read: self path allButFirst do: aBlock
+!
+
 watch: aBlock
 	self model watch: self path allButFirst do: aBlock
 ! !