Browse Source

Removing amber bug workaround. it's already fixed.

Herbert Vojčík 11 years ago
parent
commit
d9fb4bd3f3
3 changed files with 18 additions and 26 deletions
  1. 6 10
      lib/js/Trapped-Demo.deploy.js
  2. 8 12
      lib/js/Trapped-Demo.js
  3. 4 4
      lib/st/Trapped-Demo.st

+ 6 - 10
lib/js/Trapped-Demo.deploy.js

@@ -165,12 +165,10 @@ _st(html)._with_(" remaining [ ");
 $1=_st(html)._a();
 _st($1)._href_("");
 _st($1)._onClick_((function(){
-return smalltalk.withContext(function($ctx5) {
return _st((function(){
-return smalltalk.withContext(function($ctx6) {
_st(snap)._modify_((function(model){
-return smalltalk.withContext(function($ctx7) {
return _st(model)._archive();
-}, function($ctx7) {$ctx7.fillBlock({model:model},$ctx1)})}));
+return smalltalk.withContext(function($ctx5) {
_st(snap)._modify_((function(model){
+return smalltalk.withContext(function($ctx6) {
return _st(model)._archive();
+}, function($ctx6) {$ctx6.fillBlock({model:model},$ctx1)})}));
 return false;
-}, function($ctx6) {$ctx6.fillBlock({},$ctx1)})}))._value();
 }, function($ctx5) {$ctx5.fillBlock({},$ctx1)})}));
 $2=_st($1)._with_("archive");
 $2;
@@ -190,12 +188,10 @@ return $6;
 }, function($ctx5) {$ctx5.fillBlock({each:each},$ctx1)})}));
 $7=_st(html)._form();
 _st($7)._onSubmit_((function(){
-return smalltalk.withContext(function($ctx5) {
return _st((function(){
-return smalltalk.withContext(function($ctx6) {
_st(snap)._modify_((function(model){
-return smalltalk.withContext(function($ctx7) {
return _st(model)._addTodo();
-}, function($ctx7) {$ctx7.fillBlock({model:model},$ctx1)})}));
+return smalltalk.withContext(function($ctx5) {
_st(snap)._modify_((function(model){
+return smalltalk.withContext(function($ctx6) {
return _st(model)._addTodo();
+}, function($ctx6) {$ctx6.fillBlock({model:model},$ctx1)})}));
 return false;
-}, function($ctx6) {$ctx6.fillBlock({},$ctx1)})}))._value();
 }, function($ctx5) {$ctx5.fillBlock({},$ctx1)})}));
 $8=_st($7)._with_((function(){
 return smalltalk.withContext(function($ctx5) {
$9=_st(html)._input();

+ 8 - 12
lib/js/Trapped-Demo.js

@@ -224,12 +224,10 @@ _st(html)._with_(" remaining [ ");
 $1=_st(html)._a();
 _st($1)._href_("");
 _st($1)._onClick_((function(){
-return smalltalk.withContext(function($ctx5) {
return _st((function(){
-return smalltalk.withContext(function($ctx6) {
_st(snap)._modify_((function(model){
-return smalltalk.withContext(function($ctx7) {
return _st(model)._archive();
-}, function($ctx7) {$ctx7.fillBlock({model:model},$ctx1)})}));
+return smalltalk.withContext(function($ctx5) {
_st(snap)._modify_((function(model){
+return smalltalk.withContext(function($ctx6) {
return _st(model)._archive();
+}, function($ctx6) {$ctx6.fillBlock({model:model},$ctx1)})}));
 return false;
-}, function($ctx6) {$ctx6.fillBlock({},$ctx1)})}))._value();
 }, function($ctx5) {$ctx5.fillBlock({},$ctx1)})}));
 $2=_st($1)._with_("archive");
 $2;
@@ -249,12 +247,10 @@ return $6;
 }, function($ctx5) {$ctx5.fillBlock({each:each},$ctx1)})}));
 $7=_st(html)._form();
 _st($7)._onSubmit_((function(){
-return smalltalk.withContext(function($ctx5) {
return _st((function(){
-return smalltalk.withContext(function($ctx6) {
_st(snap)._modify_((function(model){
-return smalltalk.withContext(function($ctx7) {
return _st(model)._addTodo();
-}, function($ctx7) {$ctx7.fillBlock({model:model},$ctx1)})}));
+return smalltalk.withContext(function($ctx5) {
_st(snap)._modify_((function(model){
+return smalltalk.withContext(function($ctx6) {
return _st(model)._addTodo();
+}, function($ctx6) {$ctx6.fillBlock({model:model},$ctx1)})}));
 return false;
-}, function($ctx6) {$ctx6.fillBlock({},$ctx1)})}))._value();
 }, function($ctx5) {$ctx5.fillBlock({},$ctx1)})}));
 $8=_st($7)._with_((function(){
 return smalltalk.withContext(function($ctx5) {
$9=_st(html)._input();
@@ -277,8 +273,8 @@ return smalltalk.withContext(function($ctx3) {
return _st(html)._with_("Loading
 }, function($ctx2) {$ctx2.fillBlock({snap:snap},$ctx1)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html}, smalltalk.AppView)})},
 args: ["html"],
-source: "renderOn: html\x0a    #() trapDescend: [ :snap |\x0a\x09html h2 trap: #(#title).\x0a    html div trap: #(#todos) toggle: [ snap do: [\x0a        html span trap:#(#remaining).\x0a        html with: ' of '.\x0a        html span trap: #(#todos #size).\x0a        html with: ' remaining [ '.\x0a        html a href:''; onClick: [[\x0a            snap modify: [ :model | model archive ].\x0a            false\x0a        ] value \x22amber GH-314 workaround\x22]; with: 'archive'.\x0a        html with: ' ]'.\x0a        html ul trapIter: #(#todos) tag: #li do: [ :each |\x0a            html root empty.\x0a            html input type: 'checkbox'; trap: #('done').\x0a            html span trap: #('done') read: [ :model | html root class: 'done-', model ]; trap: #('text').\x0a        ].\x0a        html form onSubmit: [[\x0a            snap modify: [ :model | model addTodo ].\x0a            false\x0a        ] value \x22amber GH-314 workaround\x22]; with: [\x0a            html input type: 'text'; trap: #(#todoText); at: 'size' put: 30; placeholder: 'add new todo here'.\x0a            html input class: 'btn-primary'; type: 'submit'; value: 'add'.\x0a        ].\x0a    ]] ifNotPresent: [ html with: 'Loading ...' ]]",
-messageSends: ["trapDescend:", "trap:", "h2", "trap:toggle:ifNotPresent:", "do:", "span", "with:", "href:", "a", "onClick:", "value", "modify:", "archive", "trapIter:tag:do:", "empty", "root", "type:", "input", "trap:read:", "class:", ",", "ul", "onSubmit:", "addTodo", "form", "at:put:", "placeholder:", "value:", "div"],
+source: "renderOn: html\x0a    #() trapDescend: [ :snap |\x0a\x09html h2 trap: #(#title).\x0a    html div trap: #(#todos) toggle: [ snap do: [\x0a        html span trap:#(#remaining).\x0a        html with: ' of '.\x0a        html span trap: #(#todos #size).\x0a        html with: ' remaining [ '.\x0a        html a href:''; onClick: [\x0a            snap modify: [ :model | model archive ].\x0a            false\x0a        ]; with: 'archive'.\x0a        html with: ' ]'.\x0a        html ul trapIter: #(#todos) tag: #li do: [ :each |\x0a            html root empty.\x0a            html input type: 'checkbox'; trap: #('done').\x0a            html span trap: #('done') read: [ :model | html root class: 'done-', model ]; trap: #('text').\x0a        ].\x0a        html form onSubmit: [\x0a            snap modify: [ :model | model addTodo ].\x0a            false\x0a        ]; with: [\x0a            html input type: 'text'; trap: #(#todoText); at: 'size' put: 30; placeholder: 'add new todo here'.\x0a            html input class: 'btn-primary'; type: 'submit'; value: 'add'.\x0a        ].\x0a    ]] ifNotPresent: [ html with: 'Loading ...' ]]",
+messageSends: ["trapDescend:", "trap:", "h2", "trap:toggle:ifNotPresent:", "do:", "span", "with:", "href:", "a", "onClick:", "modify:", "archive", "trapIter:tag:do:", "empty", "root", "type:", "input", "trap:read:", "class:", ",", "ul", "onSubmit:", "addTodo", "form", "at:put:", "placeholder:", "value:", "div"],
 referencedClasses: []
 }),
 smalltalk.AppView);

+ 4 - 4
lib/st/Trapped-Demo.st

@@ -154,20 +154,20 @@ renderOn: html
         html with: ' of '.
         html span trap: #(#todos #size).
         html with: ' remaining [ '.
-        html a href:''; onClick: [[
+        html a href:''; onClick: [
             snap modify: [ :model | model archive ].
             false
-        ] value "amber GH-314 workaround"]; with: 'archive'.
+        ]; with: 'archive'.
         html with: ' ]'.
         html ul trapIter: #(#todos) tag: #li do: [ :each |
             html root empty.
             html input type: 'checkbox'; trap: #('done').
             html span trap: #('done') read: [ :model | html root class: 'done-', model ]; trap: #('text').
         ].
-        html form onSubmit: [[
+        html form onSubmit: [
             snap modify: [ :model | model addTodo ].
             false
-        ] value "amber GH-314 workaround"]; with: [
+        ]; with: [
             html input type: 'text'; trap: #(#todoText); at: 'size' put: 30; placeholder: 'add new todo here'.
             html input class: 'btn-primary'; type: 'submit'; value: 'add'.
         ].