Browse Source

Merging and fixing deploy files properly, perhaps I missed something but I think it all is correct.

Göran Krampe 12 years ago
parent
commit
dc82ec6633

+ 14 - 35
js/Benchfib.deploy.js

@@ -4,16 +4,13 @@ smalltalk.addMethod(
 '_main',
 smalltalk.method({
 selector: 'main',
-category: 'not yet classified',
 fn: function (){
 var self=this;
 var result=nil;
 result=smalltalk.send((0), "_tinyBenchmarks", []);
 smalltalk.send(console, "_log_", [smalltalk.send(unescape("0%20tinyBenchmarks%20%3D%3E%20"), "__plus", [result])]);
-return self;},
-source: unescape('main%0A%0A%09%7C%20result%20%7C%0A%09result%20%3A%3D%200%20tinyBenchmarks.%0A%09console%20log%3A%20%270%20tinyBenchmarks%20%3D%3E%20%27%20+%20result'),
-messageSends: ["tinyBenchmarks", "log:", unescape("+")],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Benchfib.klass);
 
@@ -22,14 +19,11 @@ smalltalk.addMethod(
 '_benchFib',
 smalltalk.method({
 selector: 'benchFib',
-category: '*Benchfib',
 fn: function (){
 var self=this;
 return smalltalk.send(smalltalk.send(self, "__lt", [(2)]), "_ifTrue_ifFalse_", [(function(){return (1);}), (function(){return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "__minus", [(1)]), "_benchFib", []), "__plus", [smalltalk.send(smalltalk.send(self, "__minus", [(2)]), "_benchFib", [])]), "__plus", [(1)]);})]);
-return self;},
-source: unescape('benchFib%0A%09%22Handy%20send-heavy%20benchmark%22%0A%09%22%28result%20//%20seconds%20to%20run%29%20%3D%20approx%20calls%20per%20second%22%0A%09%22%20%7C%20r%20t%20%7C%0A%09%20%20t%20%3A%3D%20Time%20millisecondsToRun%3A%20%5Br%20%3A%3D%2026%20benchFib%5D.%0A%09%20%20%28r%20*%201000%29%20//%20t%22%0A%09%22138000%20on%20a%20Mac%208100/100%22%0A%09%5E%20self%20%3C%202%0A%09%09ifTrue%3A%20%5B1%5D%20%0A%09%09ifFalse%3A%20%5B%28self-1%29%20benchFib%20+%20%28self-2%29%20benchFib%20+%201%5D'),
-messageSends: ["ifTrue:ifFalse:", unescape("%3C"), unescape("+"), "benchFib", unescape("-")],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Number);
 
@@ -37,7 +31,6 @@ smalltalk.addMethod(
 '_benchmark',
 smalltalk.method({
 selector: 'benchmark',
-category: '*Benchfib',
 fn: function (){
 var self=this;
 var size=nil;
@@ -48,10 +41,8 @@ var count=nil;
 size=(8190);
 smalltalk.send((1), "_to_do_", [self, (function(iter){count=(0);flags=smalltalk.send(smalltalk.Array, "_new", []);smalltalk.send(size, "_timesRepeat_", [(function(){return smalltalk.send(flags, "_add_", [true]);})]);return smalltalk.send((1), "_to_do_", [size, (function(i){return smalltalk.send(smalltalk.send(flags, "_at_", [i]), "_ifTrue_", [(function(){prime=smalltalk.send(i, "__plus", [(1)]);k=smalltalk.send(i, "__plus", [prime]);smalltalk.send((function(){return smalltalk.send(k, "__lt_eq", [size]);}), "_whileTrue_", [(function(){smalltalk.send(flags, "_at_put_", [k, false]);return k=smalltalk.send(k, "__plus", [prime]);})]);return count=smalltalk.send(count, "__plus", [(1)]);})]);})]);})]);
 return count;
-return self;},
-source: unescape('benchmark%20%20%22Handy%20bytecode-heavy%20benchmark%22%0A%09%22%28500000%20//%20time%20to%20run%29%20%3D%20approx%20bytecodes%20per%20second%22%0A%09%225000000%20//%20%28Time%20millisecondsToRun%3A%20%5B10%20benchmark%5D%29%20*%201000%22%0A%09%223059000%20on%20a%20Mac%208100/100%22%0A%20%20%20%20%7C%20size%20flags%20prime%20k%20count%20%7C%0A%20%20%20%20size%20%3A%3D%208190.%0A%20%20%20%201%20to%3A%20self%20do%3A%0A%20%20%20%20%20%20%20%20%5B%3Aiter%20%7C%0A%20%20%20%20%20%20%20%20count%20%3A%3D%200.%0A%20%20%20%20%20%20%20%20flags%20%3A%3D%20Array%20new.%0A%20%20%20%20%20%20%20%20size%20timesRepeat%3A%20%5B%20flags%20add%3A%20true%5D.%0A%20%20%20%20%20%20%20%201%20to%3A%20size%20do%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%5B%3Ai%20%7C%20%28flags%20at%3A%20i%29%20ifTrue%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5Bprime%20%3A%3D%20i+1.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20k%20%3A%3D%20i%20+%20prime.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5Bk%20%3C%3D%20size%5D%20whileTrue%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5Bflags%20at%3A%20k%20put%3A%20false.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20k%20%3A%3D%20k%20+%20prime%5D.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20count%20%3A%3D%20count%20+%201%5D%5D%5D.%0A%20%20%20%20%5E%20count'),
-messageSends: ["to:do:", "new", "timesRepeat:", "add:", "ifTrue:", "at:", unescape("+"), "whileTrue:", unescape("%3C%3D"), "at:put:"],
-referencedClasses: [smalltalk.Array]
+return self;}
+]
 }),
 smalltalk.Number);
 
@@ -59,7 +50,6 @@ smalltalk.addMethod(
 '_tinyBenchmarks',
 smalltalk.method({
 selector: 'tinyBenchmarks',
-category: '*Benchfib',
 fn: function (){
 var self=this;
 var t1=nil;
@@ -72,10 +62,8 @@ smalltalk.send((function(){t1=smalltalk.send(smalltalk.Date, "_millisecondsToRun
 n2=(28);
 smalltalk.send((function(){t2=smalltalk.send(smalltalk.Date, "_millisecondsToRun_", [(function(){return r=smalltalk.send(n2, "_benchFib", []);})]);return smalltalk.send(t2, "__lt", [(1000)]);}), "_whileTrue_", [(function(){return n2=smalltalk.send(n2, "__plus", [(1)]);})]);
 return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(n1, "__star", [(500000)]), "__star", [(1000)]), "__slash", [t1]), "_printString", []), "__comma", [unescape("%20bytecodes/sec%3B%20")]), "__comma", [smalltalk.send(smalltalk.send(smalltalk.send(r, "__star", [(1000)]), "__slash", [t2]), "_printString", [])]), "__comma", [unescape("%20sends/sec")]);
-return self;},
-source: unescape('tinyBenchmarks%0A%09%22Report%20the%20results%20of%20running%20the%20two%20tiny%20Squeak%20benchmarks.%0A%09ar%209/10/1999%3A%20Adjusted%20to%20run%20at%20least%201%20sec%20to%20get%20more%20stable%20results%22%0A%09%220%20tinyBenchmarks%22%0A%09%22On%20a%20292%20MHz%20G3%20Mac%3A%2022727272%20bytecodes/sec%3B%20984169%20sends/sec%22%0A%09%22On%20a%20400%20MHz%20PII/Win98%3A%20%2018028169%20bytecodes/sec%3B%201081272%20sends/sec%22%0A%09%7C%20t1%20t2%20r%20n1%20n2%20%7C%0A%09n1%20%3A%3D%201.%0A%09%5Bt1%20%3A%3D%20Date%20millisecondsToRun%3A%20%5Bn1%20benchmark%5D.%0A%09t1%20%3C%201000%5D%20whileTrue%3A%5Bn1%20%3A%3D%20n1%20*%202%5D.%20%22Note%3A%20%23benchmark%27s%20runtime%20is%20about%20O%28n%29%22%0A%0A%09n2%20%3A%3D%2028.%0A%09%5Bt2%20%3A%3D%20Date%20millisecondsToRun%3A%20%5Br%20%3A%3D%20n2%20benchFib%5D.%0A%09t2%20%3C%201000%5D%20whileTrue%3A%5Bn2%20%3A%3D%20n2%20+%201%5D.%20%0A%09%22Note%3A%20%23benchFib%27s%20runtime%20is%20about%20O%28k%5En%29%2C%0A%09%09where%20k%20is%20the%20golden%20number%20%3D%20%281%20+%205%20sqrt%29%20/%202%20%3D%201.618....%22%0A%0A%09%5E%20%28%28n1%20*%20500000%20*%201000%29%20/%20t1%29%20printString%2C%20%27%20bytecodes/sec%3B%20%27%2C%0A%09%20%20%28%28r%20*%201000%29%20/%20t2%29%20printString%2C%20%27%20sends/sec%27'),
-messageSends: ["whileTrue:", "millisecondsToRun:", "benchmark", unescape("%3C"), unescape("*"), "benchFib", unescape("+"), unescape("%2C"), "printString", unescape("/")],
-referencedClasses: [smalltalk.Date]
+return self;}
+]
 }),
 smalltalk.Number);
 
@@ -83,17 +71,14 @@ smalltalk.addMethod(
 '_jsbenchFib',
 smalltalk.method({
 selector: 'jsbenchFib',
-category: '*Benchfib',
 fn: function (){
 var self=this;
 if (this < 2) {
 return 1;
 } else {
 return (this-1)._jsbenchFib() + (this-2)._jsbenchFib() + 1;};
-return self;},
-source: unescape('jsbenchFib%0A%20%0A%09%3Cif%20%28this%20%3C%202%29%20%7B%0Areturn%201%3B%0A%7D%20else%20%7B%0Areturn%20%28this-1%29._jsbenchFib%28%29%20+%20%28this-2%29._jsbenchFib%28%29%20+%201%3B%7D%3E'),
-messageSends: [],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Number);
 
@@ -101,7 +86,6 @@ smalltalk.addMethod(
 '_jsbenchmark',
 smalltalk.method({
 selector: 'jsbenchmark',
-category: '*Benchfib',
 fn: function (){
 var self=this;
 
@@ -126,10 +110,8 @@ for (var z=0;z<this;z++) {
   }
 }
 return count;
-return self;},
-source: unescape('jsbenchmark%0A%0A%3C%0Avar%20size%20%3D%208190%3B%0Avar%20count%3B%0Afor%20%28var%20z%3D0%3Bz%3Cthis%3Bz++%29%20%7B%0A%20%20count%20%3D%200%3B%0A%20%20var%20flags%20%3D%20new%20Array%28%29%3B%0A%20%20for%20%28var%20p%3D0%3B%20p%3Csize%3B%20p++%29%20%7B%0A%20%20%20%20flags%5Bp%5D%20%3D%20true%3B%0A%20%20%7D%0A%20%20for%20%28var%20i%3D1%3Bi%3C%3Dsize%3Bi++%29%20%7B%0A%20%20%20%20if%20%28flags%5Bi-1%5D%29%20%7B%0A%20%20%20%20%20%20var%20prime%20%3D%20i+1%3B%0A%20%20%20%20%20%20var%20k%20%3D%20i%20+%20prime%3B%0A%20%20%20%20%20%20while%20%28k%20%3C%3D%20size%29%20%7B%0A%20%20%20%20%20%20%20%20flags%5Bk-1%5D%20%3D%20false%3B%0A%20%20%20%20%20%20%20%20k%20%3D%20k%20+%20prime%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20count%20%3D%20count%20+%201%3B%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D%0Areturn%20count%3E'),
-messageSends: [],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Number);
 
@@ -137,7 +119,6 @@ smalltalk.addMethod(
 '_jstinyBenchmarks',
 smalltalk.method({
 selector: 'jstinyBenchmarks',
-category: '*Benchfib',
 fn: function (){
 var self=this;
 var t1=nil;
@@ -150,10 +131,8 @@ smalltalk.send((function(){t1=smalltalk.send(smalltalk.Date, "_millisecondsToRun
 n2=(28);
 smalltalk.send((function(){t2=smalltalk.send(smalltalk.Date, "_millisecondsToRun_", [(function(){return r=smalltalk.send(n2, "_jsbenchFib", []);})]);return smalltalk.send(t2, "__lt", [(1000)]);}), "_whileTrue_", [(function(){return n2=smalltalk.send(n2, "__plus", [(1)]);})]);
 return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(n1, "__star", [(500000)]), "__star", [(1000)]), "__slash", [t1]), "_printString", []), "__comma", [unescape("%20bytecodes/sec%3B%20")]), "__comma", [smalltalk.send(smalltalk.send(smalltalk.send(r, "__star", [(1000)]), "__slash", [t2]), "_printString", [])]), "__comma", [unescape("%20sends/sec")]);
-return self;},
-source: unescape('jstinyBenchmarks%0A%09%220%20jstinyBenchmarks%22%0A%0A%09%7C%20t1%20t2%20r%20n1%20n2%20%7C%0A%09n1%20%3A%3D%201.%0A%09%5Bt1%20%3A%3D%20Date%20millisecondsToRun%3A%20%5Bn1%20jsbenchmark%5D.%0A%09t1%20%3C%201000%5D%20whileTrue%3A%5Bn1%20%3A%3D%20n1%20*%202%5D.%20%22Note%3A%20%23benchmark%27s%20runtime%20is%20about%20O%28n%29%22%0A%0A%09n2%20%3A%3D%2028.%0A%09%5Bt2%20%3A%3D%20Date%20millisecondsToRun%3A%20%5Br%20%3A%3D%20n2%20jsbenchFib%5D.%0A%09t2%20%3C%201000%5D%20whileTrue%3A%5Bn2%20%3A%3D%20n2%20+%201%5D.%20%0A%09%22Note%3A%20%23jsbenchFib%27s%20runtime%20is%20about%20O%28k%5En%29%2C%0A%09%09where%20k%20is%20the%20golden%20number%20%3D%20%281%20+%205%20sqrt%29%20/%202%20%3D%201.618....%22%0A%0A%09%5E%20%28%28n1%20*%20500000%20*%201000%29%20/%20t1%29%20printString%2C%20%27%20bytecodes/sec%3B%20%27%2C%0A%09%20%20%28%28r%20*%201000%29%20/%20t2%29%20printString%2C%20%27%20sends/sec%27'),
-messageSends: ["whileTrue:", "millisecondsToRun:", "jsbenchmark", unescape("%3C"), unescape("*"), "jsbenchFib", unescape("+"), unescape("%2C"), "printString", unescape("/")],
-referencedClasses: [smalltalk.Date]
+return self;}
+]
 }),
 smalltalk.Number);
 

