|
@@ -853,17 +853,15 @@ selector: "trapGuard:contents:",
|
|
|
category: '*Trapped-Frontend',
|
|
|
fn: function (anArray,aBlock){
|
|
|
var self=this;
|
|
|
-var shown,snap;
|
|
|
return smalltalk.withContext(function($ctx1) {
|
|
|
var $1,$2,$3;
|
|
|
-shown=nil;
|
|
|
-[]._trapDescend_((function(aSnap){
|
|
|
-return smalltalk.withContext(function($ctx2) {
|
|
|
-snap=aSnap;
|
|
|
-return snap;
|
|
|
-}, function($ctx2) {$ctx2.fillBlock({aSnap:aSnap},$ctx1,1)})}));
|
|
|
-self._trap_read_(anArray,(function(gdata){
|
|
|
+[]._trapDescend_((function(snap){
|
|
|
+var shown;
|
|
|
return smalltalk.withContext(function($ctx2) {
|
|
|
+shown=nil;
|
|
|
+shown;
|
|
|
+return self._trap_read_(anArray,(function(gdata){
|
|
|
+return smalltalk.withContext(function($ctx3) {
|
|
|
$1=_st(shown).__eq(gdata);
|
|
|
if(! smalltalk.assert($1)){
|
|
|
shown=gdata;
|
|
@@ -871,20 +869,21 @@ shown;
|
|
|
$2=shown;
|
|
|
if(smalltalk.assert($2)){
|
|
|
_st(snap)._do_((function(){
|
|
|
-return smalltalk.withContext(function($ctx3) {
|
|
|
+return smalltalk.withContext(function($ctx4) {
|
|
|
return self._contents_(aBlock);
|
|
|
-}, function($ctx3) {$ctx3.fillBlock({},$ctx2,5)})}));
|
|
|
+}, function($ctx4) {$ctx4.fillBlock({},$ctx3,5)})}));
|
|
|
$3=self._asJQuery();
|
|
|
-$ctx2.sendIdx["asJQuery"]=1;
|
|
|
+$ctx3.sendIdx["asJQuery"]=1;
|
|
|
return _st($3)._show();
|
|
|
} else {
|
|
|
return _st(self._asJQuery())._hide();
|
|
|
};
|
|
|
};
|
|
|
-}, function($ctx2) {$ctx2.fillBlock({gdata:gdata},$ctx1,2)})}));
|
|
|
-return self}, function($ctx1) {$ctx1.fill(self,"trapGuard:contents:",{anArray:anArray,aBlock:aBlock,shown:shown,snap:snap},smalltalk.TagBrush)})},
|
|
|
+}, function($ctx3) {$ctx3.fillBlock({gdata:gdata},$ctx2,2)})}));
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({snap:snap,shown:shown},$ctx1,1)})}));
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"trapGuard:contents:",{anArray:anArray,aBlock:aBlock},smalltalk.TagBrush)})},
|
|
|
args: ["anArray", "aBlock"],
|
|
|
-source: "trapGuard: anArray contents: aBlock\x0a | shown snap |\x0a shown := nil.\x0a\x09#() trapDescend: [ :aSnap | snap := aSnap ].\x0a self trap: anArray read: [ :gdata |\x0a shown = gdata ifFalse: [\x0a shown := gdata.\x0a shown\x0a\x09\x09\x09\x09ifTrue: [ snap do: [ self contents: aBlock ]. self asJQuery show ]\x0a\x09\x09\x09\x09ifFalse: [ self asJQuery hide ] ]\x0a ]",
|
|
|
+source: "trapGuard: anArray contents: aBlock\x0a\x09#() trapDescend: [ :snap |\x0a\x09 | shown |\x0a \x09shown := nil.\x0a\x09 self trap: anArray read: [ :gdata |\x0a \x09 shown = gdata ifFalse: [\x0a \x09 shown := gdata.\x0a \x09shown\x0a\x09\x09\x09\x09\x09ifTrue: [ snap do: [ self contents: aBlock ]. self asJQuery show ]\x0a\x09\x09\x09\x09\x09ifFalse: [ self asJQuery hide ] ] ] ]",
|
|
|
messageSends: ["trapDescend:", "trap:read:", "ifFalse:", "=", "ifTrue:ifFalse:", "do:", "contents:", "show", "asJQuery", "hide"],
|
|
|
referencedClasses: []
|
|
|
}),
|