|
@@ -796,49 +796,6 @@ referencedClasses: ["Trapped"]
|
|
|
}),
|
|
|
smalltalk.HTMLCanvas);
|
|
|
|
|
|
-smalltalk.addMethod(
|
|
|
-smalltalk.method({
|
|
|
-selector: "guard:trap:contents:",
|
|
|
-category: '*Trapped-Frontend',
|
|
|
-fn: function (anArray,anotherArray,aBlock){
|
|
|
-var self=this;
|
|
|
-var shown,snap;
|
|
|
-return smalltalk.withContext(function($ctx1) {
|
|
|
-var $1,$2,$3;
|
|
|
-shown=nil;
|
|
|
-_st(anotherArray)._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){
|
|
|
-return smalltalk.withContext(function($ctx2) {
|
|
|
-$1=_st(shown).__eq(gdata);
|
|
|
-if(! smalltalk.assert($1)){
|
|
|
-shown=gdata;
|
|
|
-shown;
|
|
|
-$2=shown;
|
|
|
-if(smalltalk.assert($2)){
|
|
|
-_st(snap)._do_((function(){
|
|
|
-return smalltalk.withContext(function($ctx3) {
|
|
|
-return self._contents_(aBlock);
|
|
|
-}, function($ctx3) {$ctx3.fillBlock({},$ctx2,5)})}));
|
|
|
-$3=self._asJQuery();
|
|
|
-$ctx2.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,"guard:trap:contents:",{anArray:anArray,anotherArray:anotherArray,aBlock:aBlock,shown:shown,snap:snap},smalltalk.TagBrush)})},
|
|
|
-args: ["anArray", "anotherArray", "aBlock"],
|
|
|
-source: "guard: anArray trap: anotherArray contents: aBlock\x0a | shown snap |\x0a shown := nil.\x0a\x09anotherArray 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 ]",
|
|
|
-messageSends: ["trapDescend:", "trap:read:", "ifFalse:", "=", "ifTrue:ifFalse:", "do:", "contents:", "show", "asJQuery", "hide"],
|
|
|
-referencedClasses: []
|
|
|
-}),
|
|
|
-smalltalk.TagBrush);
|
|
|
-
|
|
|
smalltalk.addMethod(
|
|
|
smalltalk.method({
|
|
|
selector: "trap:",
|
|
@@ -890,4 +847,47 @@ referencedClasses: ["KeyedPubSubUnsubscribe"]
|
|
|
}),
|
|
|
smalltalk.TagBrush);
|
|
|
|
|
|
+smalltalk.addMethod(
|
|
|
+smalltalk.method({
|
|
|
+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){
|
|
|
+return smalltalk.withContext(function($ctx2) {
|
|
|
+$1=_st(shown).__eq(gdata);
|
|
|
+if(! smalltalk.assert($1)){
|
|
|
+shown=gdata;
|
|
|
+shown;
|
|
|
+$2=shown;
|
|
|
+if(smalltalk.assert($2)){
|
|
|
+_st(snap)._do_((function(){
|
|
|
+return smalltalk.withContext(function($ctx3) {
|
|
|
+return self._contents_(aBlock);
|
|
|
+}, function($ctx3) {$ctx3.fillBlock({},$ctx2,5)})}));
|
|
|
+$3=self._asJQuery();
|
|
|
+$ctx2.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)})},
|
|
|
+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 ]",
|
|
|
+messageSends: ["trapDescend:", "trap:read:", "ifFalse:", "=", "ifTrue:ifFalse:", "do:", "contents:", "show", "asJQuery", "hide"],
|
|
|
+referencedClasses: []
|
|
|
+}),
|
|
|
+smalltalk.TagBrush);
|
|
|
+
|
|
|
});
|