File diff suppressed because it is too large
+ 118 - 295
js/Canvas.deploy.js


+ 75 - 0
js/Canvas.js

@@ -753,6 +753,36 @@ referencedClasses: []
 }),
 smalltalk.HTMLCanvas);
 
+smalltalk.addMethod(
+'_script',
+smalltalk.method({
+selector: 'script',
+category: 'tags',
+fn: function (){
+var self=this;
+return smalltalk.send(self, "_tag_", ["script"]);
+return self;},
+source: unescape('script%0A%20%20%20%20%5Eself%20tag%3A%20%27script%27'),
+messageSends: ["tag:"],
+referencedClasses: []
+}),
+smalltalk.HTMLCanvas);
+
+smalltalk.addMethod(
+'_link',
+smalltalk.method({
+selector: 'link',
+category: 'tags',
+fn: function (){
+var self=this;
+return smalltalk.send(self, "_tag_", ["link"]);
+return self;},
+source: unescape('link%0A%20%20%20%20%5Eself%20tag%3A%20%27link%27'),
+messageSends: ["tag:"],
+referencedClasses: []
+}),
+smalltalk.HTMLCanvas);
+
 
 smalltalk.addMethod(
 '_onJQuery_',
@@ -1229,6 +1259,51 @@ referencedClasses: []
 }),
 smalltalk.TagBrush);
 
+smalltalk.addMethod(
+'_type_',
+smalltalk.method({
+selector: 'type:',
+category: 'attributes',
+fn: function (aString){
+var self=this;
+smalltalk.send(self, "_at_put_", ["type", aString]);
+return self;},
+source: unescape('type%3A%20aString%0A%20%20%20%20self%20at%3A%20%27type%27%20put%3A%20aString'),
+messageSends: ["at:put:"],
+referencedClasses: []
+}),
+smalltalk.TagBrush);
+
+smalltalk.addMethod(
+'_media_',
+smalltalk.method({
+selector: 'media:',
+category: 'attributes',
+fn: function (aString){
+var self=this;
+smalltalk.send(self, "_at_put_", ["media", aString]);
+return self;},
+source: unescape('media%3A%20aString%0A%20%20%20%20self%20at%3A%20%27media%27%20put%3A%20aString'),
+messageSends: ["at:put:"],
+referencedClasses: []
+}),
+smalltalk.TagBrush);
+
+smalltalk.addMethod(
+'_rel_',
+smalltalk.method({
+selector: 'rel:',
+category: 'attributes',
+fn: function (aString){
+var self=this;
+smalltalk.send(self, "_at_put_", ["rel", aString]);
+return self;},
+source: unescape('rel%3A%20aString%0A%20%20%20%20self%20%20at%3A%20%27rel%27%20put%3A%20aString'),
+messageSends: ["at:put:"],
+referencedClasses: []
+}),
+smalltalk.TagBrush);
+
 
 smalltalk.addMethod(
 '_fromString_canvas_',

File diff suppressed because it is too large
+ 118 - 295
js/Compiler.deploy.js


+ 100 - 250
js/Examples.deploy.js

@@ -3,15 +3,12 @@ smalltalk.addMethod(
 '_increase',
 smalltalk.method({
 selector: 'increase',
-category: 'actions',
 fn: function (){
 var self=this;
 self['@count']=smalltalk.send(self['@count'], "__plus", [(1)]);
 smalltalk.send(self['@header'], "_contents_", [(function(html){return smalltalk.send(html, "_with_", [smalltalk.send(self['@count'], "_asString", [])]);})]);
-return self;},
-source: unescape('increase%0A%20%20%20%20count%20%3A%3D%20count%20+%201.%0A%20%20%20%20header%20contents%3A%20%5B%3Ahtml%20%7C%20html%20with%3A%20count%20asString%5D'),
-messageSends: [unescape("+"), "contents:", "with:", "asString"],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Counter);
 
@@ -19,15 +16,12 @@ smalltalk.addMethod(
 '_decrease',
 smalltalk.method({
 selector: 'decrease',
-category: 'actions',
 fn: function (){
 var self=this;
 self['@count']=smalltalk.send(self['@count'], "__minus", [(1)]);
 smalltalk.send(self['@header'], "_contents_", [(function(html){return smalltalk.send(html, "_with_", [smalltalk.send(self['@count'], "_asString", [])]);})]);
-return self;},
-source: unescape('decrease%0A%20%20%20%20count%20%3A%3D%20count%20-%201.%0A%20%20%20%20header%20contents%3A%20%5B%3Ahtml%20%7C%20html%20with%3A%20count%20asString%5D'),
-messageSends: [unescape("-"), "contents:", "with:", "asString"],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Counter);
 
@@ -35,15 +29,12 @@ smalltalk.addMethod(
 '_initialize',
 smalltalk.method({
 selector: 'initialize',
-category: 'initialization',
 fn: function (){
 var self=this;
 smalltalk.send(self, "_initialize", [], smalltalk.Widget);
 self['@count']=(0);
-return self;},
-source: unescape('initialize%0A%20%20%20%20super%20initialize.%0A%20%20%20%20count%20%3A%3D%200'),
-messageSends: ["initialize"],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Counter);
 
@@ -51,16 +42,13 @@ smalltalk.addMethod(
 '_renderOn_',
 smalltalk.method({
 selector: 'renderOn:',
-category: 'rendering',
 fn: function (html){
 var self=this;
 self['@header']=(function($rec){smalltalk.send($rec, "_with_", [smalltalk.send(self['@count'], "_asString", [])]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(html, "_h1", []));
 (function($rec){smalltalk.send($rec, "_with_", [unescape("++")]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_increase", []);})]);})(smalltalk.send(html, "_button", []));
 (function($rec){smalltalk.send($rec, "_with_", [unescape("--")]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_decrease", []);})]);})(smalltalk.send(html, "_button", []));
-return self;},
-source: unescape('renderOn%3A%20html%0A%20%20%20%20header%20%3A%3D%20html%20h1%20%0A%09with%3A%20count%20asString%3B%0A%09yourself.%0A%20%20%20%20html%20button%0A%09with%3A%20%27++%27%3B%0A%09onClick%3A%20%5Bself%20increase%5D.%0A%20%20%20%20html%20button%0A%09with%3A%20%27--%27%3B%0A%09onClick%3A%20%5Bself%20decrease%5D'),
-messageSends: ["with:", "asString", "yourself", "h1", "onClick:", "increase", "button", "decrease"],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Counter);
 
@@ -71,14 +59,11 @@ smalltalk.addMethod(
 '_width',
 smalltalk.method({
 selector: 'width',
-category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.send(smalltalk.send(self, "_class", []), "_width", []);
-return self;},
-source: unescape('width%0A%09%5Eself%20class%20width'),
-messageSends: ["width", "class"],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Tetris);
 
@@ -86,14 +71,11 @@ smalltalk.addMethod(
 '_height',
 smalltalk.method({
 selector: 'height',
-category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.send(smalltalk.send(self, "_class", []), "_height", []);
-return self;},
-source: unescape('height%0A%09%5Eself%20class%20height'),
-messageSends: ["height", "class"],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Tetris);
 
@@ -101,14 +83,11 @@ smalltalk.addMethod(
 '_squares',
 smalltalk.method({
 selector: 'squares',
-category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.send(smalltalk.send(self, "_class", []), "_squares", []);
-return self;},
-source: unescape('squares%0A%09%5Eself%20class%20squares'),
-messageSends: ["squares", "class"],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Tetris);
 
@@ -116,14 +95,11 @@ smalltalk.addMethod(
 '_gluePiece_',
 smalltalk.method({
 selector: 'gluePiece:',
-category: 'accessing',
 fn: function (aPiece){
 var self=this;
 smalltalk.send(aPiece, "_glueOn_", [self]);
-return self;},
-source: unescape('gluePiece%3A%20aPiece%0A%09aPiece%20glueOn%3A%20self'),
-messageSends: ["glueOn:"],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Tetris);
 
@@ -131,14 +107,11 @@ smalltalk.addMethod(
 '_rows',
 smalltalk.method({
 selector: 'rows',
-category: 'accessing',
 fn: function (){
 var self=this;
 return self['@rows'];
-return self;},
-source: unescape('rows%0A%09%22An%20array%20of%20rows.%20Each%20row%20is%20a%20collection%20of%20points.%22%0A%09%5Erows'),
-messageSends: [],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Tetris);
 
@@ -146,14 +119,11 @@ smalltalk.addMethod(
 '_addRow_',
 smalltalk.method({
 selector: 'addRow:',
-category: 'accessing',
 fn: function (aCollection){
 var self=this;
 smalltalk.send(smalltalk.send(self, "_rows", []), "_add_", [aCollection]);
-return self;},
-source: unescape('addRow%3A%20aCollection%0A%09self%20rows%20add%3A%20aCollection'),
-messageSends: ["add:", "rows"],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Tetris);
 
@@ -161,16 +131,13 @@ smalltalk.addMethod(
 '_startNewGame',
 smalltalk.method({
 selector: 'startNewGame',
-category: 'actions',
 fn: function (){
 var self=this;
 smalltalk.send(self, "_newGame", []);
 smalltalk.send(self['@timer'], "_ifNotNil_", [(function(){return smalltalk.send(self['@timer'], "_clearInterval", []);})]);
 self['@timer']=smalltalk.send((function(){return smalltalk.send(self, "_nextStep", []);}), "_valueWithInterval_", [self['@speed']]);
-return self;},
-source: unescape('startNewGame%0A%09self%20newGame.%0A%09timer%20ifNotNil%3A%20%5Btimer%20clearInterval%5D.%0A%09timer%20%3A%3D%20%5Bself%20nextStep%5D%20valueWithInterval%3A%20speed'),
-messageSends: ["newGame", "ifNotNil:", "clearInterval", "valueWithInterval:", "nextStep"],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Tetris);
 
@@ -178,16 +145,13 @@ smalltalk.addMethod(
 '_nextStep',
 smalltalk.method({
 selector: 'nextStep',
-category: 'actions',
 fn: function (){
 var self=this;
 smalltalk.send(self['@movingPiece'], "_ifNil_", [(function(){return smalltalk.send(self, "_newPiece", []);})]);
 smalltalk.send(smalltalk.send(self['@movingPiece'], "_canMoveIn_", [self]), "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self['@movingPiece'], "_position_", [smalltalk.send(smalltalk.send(self['@movingPiece'], "_position", []), "__plus", [smalltalk.send((0), "__at", [(1)])])]);}), (function(){return smalltalk.send(self, "_newPiece", []);})]);
 smalltalk.send(self, "_redraw", []);
-return self;},
-source: unescape('nextStep%0A%09movingPiece%20ifNil%3A%20%5Bself%20newPiece%5D.%0A%09%28movingPiece%20canMoveIn%3A%20self%29%0A%09%09ifTrue%3A%20%5BmovingPiece%20position%3A%20movingPiece%20position%20+%20%280@1%29%5D%0A%09%09ifFalse%3A%20%5Bself%20newPiece%5D.%0A%09self%20redraw'),
-messageSends: ["ifNil:", "newPiece", "ifTrue:ifFalse:", "canMoveIn:", "position:", unescape("+"), "position", unescape("@"), "redraw"],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Tetris);
 
@@ -195,15 +159,12 @@ smalltalk.addMethod(
 '_redraw',
 smalltalk.method({
 selector: 'redraw',
-category: 'actions',
 fn: function (){
 var self=this;
 smalltalk.send(self['@renderingContext'], "_clearRectFrom_to_", [smalltalk.send((0), "__at", [smalltalk.send(self, "_width", [])]), smalltalk.send((0), "__at", [smalltalk.send(self, "_height", [])])]);
 (function($rec){smalltalk.send($rec, "_drawMap", []);return smalltalk.send($rec, "_drawPiece", []);})(self);
-return self;},
-source: unescape('redraw%0A%09renderingContext%20clearRectFrom%3A%200@%20self%20width%20to%3A%200@%20self%20height.%0A%09self%20%0A%09%09drawMap%3B%0A%09%09drawPiece'),
-messageSends: ["clearRectFrom:to:", unescape("@"), "width", "height", "drawMap", "drawPiece"],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Tetris);
 
@@ -211,7 +172,6 @@ smalltalk.addMethod(
 '_drawMap',
 smalltalk.method({
 selector: 'drawMap',
-category: 'actions',
 fn: function (){
 var self=this;
 (function($rec){smalltalk.send($rec, "_fillStyle_", [unescape("%23fafafa")]);return smalltalk.send($rec, "_fillRectFrom_to_", [smalltalk.send((0), "__at", [(0)]), smalltalk.send(smalltalk.send(self, "_width", []), "__at", [smalltalk.send(self, "_height", [])])]);})(self['@renderingContext']);
@@ -220,10 +180,8 @@ smalltalk.send((0), "_to_do_", [smalltalk.send(smalltalk.send(smalltalk.send(sel
 x=smalltalk.send(each, "__star", [smalltalk.send(smalltalk.send(self, "_class", []), "_squareSize", [])]);return smalltalk.send(self, "_drawLineFrom_to_", [smalltalk.send(x, "__at", [(0)]), smalltalk.send(x, "__at", [smalltalk.send(self, "_height", [])])]);})]);
 smalltalk.send((0), "_to_do_", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "_squares", []), "_y", []), (function(each){var y=nil;
 y=smalltalk.send(each, "__star", [smalltalk.send(smalltalk.send(self, "_class", []), "_squareSize", [])]);return smalltalk.send(self, "_drawLineFrom_to_", [smalltalk.send((0), "__at", [y]), smalltalk.send(smalltalk.send(self, "_width", []), "__at", [y])]);})]);
-return self;},
-source: unescape('drawMap%0A%09renderingContext%20%0A%09%09fillStyle%3A%20%27%23fafafa%27%3B%0A%09%09fillRectFrom%3A%200@0%20to%3A%20self%20width@self%20height.%0A%09renderingContext%20%0A%09%09lineWidth%3A%200.5%3B%0A%09%09strokeStyle%3A%20%27%23999%27.%0A%090%20to%3A%20self%20class%20squares%20x%20do%3A%20%5B%3Aeach%20%7C%20%7C%20x%20%7C%0A%09%09x%20%3A%3D%20each%20*%20self%20class%20squareSize.%0A%09%09self%20drawLineFrom%3A%20x@0%20to%3A%20x@self%20height%5D.%0A%090%20to%3A%20self%20class%20squares%20y%20do%3A%20%5B%3Aeach%20%7C%20%7C%20y%20%7C%0A%09%09y%20%3A%3D%20each%20*%20self%20class%20squareSize.%0A%09%09self%20drawLineFrom%3A%200@y%20to%3A%20self%20width@y%5D.'),
-messageSends: ["fillStyle:", "fillRectFrom:to:", unescape("@"), "width", "height", "lineWidth:", "strokeStyle:", "to:do:", "x", "squares", "class", unescape("*"), "squareSize", "drawLineFrom:to:", "y"],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Tetris);
 
@@ -231,14 +189,11 @@ smalltalk.addMethod(
 '_drawLineFrom_to_',
 smalltalk.method({
 selector: 'drawLineFrom:to:',
-category: 'actions',
 fn: function (aPoint, anotherPoint){
 var self=this;
 (function($rec){smalltalk.send($rec, "_beginPath", []);smalltalk.send($rec, "_moveTo_", [aPoint]);smalltalk.send($rec, "_lineTo_", [anotherPoint]);return smalltalk.send($rec, "_stroke", []);})(self['@renderingContext']);
-return self;},
-source: unescape('drawLineFrom%3A%20aPoint%20to%3A%20anotherPoint%0A%09renderingContext%20%0A%09%09beginPath%3B%0A%09%09moveTo%3A%20aPoint%3B%0A%09%09lineTo%3A%20anotherPoint%3B%0A%09%09stroke'),
-messageSends: ["beginPath", "moveTo:", "lineTo:", "stroke"],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Tetris);
 
@@ -246,17 +201,14 @@ smalltalk.addMethod(
 '_newGame',
 smalltalk.method({
 selector: 'newGame',
-category: 'actions',
 fn: function (){
 var self=this;
 self['@rows']=[];
 self['@movingPiece']=nil;
 self['@speed']=(200);
 self['@score']=(0);
-return self;},
-source: unescape('newGame%0A%09rows%20%3A%3D%20%23%28%29.%0A%09movingPiece%20%3A%3D%20nil.%0A%09speed%20%3A%3D%20200.%0A%09score%20%3A%3D%200'),
-messageSends: [],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Tetris);
 
@@ -264,14 +216,11 @@ smalltalk.addMethod(
 '_newPiece',
 smalltalk.method({
 selector: 'newPiece',
-category: 'actions',
 fn: function (){
 var self=this;
 self['@movingPiece']=smalltalk.send(smalltalk.TetrisPiece, "_atRandom", []);
-return self;},
-source: unescape('newPiece%0A%09movingPiece%20%3A%3D%20TetrisPiece%20atRandom'),
-messageSends: ["atRandom"],
-referencedClasses: [smalltalk.nil]
+return self;}
+]
 }),
 smalltalk.Tetris);
 
@@ -279,15 +228,12 @@ smalltalk.addMethod(
 '_drawRows',
 smalltalk.method({
 selector: 'drawRows',
-category: 'actions',
 fn: function (){
 var self=this;
 smalltalk.send(smalltalk.send(self, "_rows", []), "_do_", [(function(each){return nil;})]);
 smalltalk.send(self['@movingPiece'], "_ifNotNil_", [(function(){return smalltalk.send(self['@movingPiece'], "_drawOn_", [self['@renderingContext']]);})]);
-return self;},
-source: unescape('drawRows%0A%09self%20rows%20do%3A%20%5B%3Aeach%20%7C%5D.%0A%09movingPiece%20ifNotNil%3A%20%5BmovingPiece%20drawOn%3A%20renderingContext%5D'),
-messageSends: ["do:", "rows", "ifNotNil:", "drawOn:"],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Tetris);
 
@@ -295,14 +241,11 @@ smalltalk.addMethod(
 '_drawPiece',
 smalltalk.method({
 selector: 'drawPiece',
-category: 'actions',
 fn: function (){
 var self=this;
 smalltalk.send(self['@movingPiece'], "_ifNotNil_", [(function(){return smalltalk.send(self['@movingPiece'], "_drawOn_", [self['@renderingContext']]);})]);
-return self;},
-source: unescape('drawPiece%0A%09movingPiece%20ifNotNil%3A%20%5B%0A%09%09movingPiece%20drawOn%3A%20renderingContext%5D'),
-messageSends: ["ifNotNil:", "drawOn:"],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Tetris);
 
@@ -310,15 +253,12 @@ smalltalk.addMethod(
 '_initialize',
 smalltalk.method({
 selector: 'initialize',
-category: 'initialization',
 fn: function (){
 var self=this;
 smalltalk.send(self, "_initialize", [], smalltalk.Widget);
 smalltalk.send(self, "_newGame", []);
-return self;},
-source: unescape('initialize%0A%09super%20initialize.%0A%09self%20newGame'),
-messageSends: ["initialize", "newGame"],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Tetris);
 
@@ -326,14 +266,11 @@ smalltalk.addMethod(
 '_renderOn_',
 smalltalk.method({
 selector: 'renderOn:',
-category: 'rendering',
 fn: function (html){
 var self=this;
 (function($rec){smalltalk.send($rec, "_class_", ["tetris"]);return smalltalk.send($rec, "_with_", [(function(){smalltalk.send(smalltalk.send(html, "_h3", []), "_with_", ["Tetris"]);smalltalk.send(self, "_renderCanvasOn_", [html]);return smalltalk.send(self, "_renderButtonsOn_", [html]);})]);})(smalltalk.send(html, "_div", []));
-return self;},
-source: unescape('renderOn%3A%20html%0A%09html%20div%0A%09%09class%3A%20%27tetris%27%3B%0A%09%09with%3A%20%5B%0A%09%09%09html%20h3%20with%3A%20%27Tetris%27.%0A%09%09%09self%20renderCanvasOn%3A%20html.%0A%09%09%09self%20renderButtonsOn%3A%20html%5D'),
-messageSends: ["class:", "with:", "h3", "renderCanvasOn:", "renderButtonsOn:", "div"],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Tetris);
 
@@ -341,7 +278,6 @@ smalltalk.addMethod(
 '_renderCanvasOn_',
 smalltalk.method({
 selector: 'renderCanvasOn:',
-category: 'rendering',
 fn: function (html){
 var self=this;
 var canvas=nil;
@@ -350,10 +286,8 @@ smalltalk.send(canvas, "_at_put_", ["width", smalltalk.send(smalltalk.send(self,
 smalltalk.send(canvas, "_at_put_", ["height", smalltalk.send(smalltalk.send(self, "_height", []), "_asString", [])]);
 self['@renderingContext']=smalltalk.send(smalltalk.CanvasRenderingContext, "_tagBrush_", [canvas]);
 smalltalk.send(self, "_redraw", []);
-return self;},
-source: unescape('renderCanvasOn%3A%20html%0A%09%7C%20canvas%20%7C%0A%09canvas%20%3A%3D%20html%20canvas.%0A%09canvas%20at%3A%20%27width%27%20put%3A%20self%20width%20asString.%0A%09canvas%20at%3A%20%27height%27%20put%3A%20self%20height%20asString.%0A%09renderingContext%20%3A%3D%20CanvasRenderingContext%20tagBrush%3A%20canvas.%0A%09self%20redraw'),
-messageSends: ["canvas", "at:put:", "asString", "width", "height", "tagBrush:", "redraw"],
-referencedClasses: [smalltalk.CanvasRenderingContext]
+return self;}
+]
 }),
 smalltalk.Tetris);
 
@@ -361,14 +295,11 @@ smalltalk.addMethod(
 '_renderButtonsOn_',
 smalltalk.method({
 selector: 'renderButtonsOn:',
-category: 'rendering',
 fn: function (html){
 var self=this;
 (function($rec){smalltalk.send($rec, "_class_", ["tetris_buttons"]);return smalltalk.send($rec, "_with_", [(function(){(function($rec){smalltalk.send($rec, "_with_", ["New game"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_startNewGame", []);})]);})(smalltalk.send(html, "_button", []));return (function($rec){smalltalk.send($rec, "_with_", [unescape("play/pause")]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_update", []);})]);})(smalltalk.send(html, "_button", []));})]);})(smalltalk.send(html, "_div", []));
-return self;},
-source: unescape('renderButtonsOn%3A%20html%0A%09html%20div%20%0A%09%09class%3A%20%27tetris_buttons%27%3B%0A%09%09with%3A%20%5B%0A%09%09%09html%20button%0A%09%09%09%09with%3A%20%27New%20game%27%3B%0A%09%09%09%09onClick%3A%20%5Bself%20startNewGame%5D.%0A%09%09%09html%20button%0A%09%09%09%09with%3A%20%27play/pause%27%3B%0A%09%09%09%09onClick%3A%20%5Bself%20update%5D%5D'),
-messageSends: ["class:", "with:", "onClick:", "startNewGame", "button", "update", "div"],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Tetris);
 
@@ -377,14 +308,11 @@ smalltalk.addMethod(
 '_squareSize',
 smalltalk.method({
 selector: 'squareSize',
-category: 'accessing',
 fn: function (){
 var self=this;
 return (22);
-return self;},
-source: unescape('squareSize%0A%09%5E22'),
-messageSends: [],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Tetris.klass);
 
@@ -392,14 +320,11 @@ smalltalk.addMethod(
 '_width',
 smalltalk.method({
 selector: 'width',
-category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.send(smalltalk.send(self, "_squareSize", []), "__star", [smalltalk.send(smalltalk.send(self, "_squares", []), "_x", [])]);
-return self;},
-source: unescape('width%0A%09%5Eself%20squareSize%20*%20%28self%20squares%20x%29'),
-messageSends: [unescape("*"), "squareSize", "x", "squares"],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Tetris.klass);
 
@@ -407,14 +332,11 @@ smalltalk.addMethod(
 '_height',
 smalltalk.method({
 selector: 'height',
-category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.send(smalltalk.send(self, "_squareSize", []), "__star", [smalltalk.send(smalltalk.send(self, "_squares", []), "_y", [])]);
-return self;},
-source: unescape('height%0A%09%5Eself%20squareSize%20*%20%28self%20squares%20y%29'),
-messageSends: [unescape("*"), "squareSize", "y", "squares"],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Tetris.klass);
 
@@ -422,14 +344,11 @@ smalltalk.addMethod(
 '_squares',
 smalltalk.method({
 selector: 'squares',
-category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.send((10), "__at", [(15)]);
-return self;},
-source: unescape('squares%0A%09%5E10@15'),
-messageSends: [unescape("@")],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Tetris.klass);
 
@@ -439,14 +358,11 @@ smalltalk.addMethod(
 '_rotation',
 smalltalk.method({
 selector: 'rotation',
-category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.send(self['@rotation'], "_ifNil_", [(function(){return self['@rotation']=(1);})]);
-return self;},
-source: unescape('rotation%0A%09%5Erotation%20ifNil%3A%20%5Brotation%20%3A%3D%201%5D'),
-messageSends: ["ifNil:"],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.TetrisPiece);
 
@@ -454,14 +370,11 @@ smalltalk.addMethod(
 '_rotation_',
 smalltalk.method({
 selector: 'rotation:',
-category: 'accessing',
 fn: function (aNumber){
 var self=this;
 self['@rotation']=aNumber;
-return self;},
-source: unescape('rotation%3A%20aNumber%0A%09rotation%20%3A%3D%20aNumber'),
-messageSends: [],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.TetrisPiece);
 
@@ -469,14 +382,11 @@ smalltalk.addMethod(
 '_position',
 smalltalk.method({
 selector: 'position',
-category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.send(self['@position'], "_ifNil_", [(function(){return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.Tetris, "_squares", []), "_x", []), "__slash", [(2)]), "__minus", [(1)]), "__at", [(0)]);})]);
-return self;},
-source: unescape('position%0A%09%5Eposition%20ifNil%3A%20%5B%28Tetris%20squares%20x%20/%202%29%20-1%20@%200%5D'),
-messageSends: ["ifNil:", unescape("@"), unescape("-"), unescape("/"), "x", "squares"],
-referencedClasses: [smalltalk.Tetris]
+return self;}
+]
 }),
 smalltalk.TetrisPiece);
 
@@ -484,14 +394,11 @@ smalltalk.addMethod(
 '_position_',
 smalltalk.method({
 selector: 'position:',
-category: 'accessing',
 fn: function (aPoint){
 var self=this;
 return self['@position']=aPoint;
-return self;},
-source: unescape('position%3A%20aPoint%0A%09%5Eposition%20%3A%3D%20aPoint'),
-messageSends: [],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.TetrisPiece);
 
@@ -499,14 +406,11 @@ smalltalk.addMethod(
 '_bounds',
 smalltalk.method({
 selector: 'bounds',
-category: 'accessing',
 fn: function (){
 var self=this;
 smalltalk.send(self, "_subclassResponsibility", []);
-return self;},
-source: unescape('bounds%0A%09self%20subclassResponsibility'),
-messageSends: ["subclassResponsibility"],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.TetrisPiece);
 
@@ -514,14 +418,11 @@ smalltalk.addMethod(
 '_color',
 smalltalk.method({
 selector: 'color',
-category: 'accessing',
 fn: function (){
 var self=this;
 return unescape("%23afa");
-return self;},
-source: unescape('color%0A%09%5E%27%23afa%27'),
-messageSends: [],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.TetrisPiece);
 
@@ -529,14 +430,11 @@ smalltalk.addMethod(
 '_height',
 smalltalk.method({
 selector: 'height',
-category: 'accessing',
 fn: function (){
 var self=this;
 return (2);
-return self;},
-source: unescape('height%0A%09%5E2'),
-messageSends: [],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.TetrisPiece);
 
@@ -544,15 +442,12 @@ smalltalk.addMethod(
 '_drawOn_',
 smalltalk.method({
 selector: 'drawOn:',
-category: 'drawing',
 fn: function (aRenderingContext){
 var self=this;
 smalltalk.send(aRenderingContext, "_fillStyle_", [smalltalk.send(self, "_color", [])]);
 smalltalk.send(smalltalk.send(self, "_bounds", []), "_do_", [(function(each){return (function($rec){smalltalk.send($rec, "_fillRectFrom_to_", [smalltalk.send(smalltalk.send(each, "__plus", [smalltalk.send(self, "_position", [])]), "__star", [smalltalk.send(smalltalk.Tetris, "_squareSize", [])]), smalltalk.send(smalltalk.send((1), "__at", [(1)]), "__star", [smalltalk.send(smalltalk.Tetris, "_squareSize", [])])]);smalltalk.send($rec, "_strokeStyle_", [unescape("%23999")]);smalltalk.send($rec, "_lineWidth_", [(2)]);return smalltalk.send($rec, "_strokeRectFrom_to_", [smalltalk.send(smalltalk.send(each, "__plus", [smalltalk.send(self, "_position", [])]), "__star", [smalltalk.send(smalltalk.Tetris, "_squareSize", [])]), smalltalk.send(smalltalk.send((1), "__at", [(1)]), "__star", [smalltalk.send(smalltalk.Tetris, "_squareSize", [])])]);})(aRenderingContext);})]);
-return self;},
-source: unescape('drawOn%3A%20aRenderingContext%0A%09aRenderingContext%20fillStyle%3A%20self%20color.%0A%09self%20bounds%20do%3A%20%5B%3Aeach%20%7C%0A%09%09aRenderingContext%20%0A%09%09%09fillRectFrom%3A%20each%20+%20self%20position*%20Tetris%20squareSize%20to%3A%201@1%20*%20Tetris%20squareSize%3B%0A%09%09%09strokeStyle%3A%20%27%23999%27%3B%0A%09%09%09lineWidth%3A%202%3B%0A%09%09%09strokeRectFrom%3A%20each%20+%20self%20position*%20Tetris%20squareSize%20to%3A%201@1%20*%20Tetris%20squareSize%5D'),
-messageSends: ["fillStyle:", "color", "do:", "bounds", "fillRectFrom:to:", unescape("*"), unescape("+"), "position", "squareSize", unescape("@"), "strokeStyle:", "lineWidth:", "strokeRectFrom:to:"],
-referencedClasses: [smalltalk.Tetris]
+return self;}
+]
 }),
 smalltalk.TetrisPiece);
 
@@ -560,14 +455,11 @@ smalltalk.addMethod(
 '_canMove',
 smalltalk.method({
 selector: 'canMove',
-category: 'testing',
 fn: function (){
 var self=this;
 return smalltalk.send(smalltalk.send(smalltalk.send(self, "_position", []), "_y", []), "__lt", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.Tetris, "_squares", []), "_y", []), "__minus", [smalltalk.send(self, "_height", [])])]);
-return self;},
-source: unescape('canMove%0A%09%5Eself%20position%20y%20%3C%20%28Tetris%20squares%20y%20-%20self%20height%29'),
-messageSends: [unescape("%3C"), "y", "position", unescape("-"), "squares", "height"],
-referencedClasses: [smalltalk.Tetris]
+return self;}
+]
 }),
 smalltalk.TetrisPiece);
 
@@ -575,14 +467,11 @@ smalltalk.addMethod(
 '_canMoveIn_',
 smalltalk.method({
 selector: 'canMoveIn:',
-category: 'testing',
 fn: function (aTetris){
 var self=this;
 return smalltalk.send(smalltalk.send(smalltalk.send(self, "_position", []), "_y", []), "__lt", [smalltalk.send(smalltalk.send(smalltalk.send(aTetris, "_squares", []), "_y", []), "__minus", [smalltalk.send(self, "_height", [])])]);
-return self;},
-source: unescape('canMoveIn%3A%20aTetris%0A%09%5Eself%20position%20y%20%3C%20%28aTetris%20squares%20y%20-%20self%20height%29'),
-messageSends: [unescape("%3C"), "y", "position", unescape("-"), "squares", "height"],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.TetrisPiece);
 
@@ -591,14 +480,11 @@ smalltalk.addMethod(
 '_atRandom',
 smalltalk.method({
 selector: 'atRandom',
-category: 'instance creation',
 fn: function (){
 var self=this;
 return smalltalk.send(smalltalk.send(smalltalk.send(self, "_subclasses", []), "_at_", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_subclasses", []), "_size", []), "_atRandom", [])]), "_new", []);
-return self;},
-source: unescape('atRandom%0A%09%5E%28self%20subclasses%20at%3A%20self%20subclasses%20size%20atRandom%29%20new'),
-messageSends: ["new", "at:", "subclasses", "atRandom", "size"],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.TetrisPiece.klass);
 
@@ -608,14 +494,11 @@ smalltalk.addMethod(
 '_bounds',
 smalltalk.method({
 selector: 'bounds',
-category: 'accessing',
 fn: function (){
 var self=this;
 return (function($rec){smalltalk.send($rec, "_add_", [smalltalk.send((0), "__at", [(0)])]);smalltalk.send($rec, "_add_", [smalltalk.send((0), "__at", [(1)])]);smalltalk.send($rec, "_add_", [smalltalk.send((1), "__at", [(0)])]);smalltalk.send($rec, "_add_", [smalltalk.send((1), "__at", [(1)])]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(smalltalk.Array, "_new", []));
-return self;},
-source: unescape('bounds%0A%09%5EArray%20new%0A%09%09add%3A%200@0%3B%0A%09%09add%3A%200@1%3B%0A%09%09add%3A%201@0%3B%0A%09%09add%3A%201@1%3B%0A%09%09yourself'),
-messageSends: ["add:", unescape("@"), "yourself", "new"],
-referencedClasses: [smalltalk.Array]
+return self;}
+]
 }),
 smalltalk.TetrisPieceO);
 
@@ -626,14 +509,11 @@ smalltalk.addMethod(
 '_bounds',
 smalltalk.method({
 selector: 'bounds',
-category: 'accessing',
 fn: function (){
 var self=this;
 return (function($rec){smalltalk.send($rec, "_add_", [smalltalk.send((0), "__at", [(0)])]);smalltalk.send($rec, "_add_", [smalltalk.send((0), "__at", [(1)])]);smalltalk.send($rec, "_add_", [smalltalk.send((0), "__at", [(2)])]);smalltalk.send($rec, "_add_", [smalltalk.send((1), "__at", [(2)])]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(smalltalk.Array, "_new", []));
-return self;},
-source: unescape('bounds%0A%09%5EArray%20new%0A%09%09add%3A%200@0%3B%0A%09%09add%3A%200@1%3B%0A%09%09add%3A%200@2%3B%0A%09%09add%3A%201@2%3B%0A%09%09yourself'),
-messageSends: ["add:", unescape("@"), "yourself", "new"],
-referencedClasses: [smalltalk.Array]
+return self;}
+]
 }),
 smalltalk.TetrisPieceL);
 
@@ -641,14 +521,11 @@ smalltalk.addMethod(
 '_color',
 smalltalk.method({
 selector: 'color',
-category: 'accessing',
 fn: function (){
 var self=this;
 return unescape("%23ffa");
-return self;},
-source: unescape('color%0A%09%5E%27%23ffa%27'),
-messageSends: [],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.TetrisPieceL);
 
@@ -656,14 +533,11 @@ smalltalk.addMethod(
 '_height',
 smalltalk.method({
 selector: 'height',
-category: 'accessing',
 fn: function (){
 var self=this;
 return (3);
-return self;},
-source: unescape('height%0A%09%5E3'),
-messageSends: [],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.TetrisPieceL);
 
@@ -674,14 +548,11 @@ smalltalk.addMethod(
 '_color',
 smalltalk.method({
 selector: 'color',
-category: 'accessing',
 fn: function (){
 var self=this;
 return unescape("%23aaf");
-return self;},
-source: unescape('color%0A%09%5E%27%23aaf%27'),
-messageSends: [],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.TetrisPieceJ);
 
@@ -689,14 +560,11 @@ smalltalk.addMethod(
 '_bounds',
 smalltalk.method({
 selector: 'bounds',
-category: 'accessing',
 fn: function (){
 var self=this;
 return (function($rec){smalltalk.send($rec, "_add_", [smalltalk.send((1), "__at", [(0)])]);smalltalk.send($rec, "_add_", [smalltalk.send((1), "__at", [(1)])]);smalltalk.send($rec, "_add_", [smalltalk.send((1), "__at", [(2)])]);smalltalk.send($rec, "_add_", [smalltalk.send((0), "__at", [(2)])]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(smalltalk.Array, "_new", []));
-return self;},
-source: unescape('bounds%0A%09%5EArray%20new%0A%09%09add%3A%201@0%3B%0A%09%09add%3A%201@1%3B%0A%09%09add%3A%201@2%3B%0A%09%09add%3A%200@2%3B%0A%09%09yourself'),
-messageSends: ["add:", unescape("@"), "yourself", "new"],
-referencedClasses: [smalltalk.Array]
+return self;}
+]
 }),
 smalltalk.TetrisPieceJ);
 
@@ -704,14 +572,11 @@ smalltalk.addMethod(
 '_height',
 smalltalk.method({
 selector: 'height',
-category: 'accessing',
 fn: function (){
 var self=this;
 return (3);
-return self;},
-source: unescape('height%0A%09%5E3'),
-messageSends: [],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.TetrisPieceJ);
 
@@ -722,14 +587,11 @@ smalltalk.addMethod(
 '_color',
 smalltalk.method({
 selector: 'color',
-category: 'accessing',
 fn: function (){
 var self=this;
 return unescape("%23faa");
-return self;},
-source: unescape('color%0A%09%5E%27%23faa%27'),
-messageSends: [],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.TetrisPieceI);
 
@@ -737,14 +599,11 @@ smalltalk.addMethod(
 '_bounds',
 smalltalk.method({
 selector: 'bounds',
-category: 'accessing',
 fn: function (){
 var self=this;
 return (function($rec){smalltalk.send($rec, "_add_", [smalltalk.send((0), "__at", [(0)])]);smalltalk.send($rec, "_add_", [smalltalk.send((0), "__at", [(1)])]);smalltalk.send($rec, "_add_", [smalltalk.send((0), "__at", [(2)])]);smalltalk.send($rec, "_add_", [smalltalk.send((0), "__at", [(3)])]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(smalltalk.Array, "_new", []));
-return self;},
-source: unescape('bounds%0A%09%5EArray%20new%0A%09%09add%3A%200@0%3B%0A%09%09add%3A%200@1%3B%0A%09%09add%3A%200@2%3B%0A%09%09add%3A%200@3%3B%0A%09%09yourself'),
-messageSends: ["add:", unescape("@"), "yourself", "new"],
-referencedClasses: [smalltalk.Array]
+return self;}
+]
 }),
 smalltalk.TetrisPieceI);
 
@@ -752,14 +611,11 @@ smalltalk.addMethod(
 '_height',
 smalltalk.method({
 selector: 'height',
-category: 'accessing',
 fn: function (){
 var self=this;
 return (4);
-return self;},
-source: unescape('height%0A%09%5E4'),
-messageSends: [],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.TetrisPieceI);
 
@@ -770,14 +626,11 @@ smalltalk.addMethod(
 '_bounds',
 smalltalk.method({
 selector: 'bounds',
-category: 'accessing',
 fn: function (){
 var self=this;
 return (function($rec){smalltalk.send($rec, "_add_", [smalltalk.send((0), "__at", [(0)])]);smalltalk.send($rec, "_add_", [smalltalk.send((1), "__at", [(0)])]);smalltalk.send($rec, "_add_", [smalltalk.send((2), "__at", [(0)])]);smalltalk.send($rec, "_add_", [smalltalk.send((1), "__at", [(1)])]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(smalltalk.Array, "_new", []));
-return self;},
-source: unescape('bounds%0A%09%5EArray%20new%0A%09%09add%3A%200@0%3B%0A%09%09add%3A%201@0%3B%0A%09%09add%3A%202@0%3B%0A%09%09add%3A%201@1%3B%0A%09%09yourself'),
-messageSends: ["add:", unescape("@"), "yourself", "new"],
-referencedClasses: [smalltalk.Array]
+return self;}
+]
 }),
 smalltalk.TetrisPieceT);
 
@@ -785,14 +638,11 @@ smalltalk.addMethod(
 '_color',
 smalltalk.method({
 selector: 'color',
-category: 'accessing',
 fn: function (){
 var self=this;
 return unescape("%23aaf");
-return self;},
-source: unescape('color%0A%09%5E%27%23aaf%27'),
-messageSends: [],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.TetrisPieceT);
 

+ 42 - 0
js/JQuery-Tests.deploy.js

@@ -0,0 +1,42 @@
+smalltalk.addClass('JQueryTest', smalltalk.TestCase, ['document'], 'JQuery-Tests');
+smalltalk.addMethod(
+'_testFind',
+smalltalk.method({
+selector: 'testFind',
+fn: function (){
+var self=this;
+smalltalk.send(self, "_assert_equals_", ["James", smalltalk.send(smalltalk.send(smalltalk.send(self['@document'], "_asJQuery", []), "_find_", ["li.firstname"]), "_html", [])]);
+return self;}
+]
+}),
+smalltalk.JQueryTest);
+
+smalltalk.addMethod(
+'_setUp',
+smalltalk.method({
+selector: 'setUp',
+fn: function (){
+var self=this;
+self['@document']=unescape("%3Cdiv%20class%3D%22person%22%3E%0A%09%09%09%09%3Cul%3E%0A%09%09%09%09%09%3Cli%20class%3D%22firstname%22%3EJames%3C/li%3E%0A%09%09%09%09%09%3Cli%20class%3D%22lastname%22%3EBond%3C/li%3E%0A%09%09%09%09%3C/ul%3E%0A%09%09%09%3C/div%3E");
+return self;}
+]
+}),
+smalltalk.JQueryTest);
+
+smalltalk.addMethod(
+'_testEach',
+smalltalk.method({
+selector: 'testEach',
+fn: function (){
+var self=this;
+var classes=nil;
+classes=smalltalk.send(smalltalk.Array, "_new", []);
+smalltalk.send(smalltalk.send(smalltalk.send(self['@document'], "_asJQuery", []), "_find_", ["li"]), "_each_", [(function(index, element){return smalltalk.send(classes, "_add_", [smalltalk.send(smalltalk.send(smalltalk.JQuery, "_fromElement_", [element]), "_attr_", ["class"])]);})]);
+smalltalk.send(self, "_assert_equals_", [smalltalk.send(["firstname", "lastname"], "_printString", []), smalltalk.send(classes, "_printString", [])]);
+return self;}
+]
+}),
+smalltalk.JQueryTest);
+
+
+

+ 51 - 0
js/JQuery-Tests.js

@@ -0,0 +1,51 @@
+smalltalk.addClass('JQueryTest', smalltalk.TestCase, ['document'], 'JQuery-Tests');
+smalltalk.addMethod(
+'_testFind',
+smalltalk.method({
+selector: 'testFind',
+category: 'tests',
+fn: function (){
+var self=this;
+smalltalk.send(self, "_assert_equals_", ["James", smalltalk.send(smalltalk.send(smalltalk.send(self['@document'], "_asJQuery", []), "_find_", ["li.firstname"]), "_html", [])]);
+return self;},
+source: unescape('testFind%0A%09self%20%0A%09%09assert%3A%20%27James%27%20%0A%09%09equals%3A%20%28document%20asJQuery%20find%3A%20%27li.firstname%27%29%20html.%20'),
+messageSends: ["assert:equals:", "html", "find:", "asJQuery"],
+referencedClasses: []
+}),
+smalltalk.JQueryTest);
+
+smalltalk.addMethod(
+'_setUp',
+smalltalk.method({
+selector: 'setUp',
+category: 'running',
+fn: function (){
+var self=this;
+self['@document']=unescape("%3Cdiv%20class%3D%22person%22%3E%0A%09%09%09%09%3Cul%3E%0A%09%09%09%09%09%3Cli%20class%3D%22firstname%22%3EJames%3C/li%3E%0A%09%09%09%09%09%3Cli%20class%3D%22lastname%22%3EBond%3C/li%3E%0A%09%09%09%09%3C/ul%3E%0A%09%09%09%3C/div%3E");
+return self;},
+source: unescape('setUp%0A%09document%20%3A%3D%20%27%3Cdiv%20class%3D%22person%22%3E%0A%09%09%09%09%3Cul%3E%0A%09%09%09%09%09%3Cli%20class%3D%22firstname%22%3EJames%3C/li%3E%0A%09%09%09%09%09%3Cli%20class%3D%22lastname%22%3EBond%3C/li%3E%0A%09%09%09%09%3C/ul%3E%0A%09%09%09%3C/div%3E%27.'),
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.JQueryTest);
+
+smalltalk.addMethod(
+'_testEach',
+smalltalk.method({
+selector: 'testEach',
+category: 'tests',
+fn: function (){
+var self=this;
+var classes=nil;
+classes=smalltalk.send(smalltalk.Array, "_new", []);
+smalltalk.send(smalltalk.send(smalltalk.send(self['@document'], "_asJQuery", []), "_find_", ["li"]), "_each_", [(function(index, element){return smalltalk.send(classes, "_add_", [smalltalk.send(smalltalk.send(smalltalk.JQuery, "_fromElement_", [element]), "_attr_", ["class"])]);})]);
+smalltalk.send(self, "_assert_equals_", [smalltalk.send(["firstname", "lastname"], "_printString", []), smalltalk.send(classes, "_printString", [])]);
+return self;},
+source: unescape('testEach%0A%09%7Cclasses%7C%0A%09classes%20%3A%3D%20Array%20new.%0A%0A%09%28document%20asJQuery%20find%3A%20%27li%27%29%20each%3A%20%5B%3Aindex%20%3Aelement%7C%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09%09%20%20%09classes%20add%3A%20%28%28JQuery%20fromElement%3Aelement%29%20attr%3A%20%27class%27%29%5D.%0A%09self%20%0A%09%09assert%3A%20%23%28%27firstname%27%20%27lastname%27%29%20printString%0A%09%09equals%3A%20classes%20printString'),
+messageSends: ["new", "each:", "find:", "asJQuery", "add:", "attr:", "fromElement:", "assert:equals:", "printString"],
+referencedClasses: [smalltalk.Array,smalltalk.JQuery]
+}),
+smalltalk.JQueryTest);
+
+
+

+ 105 - 0
js/JQuery.deploy.js

@@ -615,6 +615,66 @@ referencedClasses: []
 }),
 smalltalk.JQuery);
 
+smalltalk.addMethod(
+'_do_',
+smalltalk.method({
+selector: 'do:',
+category: 'enumerating',
+fn: function (aBlock){
+var self=this;
+smalltalk.send(self, "_elementsDo_", [(function(anElement){return smalltalk.send(aBlock, "_value_", [smalltalk.send(smalltalk.JQuery, "_fromElement_", [anElement])]);})]);
+return self;},
+source: unescape('do%3A%20aBlock%0A%20%20%20%20self%20elementsDo%3A%20%5B%3AanElement%7C%20%20aBlock%20value%3A%20%28JQuery%20fromElement%3A%20anElement%29%5D'),
+messageSends: ["elementsDo:", "value:", "fromElement:"],
+referencedClasses: [smalltalk.JQuery]
+}),
+smalltalk.JQuery);
+
+smalltalk.addMethod(
+'_elementsDo_',
+smalltalk.method({
+selector: 'elementsDo:',
+category: 'private',
+fn: function (aBlock){
+var self=this;
+self['@jquery'].each(function(index, element){aBlock(element, self)});
+return self;},
+source: unescape('elementsDo%3A%20aBlock%0A%20%20%20%20%22Iterate%20over%20a%20jQuery%20object%2C%20executing%20a%20function%20for%20each%20matched%20element.%22%0A%20%20%20%20%3Cself%5B%27@jquery%27%5D.each%28function%28index%2C%20element%29%7BaBlock%28element%2C%20self%29%7D%29%3E'),
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.JQuery);
+
+smalltalk.addMethod(
+'_attrAt_put_',
+smalltalk.method({
+selector: 'attrAt:put:',
+category: 'attributes',
+fn: function (aString, anotherString){
+var self=this;
+self['@jquery'].attr(aString, anotherString);
+return self;},
+source: unescape('attrAt%3A%20aString%20put%3A%20anotherString%0A%20%20%20%20%22Set%20the%20value%20of%20an%20attribute%20for%20the%20first%20element%20in%20the%20set%20of%20matched%20elements.%22%0A%20%20%20%20%3Cself%5B%27@jquery%27%5D.attr%28aString%2C%20anotherString%29%3E'),
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.JQuery);
+
+smalltalk.addMethod(
+'_find_',
+smalltalk.method({
+selector: 'find:',
+category: 'traversing',
+fn: function (aSelector){
+var self=this;
+return smalltalk.send(self, "_call_withArgument_", ["find", aSelector]);
+return self;},
+source: unescape('find%3A%20aSelector%0A%20%20%20%20%22Get%20the%20descendants%20of%20each%20element%20in%20the%20current%20set%20of%20matched%20elements%2C%20filtered%20by%20a%20selector%2C%20jQuery%20object%2C%20or%20element.%22%0A%20%20%20%20%5E%20self%20call%3A%20%27find%27%20withArgument%3A%20aSelector'),
+messageSends: ["call:withArgument:"],
+referencedClasses: []
+}),
+smalltalk.JQuery);
+
 
 smalltalk.addMethod(
 '_fromString_',
@@ -819,6 +879,51 @@ referencedClasses: [smalltalk.Dictionary]
 }),
 smalltalk.Ajax);
 
+smalltalk.addMethod(
+'_onSuccessDo_',
+smalltalk.method({
+selector: 'onSuccessDo:',
+category: 'callbacks',
+fn: function (aBlock){
+var self=this;
+smalltalk.send(self, "_at_put_", ["success", aBlock]);
+return self;},
+source: unescape('onSuccessDo%3A%20aBlock%0A%09%22Set%20action%20to%20execute%20when%20Ajax%20request%20is%20successful.%20Pass%20received%20data%20as%20block%20argument.%20Block%20arguments%3A%20data%2C%20textStatus%2C%20jqXHR%22%0A%09self%20at%3A%20%27success%27%20put%3A%20aBlock'),
+messageSends: ["at:put:"],
+referencedClasses: []
+}),
+smalltalk.Ajax);
+
+smalltalk.addMethod(
+'_onCompleteDo_',
+smalltalk.method({
+selector: 'onCompleteDo:',
+category: 'callbacks',
+fn: function (aBlock){
+var self=this;
+smalltalk.send(self, "_at_put_", ["complete", aBlock]);
+return self;},
+source: unescape('onCompleteDo%3A%20aBlock%0A%09%22A%20block%20to%20be%20called%20when%20the%20request%20finishes%20%28after%20success%20and%20error%20callbacks%20are%20executed%29.%20Block%20arguments%3A%20jqXHR%2C%20textStatus%22%0A%09self%20at%3A%20%27complete%27%20put%3A%20aBlock'),
+messageSends: ["at:put:"],
+referencedClasses: []
+}),
+smalltalk.Ajax);
+
+smalltalk.addMethod(
+'_onErrorDo_',
+smalltalk.method({
+selector: 'onErrorDo:',
+category: 'callbacks',
+fn: function (aBlock){
+var self=this;
+smalltalk.send(self, "_at_put_", ["error", aBlock]);
+return self;},
+source: unescape('onErrorDo%3A%20aBlock%0A%09%22A%20block%20to%20be%20called%20if%20the%20request%20fails.Block%20arguments%3A%20jqXHR%2C%20textStatus%2C%20errorThrown%22%0A%09self%20at%3A%20%27error%27%20put%3A%20aBlock'),
+messageSends: ["at:put:"],
+referencedClasses: []
+}),
+smalltalk.Ajax);
+
 
 smalltalk.addMethod(
 '_url_',

+ 105 - 0
js/JQuery.js

@@ -615,6 +615,66 @@ referencedClasses: []
 }),
 smalltalk.JQuery);
 
+smalltalk.addMethod(
+'_do_',
+smalltalk.method({
+selector: 'do:',
+category: 'enumerating',
+fn: function (aBlock){
+var self=this;
+smalltalk.send(self, "_elementsDo_", [(function(anElement){return smalltalk.send(aBlock, "_value_", [smalltalk.send(smalltalk.JQuery, "_fromElement_", [anElement])]);})]);
+return self;},
+source: unescape('do%3A%20aBlock%0A%20%20%20%20self%20elementsDo%3A%20%5B%3AanElement%7C%20%20aBlock%20value%3A%20%28JQuery%20fromElement%3A%20anElement%29%5D'),
+messageSends: ["elementsDo:", "value:", "fromElement:"],
+referencedClasses: [smalltalk.JQuery]
+}),
+smalltalk.JQuery);
+
+smalltalk.addMethod(
+'_elementsDo_',
+smalltalk.method({
+selector: 'elementsDo:',
+category: 'private',
+fn: function (aBlock){
+var self=this;
+self['@jquery'].each(function(index, element){aBlock(element, self)});
+return self;},
+source: unescape('elementsDo%3A%20aBlock%0A%20%20%20%20%22Iterate%20over%20a%20jQuery%20object%2C%20executing%20a%20function%20for%20each%20matched%20element.%22%0A%20%20%20%20%3Cself%5B%27@jquery%27%5D.each%28function%28index%2C%20element%29%7BaBlock%28element%2C%20self%29%7D%29%3E'),
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.JQuery);
+
+smalltalk.addMethod(
+'_attrAt_put_',
+smalltalk.method({
+selector: 'attrAt:put:',
+category: 'attributes',
+fn: function (aString, anotherString){
+var self=this;
+self['@jquery'].attr(aString, anotherString);
+return self;},
+source: unescape('attrAt%3A%20aString%20put%3A%20anotherString%0A%20%20%20%20%22Set%20the%20value%20of%20an%20attribute%20for%20the%20first%20element%20in%20the%20set%20of%20matched%20elements.%22%0A%20%20%20%20%3Cself%5B%27@jquery%27%5D.attr%28aString%2C%20anotherString%29%3E'),
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.JQuery);
+
+smalltalk.addMethod(
+'_find_',
+smalltalk.method({
+selector: 'find:',
+category: 'traversing',
+fn: function (aSelector){
+var self=this;
+return smalltalk.send(self, "_call_withArgument_", ["find", aSelector]);
+return self;},
+source: unescape('find%3A%20aSelector%0A%20%20%20%20%22Get%20the%20descendants%20of%20each%20element%20in%20the%20current%20set%20of%20matched%20elements%2C%20filtered%20by%20a%20selector%2C%20jQuery%20object%2C%20or%20element.%22%0A%20%20%20%20%5E%20self%20call%3A%20%27find%27%20withArgument%3A%20aSelector'),
+messageSends: ["call:withArgument:"],
+referencedClasses: []
+}),
+smalltalk.JQuery);
+
 
 smalltalk.addMethod(
 '_fromString_',
@@ -819,6 +879,51 @@ referencedClasses: [smalltalk.Dictionary]
 }),
 smalltalk.Ajax);
 
+smalltalk.addMethod(
+'_onSuccessDo_',
+smalltalk.method({
+selector: 'onSuccessDo:',
+category: 'callbacks',
+fn: function (aBlock){
+var self=this;
+smalltalk.send(self, "_at_put_", ["success", aBlock]);
+return self;},
+source: unescape('onSuccessDo%3A%20aBlock%0A%09%22Set%20action%20to%20execute%20when%20Ajax%20request%20is%20successful.%20Pass%20received%20data%20as%20block%20argument.%20Block%20arguments%3A%20data%2C%20textStatus%2C%20jqXHR%22%0A%09self%20at%3A%20%27success%27%20put%3A%20aBlock'),
+messageSends: ["at:put:"],
+referencedClasses: []
+}),
+smalltalk.Ajax);
+
+smalltalk.addMethod(
+'_onCompleteDo_',
+smalltalk.method({
+selector: 'onCompleteDo:',
+category: 'callbacks',
+fn: function (aBlock){
+var self=this;
+smalltalk.send(self, "_at_put_", ["complete", aBlock]);
+return self;},
+source: unescape('onCompleteDo%3A%20aBlock%0A%09%22A%20block%20to%20be%20called%20when%20the%20request%20finishes%20%28after%20success%20and%20error%20callbacks%20are%20executed%29.%20Block%20arguments%3A%20jqXHR%2C%20textStatus%22%0A%09self%20at%3A%20%27complete%27%20put%3A%20aBlock'),
+messageSends: ["at:put:"],
+referencedClasses: []
+}),
+smalltalk.Ajax);
+
+smalltalk.addMethod(
+'_onErrorDo_',
+smalltalk.method({
+selector: 'onErrorDo:',
+category: 'callbacks',
+fn: function (aBlock){
+var self=this;
+smalltalk.send(self, "_at_put_", ["error", aBlock]);
+return self;},
+source: unescape('onErrorDo%3A%20aBlock%0A%09%22A%20block%20to%20be%20called%20if%20the%20request%20fails.Block%20arguments%3A%20jqXHR%2C%20textStatus%2C%20errorThrown%22%0A%09self%20at%3A%20%27error%27%20put%3A%20aBlock'),
+messageSends: ["at:put:"],
+referencedClasses: []
+}),
+smalltalk.Ajax);
+
 
 smalltalk.addMethod(
 '_url_',

+ 55 - 0
js/Kernel-Tests.deploy.js

@@ -0,0 +1,55 @@
+smalltalk.addClass('StringTest', smalltalk.TestCase, [], 'Kernel-Tests');
+smalltalk.addMethod(
+'_testJoin',
+smalltalk.method({
+selector: 'testJoin',
+fn: function (){
+var self=this;
+smalltalk.send(self, "_assert_equals_", [unescape("hello%2Cworld"), smalltalk.send(unescape("%2C"), "_join_", [["hello", "world"]])]);
+return self;}
+]
+}),
+smalltalk.StringTest);
+
+smalltalk.addMethod(
+'_testStreamContents',
+smalltalk.method({
+selector: 'testStreamContents',
+fn: function (){
+var self=this;
+smalltalk.send(self, "_assert_equals_", ["hello world", smalltalk.send(smalltalk.String, "_streamContents_", [(function(aStream){return (function($rec){smalltalk.send($rec, "_nextPutAll_", ["hello"]);smalltalk.send($rec, "_space", []);return smalltalk.send($rec, "_nextPutAll_", ["world"]);})(aStream);})])]);
+return self;}
+]
+}),
+smalltalk.StringTest);
+
+smalltalk.addMethod(
+'_testIncludesSubString',
+smalltalk.method({
+selector: 'testIncludesSubString',
+fn: function (){
+var self=this;
+smalltalk.send(self, "_assert_", [smalltalk.send("jtalk", "_includesSubString_", ["alk"])]);
+smalltalk.send(self, "_deny_", [smalltalk.send("jtalk", "_includesSubString_", ["zork"])]);
+return self;}
+]
+}),
+smalltalk.StringTest);
+
+
+
+smalltalk.addClass('DictionaryTest', smalltalk.TestCase, [], 'Kernel-Tests');
+smalltalk.addMethod(
+'_testPrintString',
+smalltalk.method({
+selector: 'testPrintString',
+fn: function (){
+var self=this;
+smalltalk.send(self, "_assert_equals_", [unescape("a%20Dictionary%28%27firstname%27%20-%3E%20%27James%27%20%2C%20%27lastname%27%20-%3E%20%27Bond%27%29"), (function($rec){smalltalk.send($rec, "_at_put_", ["firstname", "James"]);smalltalk.send($rec, "_at_put_", ["lastname", "Bond"]);return smalltalk.send($rec, "_printString", []);})(smalltalk.send(smalltalk.Dictionary, "_new", []))]);
+return self;}
+]
+}),
+smalltalk.DictionaryTest);
+
+
+

+ 67 - 0
js/Kernel-Tests.js

@@ -0,0 +1,67 @@
+smalltalk.addClass('StringTest', smalltalk.TestCase, [], 'Kernel-Tests');
+smalltalk.addMethod(
+'_testJoin',
+smalltalk.method({
+selector: 'testJoin',
+category: 'tests',
+fn: function (){
+var self=this;
+smalltalk.send(self, "_assert_equals_", [unescape("hello%2Cworld"), smalltalk.send(unescape("%2C"), "_join_", [["hello", "world"]])]);
+return self;},
+source: unescape('testJoin%0A%09self%20assert%3A%20%27hello%2Cworld%27%20equals%3A%20%28%27%2C%27%20join%3A%20%23%28%27hello%27%20%27world%27%29%29'),
+messageSends: ["assert:equals:", "join:"],
+referencedClasses: []
+}),
+smalltalk.StringTest);
+
+smalltalk.addMethod(
+'_testStreamContents',
+smalltalk.method({
+selector: 'testStreamContents',
+category: 'tests',
+fn: function (){
+var self=this;
+smalltalk.send(self, "_assert_equals_", ["hello world", smalltalk.send(smalltalk.String, "_streamContents_", [(function(aStream){return (function($rec){smalltalk.send($rec, "_nextPutAll_", ["hello"]);smalltalk.send($rec, "_space", []);return smalltalk.send($rec, "_nextPutAll_", ["world"]);})(aStream);})])]);
+return self;},
+source: unescape('testStreamContents%0A%09self%20%0A%09%09assert%3A%20%27hello%20world%27%20%0A%09%09equals%3A%20%28String%20streamContents%3A%20%5B%3AaStream%7C%20aStream%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09%09%09%09%09nextPutAll%3A%20%27hello%27%3B%20space%3B%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09%09%09%09%09nextPutAll%3A%20%27world%27%5D%29%20'),
+messageSends: ["assert:equals:", "streamContents:", "nextPutAll:", "space"],
+referencedClasses: [smalltalk.String]
+}),
+smalltalk.StringTest);
+
+smalltalk.addMethod(
+'_testIncludesSubString',
+smalltalk.method({
+selector: 'testIncludesSubString',
+category: 'tests',
+fn: function (){
+var self=this;
+smalltalk.send(self, "_assert_", [smalltalk.send("jtalk", "_includesSubString_", ["alk"])]);
+smalltalk.send(self, "_deny_", [smalltalk.send("jtalk", "_includesSubString_", ["zork"])]);
+return self;},
+source: unescape('testIncludesSubString%0A%09self%20assert%3A%20%28%27jtalk%27%20includesSubString%3A%20%27alk%27%29.%0A%09self%20deny%3A%20%28%27jtalk%27%20includesSubString%3A%20%27zork%27%29.'),
+messageSends: ["assert:", "includesSubString:", "deny:"],
+referencedClasses: []
+}),
+smalltalk.StringTest);
+
+
+
+smalltalk.addClass('DictionaryTest', smalltalk.TestCase, [], 'Kernel-Tests');
+smalltalk.addMethod(
+'_testPrintString',
+smalltalk.method({
+selector: 'testPrintString',
+category: 'tests',
+fn: function (){
+var self=this;
+smalltalk.send(self, "_assert_equals_", [unescape("a%20Dictionary%28%27firstname%27%20-%3E%20%27James%27%20%2C%20%27lastname%27%20-%3E%20%27Bond%27%29"), (function($rec){smalltalk.send($rec, "_at_put_", ["firstname", "James"]);smalltalk.send($rec, "_at_put_", ["lastname", "Bond"]);return smalltalk.send($rec, "_printString", []);})(smalltalk.send(smalltalk.Dictionary, "_new", []))]);
+return self;},
+source: unescape('testPrintString%0A%09self%20%0A%09%09assert%3A%20%27a%20Dictionary%28%27%27firstname%27%27%20-%3E%20%27%27James%27%27%20%2C%20%27%27lastname%27%27%20-%3E%20%27%27Bond%27%27%29%27%20%0A%09%09equals%3A%20%28Dictionary%20new%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09at%3A%27firstname%27%20put%3A%20%27James%27%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09at%3A%27lastname%27%20put%3A%20%27Bond%27%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09printString%29'),
+messageSends: ["assert:equals:", "at:put:", "printString", "new"],
+referencedClasses: [smalltalk.Dictionary]
+}),
+smalltalk.DictionaryTest);
+
+
+

+ 111 - 0
js/Kernel.deploy.js

@@ -1555,6 +1555,42 @@ return self;}
 }),
 smalltalk.Number);
 
+smalltalk.addMethod(
+'_modulo_',
+smalltalk.method({
+selector: 'modulo:',
+fn: function (aNumber){
+var self=this;
+return self % aNumber;
+return self;}
+]
+}),
+smalltalk.Number);
+
+smalltalk.addMethod(
+'_even',
+smalltalk.method({
+selector: 'even',
+fn: function (){
+var self=this;
+return smalltalk.send((0), "__eq", [smalltalk.send(self, "_modulo_", [(2)])]);
+return self;}
+]
+}),
+smalltalk.Number);
+
+smalltalk.addMethod(
+'_odd',
+smalltalk.method({
+selector: 'odd',
+fn: function (){
+var self=this;
+return smalltalk.send(smalltalk.send(self, "_even", []), "_not", []);
+return self;}
+]
+}),
+smalltalk.Number);
+
 
 smalltalk.addMethod(
 '_pi',
@@ -1702,6 +1738,18 @@ return self;}
 }),
 smalltalk.BlockClosure);
 
+smalltalk.addMethod(
+'_printString',
+smalltalk.method({
+selector: 'printString',
+fn: function (){
+var self=this;
+return smalltalk.send(smalltalk.String, "_streamContents_", [(function(aStream){return (function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(self, "_printString", [], smalltalk.Object)]);smalltalk.send($rec, "_nextPutAll_", [unescape("%28")]);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(self, "_compiledSource", [])]);smalltalk.send($rec, "_nextPutAll_", [unescape("%29")]);return smalltalk.send($rec, "_cr", []);})(aStream);})]);
+return self;}
+]
+}),
+smalltalk.BlockClosure);
+
 
 
 smalltalk.addClass('Boolean', smalltalk.Object, [], 'Kernel');
@@ -3591,6 +3639,30 @@ return self;}
 }),
 smalltalk.String);
 
+smalltalk.addMethod(
+'_join_',
+smalltalk.method({
+selector: 'join:',
+fn: function (aCollection){
+var self=this;
+return smalltalk.send(smalltalk.String, "_streamContents_", [(function(stream){return smalltalk.send(aCollection, "_do_separatedBy_", [(function(each){return smalltalk.send(stream, "_nextPutAll_", [smalltalk.send(each, "_asString", [])]);}), (function(){return smalltalk.send(stream, "_nextPutAll_", [self]);})]);})]);
+return self;}
+]
+}),
+smalltalk.String);
+
+smalltalk.addMethod(
+'_includesSubString_',
+smalltalk.method({
+selector: 'includesSubString:',
+fn: function (subString){
+var self=this;
+ return self.indexOf(subString) != -1 ;
+return self;}
+]
+}),
+smalltalk.String);
+
 
 smalltalk.addMethod(
 '_streamClass',
@@ -3676,6 +3748,21 @@ return self;}
 }),
 smalltalk.String.klass);
 
+smalltalk.addMethod(
+'_streamContents_',
+smalltalk.method({
+selector: 'streamContents:',
+fn: function (blockWithArg){
+var self=this;
+var stream=nil;
+stream=smalltalk.send(smalltalk.send(self, "_streamClass", []), "_on_", [smalltalk.send(smalltalk.String, "_new", [])]);
+smalltalk.send(blockWithArg, "_value_", [stream]);
+return smalltalk.send(stream, "_contents", []);
+return self;}
+]
+}),
+smalltalk.String.klass);
+
 
 smalltalk.addClass('Array', smalltalk.SequenceableCollection, [], 'Kernel');
 smalltalk.addMethod(
@@ -4538,6 +4625,18 @@ return self;}
 }),
 smalltalk.Dictionary);
 
+smalltalk.addMethod(
+'_printString',
+smalltalk.method({
+selector: 'printString',
+fn: function (){
+var self=this;
+return smalltalk.send(smalltalk.String, "_streamContents_", [(function(aStream){(function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(self, "_printString", [], smalltalk.Collection)]);return smalltalk.send($rec, "_nextPutAll_", [unescape("%28")]);})(aStream);smalltalk.send(smalltalk.send(self, "_associations", []), "_do_separatedBy_", [(function(anAssociation){return (function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(anAssociation, "_key", []), "_printString", [])]);smalltalk.send($rec, "_nextPutAll_", [unescape("%20-%3E%20")]);return smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(anAssociation, "_value", []), "_printString", [])]);})(aStream);}), (function(){return smalltalk.send(aStream, "_nextPutAll_", [unescape("%20%2C%20")]);})]);return smalltalk.send(aStream, "_nextPutAll_", [unescape("%29")]);})]);
+return self;}
+]
+}),
+smalltalk.Dictionary);
+
 
 
 smalltalk.addClass('ClassBuilder', smalltalk.Object, [], 'Kernel');
@@ -5055,6 +5154,18 @@ return self;}
 }),
 smalltalk.StringStream);
 
+smalltalk.addMethod(
+'_space',
+smalltalk.method({
+selector: 'space',
+fn: function (){
+var self=this;
+smalltalk.send(self, "_nextPut_", [" "]);
+return self;}
+]
+}),
+smalltalk.StringStream);
+
 
 
 smalltalk.addClass('ClassCommentReader', smalltalk.Object, ['class', 'chunkParser'], 'Kernel');

File diff suppressed because it is too large
+ 117 - 0
js/Kernel.js


File diff suppressed because it is too large
+ 114 - 285
js/Parser.deploy.js


+ 15 - 0
js/SUnit.deploy.js

@@ -166,6 +166,21 @@ referencedClasses: []
 }),
 smalltalk.TestCase);
 
+smalltalk.addMethod(
+'_assert_equals_',
+smalltalk.method({
+selector: 'assert:equals:',
+category: 'testing',
+fn: function (expected, actual){
+var self=this;
+return smalltalk.send(self, "_assert_", [smalltalk.send(expected, "__eq", [actual])]);
+return self;},
+source: unescape('assert%3A%20expected%20equals%3A%20actual%0A%09%5E%20self%20assert%3A%20%28expected%20%3D%20actual%29'),
+messageSends: ["assert:", unescape("%3D")],
+referencedClasses: []
+}),
+smalltalk.TestCase);
+
 
 
 smalltalk.addClass('ExampleTest', smalltalk.TestCase, ['test'], 'SUnit');

+ 15 - 0
js/SUnit.js

@@ -166,6 +166,21 @@ referencedClasses: []
 }),
 smalltalk.TestCase);
 
+smalltalk.addMethod(
+'_assert_equals_',
+smalltalk.method({
+selector: 'assert:equals:',
+category: 'testing',
+fn: function (expected, actual){
+var self=this;
+return smalltalk.send(self, "_assert_", [smalltalk.send(expected, "__eq", [actual])]);
+return self;},
+source: unescape('assert%3A%20expected%20equals%3A%20actual%0A%09%5E%20self%20assert%3A%20%28expected%20%3D%20actual%29'),
+messageSends: ["assert:", unescape("%3D")],
+referencedClasses: []
+}),
+smalltalk.TestCase);
+
 
 
 smalltalk.addClass('ExampleTest', smalltalk.TestCase, ['test'], 'SUnit');

+ 3 - 1
js/jtalk.js

@@ -20,7 +20,7 @@
     }
 
     function loadDependencies() {
-	loadJS('lib/jQuery/jquery-1.4.4.min.js');
+	loadJS('lib/jQuery/jquery-1.6.2.min.js');
 	loadJS('lib/jQuery/jquery-ui-1.8.9.custom.min.js');
     }
 
@@ -47,6 +47,8 @@
 	loadJS("SUnit.js");
 	loadJS("Examples.js");
 	loadJS("Benchfib.js");
+	loadJS("Kernel-Tests.js");
+	loadJS("JQuery-Tests.js");
 
 	if(files) {
 	    for(var i=0; i < files.length; i++) {

File diff suppressed because it is too large
+ 15 - 0
js/lib/jQuery/jquery-1.6.2.min.js


+ 20 - 0
st/Canvas.st

@@ -221,6 +221,14 @@ code
 
 br
     ^self tag: 'br'
+!
+
+script
+    ^self tag: 'script'
+!
+
+link
+    ^self tag: 'link'
 ! !
 
 !HTMLCanvas class methodsFor: 'instance creation'!
@@ -314,6 +322,18 @@ title: aString
 
 style: aString
     self at: 'style' put: aString
+!
+
+type: aString
+    self at: 'type' put: aString
+!
+
+media: aString
+    self at: 'media' put: aString
+!
+
+rel: aString
+    self  at: 'rel' put: aString
 ! !
 
 !TagBrush methodsFor: 'converting'!

+ 34 - 0
st/JQuery-Tests.st

@@ -0,0 +1,34 @@
+TestCase subclass: #JQueryTest
+	instanceVariableNames: 'document'
+	category: 'JQuery-Tests'!
+
+!JQueryTest methodsFor: 'running'!
+
+setUp
+	document := '<div class="person">
+				<ul>
+					<li class="firstname">James</li>
+					<li class="lastname">Bond</li>
+				</ul>
+			</div>'.
+! !
+
+!JQueryTest methodsFor: 'tests'!
+
+testFind
+	self 
+		assert: 'James' 
+		equals: (document asJQuery find: 'li.firstname') html.
+!
+
+testEach
+	|classes|
+	classes := Array new.
+
+	(document asJQuery find: 'li') each: [:index :element|   
+                                              		  	classes add: ((JQuery fromElement:element) attr: 'class')].
+	self 
+		assert: #('firstname' 'lastname') printString
+		equals: classes printString
+! !
+

+ 40 - 0
st/JQuery.st

@@ -53,6 +53,11 @@ val
 
 val: aString
     self call: 'val' withArgument: aString
+!
+
+attrAt: aString put: anotherString
+    "Set the value of an attribute for the first element in the set of matched elements."
+    <self['@jquery'].attr(aString, anotherString)>
 ! !
 
 !JQuery methodsFor: 'css'!
@@ -156,6 +161,12 @@ scrollTop: anInteger
     self call: 'scrollTop' withArgument: anInteger
 ! !
 
+!JQuery methodsFor: 'enumerating'!
+
+do: aBlock
+    self elementsDo: [:anElement|  aBlock value: (JQuery fromElement: anElement)]
+! !
+
 !JQuery methodsFor: 'events'!
 
 focus
@@ -198,6 +209,11 @@ call: aString
 
 call: aString withArgument: anObject
     <return self['@jquery'][aString](anObject)>
+!
+
+elementsDo: aBlock
+    "Iterate over a jQuery object, executing a function for each matched element."
+    <self['@jquery'].each(function(index, element){aBlock(element, self)})>
 ! !
 
 !JQuery methodsFor: 'testing'!
@@ -207,6 +223,13 @@ hasClass: aString
     ^self call: 'hasClass' withArgument: aString
 ! !
 
+!JQuery methodsFor: 'traversing'!
+
+find: aSelector
+    "Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element."
+    ^ self call: 'find' withArgument: aSelector
+! !
+
 !JQuery class methodsFor: 'instance creation'!
 
 fromString: aString
@@ -276,6 +299,23 @@ send
     <jQuery.ajax(self['@settings'])>
 ! !
 
+!Ajax methodsFor: 'callbacks'!
+
+onSuccessDo: aBlock
+	"Set action to execute when Ajax request is successful. Pass received data as block argument. Block arguments: data, textStatus, jqXHR"
+	self at: 'success' put: aBlock
+!
+
+onCompleteDo: aBlock
+	"A block to be called when the request finishes (after success and error callbacks are executed). Block arguments: jqXHR, textStatus"
+	self at: 'complete' put: aBlock
+!
+
+onErrorDo: aBlock
+	"A block to be called if the request fails.Block arguments: jqXHR, textStatus, errorThrown"
+	self at: 'error' put: aBlock
+! !
+
 !Ajax methodsFor: 'initialization'!
 
 initialize

+ 38 - 0
st/Kernel-Tests.st

@@ -0,0 +1,38 @@
+TestCase subclass: #StringTest
+	instanceVariableNames: ''
+	category: 'Kernel-Tests'!
+
+!StringTest methodsFor: 'tests'!
+
+testJoin
+	self assert: 'hello,world' equals: (',' join: #('hello' 'world'))
+!
+
+testStreamContents
+	self 
+		assert: 'hello world' 
+		equals: (String streamContents: [:aStream| aStream 
+                                                 					nextPutAll: 'hello'; space; 
+                                                 					nextPutAll: 'world'])
+!
+
+testIncludesSubString
+	self assert: ('jtalk' includesSubString: 'alk').
+	self deny: ('jtalk' includesSubString: 'zork').
+! !
+
+TestCase subclass: #DictionaryTest
+	instanceVariableNames: ''
+	category: 'Kernel-Tests'!
+
+!DictionaryTest methodsFor: 'tests'!
+
+testPrintString
+	self 
+		assert: 'a Dictionary(''firstname'' -> ''James'' , ''lastname'' -> ''Bond'')' 
+		equals: (Dictionary new 
+                         	at:'firstname' put: 'James';
+                        	at:'lastname' put: 'Bond';
+                        	printString)
+! !
+

+ 68 - 0
st/Kernel.st

@@ -555,6 +555,10 @@ max: aNumber
 
 min: aNumber
 	<return Math.min(self, aNumber);>
+!
+
+modulo: aNumber
+	<return self % aNumber>
 ! !
 
 !Number methodsFor: 'comparing'!
@@ -652,6 +656,14 @@ printString
 
 isNumber
 	^true
+!
+
+even
+	^ 0 = (self modulo: 2)
+!
+
+odd
+	^ self even not
 ! !
 
 !Number methodsFor: 'timeouts/intervals'!
@@ -721,6 +733,19 @@ valueWithPossibleArguments: aCollection
 	<return self.apply(null, aCollection);>
 ! !
 
+!BlockClosure methodsFor: 'printing'!
+
+printString
+	^ String streamContents: [:aStream| 
+                                  aStream 
+                                  	nextPutAll: super printString;
+                                  	nextPutAll: '(';
+                                  	nextPutAll: self compiledSource;
+                                  	nextPutAll: ')';
+                                  	cr.
+           ]
+! !
+
 !BlockClosure methodsFor: 'timeout/interval'!
 
 valueWithTimeout: aNumber
@@ -1523,10 +1548,23 @@ trimBoth: separators
     	^(self trimLeft: separators) trimRight: separators
 ! !
 
+!String methodsFor: 'split join'!
+
+join: aCollection 
+	^ String
+		streamContents: [:stream | aCollection
+				do: [:each | stream nextPutAll: each asString] 
+				separatedBy: [stream nextPutAll: self]]
+! !
+
 !String methodsFor: 'testing'!
 
 isString
     	^true
+!
+
+includesSubString: subString
+	< return self.indexOf(subString) !!= -1 >
 ! !
 
 !String class methodsFor: 'accessing'!
@@ -1559,6 +1597,13 @@ crlf
 
 fromString: aString
 	    <return new self.fn(aString)>
+!
+
+streamContents: blockWithArg
+	|stream|
+	stream := (self streamClass on: String new).
+	blockWithArg value: stream.
+	^ stream contents
 ! !
 
 SequenceableCollection subclass: #Array
@@ -1966,6 +2011,25 @@ initialize
     	keys := #()
 ! !
 
+!Dictionary methodsFor: 'printing'!
+
+printString
+	^ String streamContents: [:aStream|  
+                                  		aStream 
+                                  			nextPutAll: super printString;
+                                  			nextPutAll: '('.
+                                  		self associations 
+                                  			do: [:anAssociation|  
+                                                                      	aStream 
+                                                                      		nextPutAll: anAssociation key printString;
+                                                                      		nextPutAll: ' -> ';
+                                                                      		nextPutAll: anAssociation value printString]
+                                  
+                                 			separatedBy: [aStream nextPutAll: ' , '].
+                                  		aStream nextPutAll: ')'.
+                                 ]
+! !
+
 Object subclass: #ClassBuilder
 	instanceVariableNames: ''
 	category: 'Kernel'!
@@ -2211,6 +2275,10 @@ crlf
 
 lf
 	^self nextPutAll: String lf
+!
+
+space
+	self nextPut: ' '
 ! !
 
 Object subclass: #ClassCommentReader

+ 4 - 0
st/SUnit.st

@@ -66,6 +66,10 @@ assert: aBoolean
 
 deny: aBoolean
 	self assert: aBoolean not
+!
+
+assert: expected equals: actual
+	^ self assert: (expected = actual)
 ! !
 
 TestCase subclass: #ExampleTest

Some files were not shown because too many files changed in this diff