2
0
Prechádzať zdrojové kódy

- Support for #doesNotUnderstand using decoupled message sends.
- Recompile all classes
- Better looking (and commented!) boot.js

Nicolas Petton 13 rokov pred
rodič
commit
0572dd4c69
9 zmenil súbory, kde vykonal 2139 pridanie a 2142 odobranie
  1. 255 317
      js/Canvas.js
  2. 257 318
      js/Compiler.js
  3. 226 274
      js/Examples.js
  4. 291 336
      js/IDE.js
  5. 188 234
      js/JQuery.js
  6. 147 126
      js/Kernel.js
  7. 273 330
      js/Parser.js
  8. 226 96
      js/boot.js
  9. 276 111
      js/jtalk.js

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 255 - 317
js/Canvas.js


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 257 - 318
js/Compiler.js


+ 226 - 274
js/Examples.js

@@ -4,12 +4,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'initialize',
 category: 'initialization',
-fn: function () {
-    var self = this;
-    self.klass.superclass.fn.prototype._initialize.apply(self, []);
-    self['@count'] = 0;
-    return self;
-},
+fn: function (){
+var self=this;
+self.klass.superclass.fn.prototype['_initialize'].apply(self, []);
+self['@count']=(0);
+return self;},
 source: unescape('initialize%0A%20%20%20%20super%20initialize.%0A%20%20%20%20count%20%3A%3D%200%0A')}),
 smalltalk.Counter);
 
@@ -18,13 +17,12 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'renderOn:',
 category: 'rendering',
-fn: function (html) {
-    var self = this;
-    html._h1()._with_(self['@count']._asString());
-    (function ($rec) {$rec._with_(unescape("++"));return $rec._onClick_(function () {return self._increase();});}(html._button()));
-    (function ($rec) {$rec._with_(unescape("--"));return $rec._onClick_(function () {return self._decrease();});}(html._button()));
-    return self;
-},
+fn: function (html){
+var self=this;
+smalltalk.send(smalltalk.send(html, "_h1", []), "_with_", [smalltalk.send(self['@count'], "_asString", [])]);
+(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%20html%20h1%20with%3A%20count%20asString.%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%0A')}),
 smalltalk.Counter);
 
@@ -33,12 +31,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'increase',
 category: 'actions',
-fn: function () {
-    var self = this;
-    self['@count'] = self['@count'].__plus(1);
-    self._update();
-    return self;
-},
+fn: function (){
+var self=this;
+self['@count']=smalltalk.send(self['@count'], "__plus", [(1)]);
+smalltalk.send(self, "_update", []);
+return self;},
 source: unescape('increase%0A%20%20%20%20count%20%3A%3D%20count%20+%201.%0A%20%20%20%20self%20update%0A')}),
 smalltalk.Counter);
 
@@ -47,12 +44,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'decrease',
 category: 'actions',
-fn: function () {
-    var self = this;
-    self['@count'] = self['@count'].__minus(1);
-    self._update();
-    return self;
-},
+fn: function (){
+var self=this;
+self['@count']=smalltalk.send(self['@count'], "__minus", [(1)]);
+smalltalk.send(self, "_update", []);
+return self;},
 source: unescape('decrease%0A%20%20%20%20count%20%3A%3D%20count%20-%201.%0A%20%20%20%20self%20update%0A')}),
 smalltalk.Counter);
 
@@ -64,11 +60,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'renderOn:',
 category: 'rendering',
-fn: function (html) {
-    var self = this;
-    (function ($rec) {$rec._class_("tetris");return $rec._with_(function () {html._h3()._with_("Tetris");self._renderCanvasOn_(html);return self._renderButtonsOn_(html);});}(html._div()));
-    return self;
-},
+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')}),
 smalltalk.Tetris);
 
@@ -77,16 +72,15 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'renderCanvasOn:',
 category: 'rendering',
-fn: function (html) {
-    var self = this;
-    var canvas = nil;
-    canvas = html._canvas();
-    canvas._at_put_("width", self._width()._asString());
-    canvas._at_put_("height", self._height()._asString());
-    self['@renderingContext'] = smalltalk.CanvasRenderingContext._tagBrush_(canvas);
-    self._redraw();
-    return self;
-},
+fn: function (html){
+var self=this;
+var canvas=nil;
+canvas=smalltalk.send(html, "_canvas", []);
+smalltalk.send(canvas, "_at_put_", ["width", smalltalk.send(smalltalk.send(self, "_width", []), "_asString", [])]);
+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')}),
 smalltalk.Tetris);
 
@@ -95,11 +89,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'renderButtonsOn:',
 category: 'rendering',
-fn: function (html) {
-    var self = this;
-    (function ($rec) {$rec._class_("tetris_buttons");return $rec._with_(function () {(function ($rec) {$rec._with_("New game");return $rec._onClick_(function () {return self._startNewGame();});}(html._button()));return function ($rec) {$rec._with_(unescape("play/pause"));return $rec._onClick_(function () {return self._update();});}(html._button());});}(html._div()));
-    return self;
-},
+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')}),
 smalltalk.Tetris);
 
@@ -108,12 +101,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'initialize',
 category: 'initialization',
-fn: function () {
-    var self = this;
-    self.klass.superclass.fn.prototype._initialize.apply(self, []);
-    self._newGame();
-    return self;
-},
+fn: function (){
+var self=this;
+self.klass.superclass.fn.prototype['_initialize'].apply(self, []);
+smalltalk.send(self, "_newGame", []);
+return self;},
 source: unescape('initialize%0A%09super%20initialize.%0A%09self%20newGame')}),
 smalltalk.Tetris);
 
@@ -122,13 +114,12 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'startNewGame',
 category: 'actions',
-fn: function () {
-    var self = this;
-    self._newGame();
-    self['@timer']._ifNotNil_(function () {return self['@timer']._clearInterval();});
-    self['@timer'] = function () {return self._nextStep();}._valueWithInterval_(self['@speed']);
-    return self;
-},
+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')}),
 smalltalk.Tetris);
 
@@ -137,11 +128,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'width',
 category: 'accessing',
-fn: function () {
-    var self = this;
-    return self._class()._width();
-    return self;
-},
+fn: function (){
+var self=this;
+return smalltalk.send(smalltalk.send(self, "_class", []), "_width", []);
+return self;},
 source: unescape('width%0A%09%5Eself%20class%20width')}),
 smalltalk.Tetris);
 
@@ -150,11 +140,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'height',
 category: 'accessing',
-fn: function () {
-    var self = this;
-    return self._class()._height();
-    return self;
-},
+fn: function (){
+var self=this;
+return smalltalk.send(smalltalk.send(self, "_class", []), "_height", []);
+return self;},
 source: unescape('height%0A%09%5Eself%20class%20height')}),
 smalltalk.Tetris);
 
@@ -163,13 +152,12 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'nextStep',
 category: 'actions',
-fn: function () {
-    var self = this;
-    self['@movingPiece']._ifNil_(function () {return self._newPiece();});
-    self['@movingPiece']._canMoveIn_(self)._ifTrue_ifFalse_(function () {return self['@movingPiece']._position_(self['@movingPiece']._position().__plus((0).__at(1)));}, function () {return self._newPiece();});
-    self._redraw();
-    return self;
-},
+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%0A%09')}),
 smalltalk.Tetris);
 
@@ -178,12 +166,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'redraw',
 category: 'actions',
-fn: function () {
-    var self = this;
-    self['@renderingContext']._clearRectFrom_to_((0).__at(self._width()), (0).__at(self._height()));
-    (function ($rec) {$rec._drawMap();return $rec._drawPiece();}(self));
-    return self;
-},
+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')}),
 smalltalk.Tetris);
 
@@ -192,14 +179,15 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'drawMap',
 category: 'actions',
-fn: function () {
-    var self = this;
-    (function ($rec) {$rec._fillStyle_(unescape("%23fafafa"));return $rec._fillRectFrom_to_((0).__at(0), self._width().__at(self._height()));}(self['@renderingContext']));
-    (function ($rec) {$rec._lineWidth_(0.5);return $rec._strokeStyle_(unescape("%23999"));}(self['@renderingContext']));
-    (0)._to_do_(self._class()._squares()._x(), function (each) {var x = nil;x = each.__star(self._class()._squareSize());return self._drawLineFrom_to_(x.__at(0), x.__at(self._height()));});
-    (0)._to_do_(self._class()._squares()._y(), function (each) {var y = nil;y = each.__star(self._class()._squareSize());return self._drawLineFrom_to_((0).__at(y), self._width().__at(y));});
-    return self;
-},
+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']);
+(function($rec){smalltalk.send($rec, "_lineWidth_", [(0.5)]);return smalltalk.send($rec, "_strokeStyle_", [unescape("%23999")]);})(self['@renderingContext']);
+smalltalk.send((0), "_to_do_", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "_squares", []), "_x", []), (function(each){var x=nil;
+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.')}),
 smalltalk.Tetris);
 
@@ -208,11 +196,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'drawLineFrom:to:',
 category: 'actions',
-fn: function (aPoint, anotherPoint) {
-    var self = this;
-    (function ($rec) {$rec._beginPath();$rec._moveTo_(aPoint);$rec._lineTo_(anotherPoint);return $rec._stroke();}(self['@renderingContext']));
-    return self;
-},
+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')}),
 smalltalk.Tetris);
 
@@ -221,14 +208,13 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'newGame',
 category: 'actions',
-fn: function () {
-    var self = this;
-    self['@rows'] = [];
-    self['@movingPiece'] = nil;
-    self['@speed'] = 200;
-    self['@score'] = 0;
-    return self;
-},
+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')}),
 smalltalk.Tetris);
 
@@ -237,11 +223,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'newPiece',
 category: 'actions',
-fn: function () {
-    var self = this;
-    self['@movingPiece'] = smalltalk.TetrisPiece._atRandom();
-    return self;
-},
+fn: function (){
+var self=this;
+self['@movingPiece']=smalltalk.send(smalltalk.TetrisPiece, "_atRandom", []);
+return self;},
 source: unescape('newPiece%0A%09movingPiece%20%3A%3D%20TetrisPiece%20atRandom')}),
 smalltalk.Tetris);
 
@@ -250,11 +235,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'squares',
 category: 'accessing',
-fn: function () {
-    var self = this;
-    return self._class()._squares();
-    return self;
-},
+fn: function (){
+var self=this;
+return smalltalk.send(smalltalk.send(self, "_class", []), "_squares", []);
+return self;},
 source: unescape('squares%0A%09%5Eself%20class%20squares')}),
 smalltalk.Tetris);
 
@@ -263,11 +247,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'gluePiece:',
 category: 'accessing',
-fn: function (aPiece) {
-    var self = this;
-    aPiece._glueOn_(self);
-    return self;
-},
+fn: function (aPiece){
+var self=this;
+smalltalk.send(aPiece, "_glueOn_", [self]);
+return self;},
 source: unescape('gluePiece%3A%20aPiece%0A%09aPiece%20glueOn%3A%20self%0A%09')}),
 smalltalk.Tetris);
 
@@ -276,12 +259,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'drawRows',
 category: 'actions',
-fn: function () {
-    var self = this;
-    self._rows()._do_(function (each) {return nil;});
-    self['@movingPiece']._ifNotNil_(function () {return self['@movingPiece']._drawOn_(self['@renderingContext']);});
-    return self;
-},
+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')}),
 smalltalk.Tetris);
 
@@ -290,11 +272,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'drawPiece',
 category: 'actions',
-fn: function () {
-    var self = this;
-    self['@movingPiece']._ifNotNil_(function () {return self['@movingPiece']._drawOn_(self['@renderingContext']);});
-    return self;
-},
+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')}),
 smalltalk.Tetris);
 
@@ -303,11 +284,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'rows',
 category: 'accessing',
-fn: function () {
-    var self = this;
-    return self['@rows'];
-    return self;
-},
+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')}),
 smalltalk.Tetris);
 
@@ -316,11 +296,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'addRow:',
 category: 'accessing',
-fn: function (aCollection) {
-    var self = this;
-    self._rows()._add_(aCollection);
-    return self;
-},
+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')}),
 smalltalk.Tetris);
 
@@ -330,11 +309,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'squareSize',
 category: 'accessing',
-fn: function () {
-    var self = this;
-    return 22;
-    return self;
-},
+fn: function (){
+var self=this;
+return (22);
+return self;},
 source: unescape('squareSize%0A%09%5E22')}),
 smalltalk.Tetris.klass);
 
@@ -343,11 +321,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'width',
 category: 'accessing',
-fn: function () {
-    var self = this;
-    return self._squareSize().__star(self._squares()._x());
-    return self;
-},
+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')}),
 smalltalk.Tetris.klass);
 
@@ -356,11 +333,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'height',
 category: 'accessing',
-fn: function () {
-    var self = this;
-    return self._squareSize().__star(self._squares()._y());
-    return self;
-},
+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')}),
 smalltalk.Tetris.klass);
 
@@ -369,11 +345,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'squares',
 category: 'accessing',
-fn: function () {
-    var self = this;
-    return (10).__at(15);
-    return self;
-},
+fn: function (){
+var self=this;
+return smalltalk.send((10), "__at", [(15)]);
+return self;},
 source: unescape('squares%0A%09%5E10@15')}),
 smalltalk.Tetris.klass);
 
@@ -384,12 +359,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'drawOn:',
 category: 'drawing',
-fn: function (aRenderingContext) {
-    var self = this;
-    aRenderingContext._fillStyle_(self._color());
-    self._bounds()._do_(function (each) {return function ($rec) {$rec._fillRectFrom_to_(each.__plus(self._position()).__star(smalltalk.Tetris._squareSize()), (1).__at(1).__star(smalltalk.Tetris._squareSize()));$rec._strokeStyle_(unescape("%23999"));$rec._lineWidth_(2);return $rec._strokeRectFrom_to_(each.__plus(self._position()).__star(smalltalk.Tetris._squareSize()), (1).__at(1).__star(smalltalk.Tetris._squareSize()));}(aRenderingContext);});
-    return self;
-},
+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')}),
 smalltalk.TetrisPiece);
 
@@ -398,11 +372,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'rotation',
 category: 'accessing',
-fn: function () {
-    var self = this;
-    return self['@rotation']._ifNil_(function () {return self['@rotation'] = 1;});
-    return self;
-},
+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')}),
 smalltalk.TetrisPiece);
 
@@ -411,11 +384,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'rotation:',
 category: 'accessing',
-fn: function (aNumber) {
-    var self = this;
-    self['@rotation'] = aNumber;
-    return self;
-},
+fn: function (aNumber){
+var self=this;
+self['@rotation']=aNumber;
+return self;},
 source: unescape('rotation%3A%20aNumber%0A%09rotation%20%3A%3D%20aNumber')}),
 smalltalk.TetrisPiece);
 
@@ -424,11 +396,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'position',
 category: 'accessing',
-fn: function () {
-    var self = this;
-    return self['@position']._ifNil_(function () {return smalltalk.Tetris._squares()._x().__slash(2).__minus(1).__at(0);});
-    return self;
-},
+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')}),
 smalltalk.TetrisPiece);
 
@@ -437,11 +408,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'position:',
 category: 'accessing',
-fn: function (aPoint) {
-    var self = this;
-    return self['@position'] = aPoint;
-    return self;
-},
+fn: function (aPoint){
+var self=this;
+return self['@position']=aPoint;
+return self;},
 source: unescape('position%3A%20aPoint%0A%09%5Eposition%20%3A%3D%20aPoint')}),
 smalltalk.TetrisPiece);
 
@@ -450,11 +420,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'bounds',
 category: 'accessing',
-fn: function () {
-    var self = this;
-    self._subclassResponsibility();
-    return self;
-},
+fn: function (){
+var self=this;
+smalltalk.send(self, "_subclassResponsibility", []);
+return self;},
 source: unescape('bounds%0A%09self%20subclassResponsibility')}),
 smalltalk.TetrisPiece);
 
@@ -463,11 +432,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'color',
 category: 'accessing',
-fn: function () {
-    var self = this;
-    return unescape("%23afa");
-    return self;
-},
+fn: function (){
+var self=this;
+return unescape("%23afa");
+return self;},
 source: unescape('color%0A%09%5E%27%23afa%27')}),
 smalltalk.TetrisPiece);
 
@@ -476,11 +444,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'canMove',
 category: 'testing',
-fn: function () {
-    var self = this;
-    return self._position()._y().__lt(smalltalk.Tetris._squares()._y().__minus(self._height()));
-    return self;
-},
+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')}),
 smalltalk.TetrisPiece);
 
@@ -489,11 +456,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'height',
 category: 'accessing',
-fn: function () {
-    var self = this;
-    return 2;
-    return self;
-},
+fn: function (){
+var self=this;
+return (2);
+return self;},
 source: unescape('height%0A%09%5E2')}),
 smalltalk.TetrisPiece);
 
@@ -502,11 +468,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'canMoveIn:',
 category: 'testing',
-fn: function (aTetris) {
-    var self = this;
-    return self._position()._y().__lt(aTetris._squares()._y().__minus(self._height()));
-    return self;
-},
+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')}),
 smalltalk.TetrisPiece);
 
@@ -516,11 +481,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'atRandom',
 category: 'instance creation',
-fn: function () {
-    var self = this;
-    return self._subclasses()._at_(self._subclasses()._size()._atRandom())._new();
-    return self;
-},
+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')}),
 smalltalk.TetrisPiece.klass);
 
@@ -531,11 +495,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'bounds',
 category: 'accessing',
-fn: function () {
-    var self = this;
-    return function ($rec) {$rec._add_((0).__at(0));$rec._add_((0).__at(1));$rec._add_((1).__at(0));$rec._add_((1).__at(1));return $rec._yourself();}(smalltalk.Array._new());
-    return self;
-},
+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')}),
 smalltalk.TetrisPieceO);
 
@@ -547,11 +510,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'bounds',
 category: 'accessing',
-fn: function () {
-    var self = this;
-    return function ($rec) {$rec._add_((0).__at(0));$rec._add_((0).__at(1));$rec._add_((0).__at(2));$rec._add_((1).__at(2));return $rec._yourself();}(smalltalk.Array._new());
-    return self;
-},
+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')}),
 smalltalk.TetrisPieceL);
 
@@ -560,11 +522,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'color',
 category: 'accessing',
-fn: function () {
-    var self = this;
-    return unescape("%23ffa");
-    return self;
-},
+fn: function (){
+var self=this;
+return unescape("%23ffa");
+return self;},
 source: unescape('color%0A%09%5E%27%23ffa%27')}),
 smalltalk.TetrisPieceL);
 
@@ -573,11 +534,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'height',
 category: 'accessing',
-fn: function () {
-    var self = this;
-    return 3;
-    return self;
-},
+fn: function (){
+var self=this;
+return (3);
+return self;},
 source: unescape('height%0A%09%5E3')}),
 smalltalk.TetrisPieceL);
 
@@ -589,11 +549,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'color',
 category: 'accessing',
-fn: function () {
-    var self = this;
-    return unescape("%23aaf");
-    return self;
-},
+fn: function (){
+var self=this;
+return unescape("%23aaf");
+return self;},
 source: unescape('color%0A%09%5E%27%23aaf%27')}),
 smalltalk.TetrisPieceJ);
 
@@ -602,11 +561,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'bounds',
 category: 'accessing',
-fn: function () {
-    var self = this;
-    return function ($rec) {$rec._add_((1).__at(0));$rec._add_((1).__at(1));$rec._add_((1).__at(2));$rec._add_((0).__at(2));return $rec._yourself();}(smalltalk.Array._new());
-    return self;
-},
+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')}),
 smalltalk.TetrisPieceJ);
 
@@ -615,11 +573,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'height',
 category: 'accessing',
-fn: function () {
-    var self = this;
-    return 3;
-    return self;
-},
+fn: function (){
+var self=this;
+return (3);
+return self;},
 source: unescape('height%0A%09%5E3')}),
 smalltalk.TetrisPieceJ);
 
@@ -631,11 +588,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'color',
 category: 'accessing',
-fn: function () {
-    var self = this;
-    return unescape("%23faa");
-    return self;
-},
+fn: function (){
+var self=this;
+return unescape("%23faa");
+return self;},
 source: unescape('color%0A%09%5E%27%23faa%27')}),
 smalltalk.TetrisPieceI);
 
@@ -644,11 +600,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'bounds',
 category: 'accessing',
-fn: function () {
-    var self = this;
-    return function ($rec) {$rec._add_((0).__at(0));$rec._add_((0).__at(1));$rec._add_((0).__at(2));$rec._add_((0).__at(3));return $rec._yourself();}(smalltalk.Array._new());
-    return self;
-},
+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')}),
 smalltalk.TetrisPieceI);
 
@@ -657,11 +612,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'height',
 category: 'accessing',
-fn: function () {
-    var self = this;
-    return 4;
-    return self;
-},
+fn: function (){
+var self=this;
+return (4);
+return self;},
 source: unescape('height%0A%09%5E4')}),
 smalltalk.TetrisPieceI);
 
@@ -673,11 +627,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'bounds',
 category: 'accessing',
-fn: function () {
-    var self = this;
-    return function ($rec) {$rec._add_((0).__at(0));$rec._add_((1).__at(0));$rec._add_((2).__at(0));$rec._add_((1).__at(1));return $rec._yourself();}(smalltalk.Array._new());
-    return self;
-},
+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')}),
 smalltalk.TetrisPieceT);
 
@@ -686,11 +639,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'color',
 category: 'accessing',
-fn: function () {
-    var self = this;
-    return unescape("%23aaf");
-    return self;
-},
+fn: function (){
+var self=this;
+return unescape("%23aaf");
+return self;},
 source: unescape('color%0A%09%5E%27%23aaf%27')}),
 smalltalk.TetrisPieceT);
 

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 291 - 336
js/IDE.js


+ 188 - 234
js/JQuery.js

@@ -4,11 +4,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'removeAttribute:',
 category: 'attributes',
-fn: function (aString) {
-    var self = this;
-    return self._call_withArgument_("removeAttribute", aString);
-    return self;
-},
+fn: function (aString){
+var self=this;
+return smalltalk.send(self, "_call_withArgument_", ["removeAttribute", aString]);
+return self;},
 source: unescape('removeAttribute%3A%20aString%0A%20%20%20%20%22Remove%20an%20attribute%20from%20each%20element%20in%20the%20set%20of%20matched%20elements.%22%0A%20%20%20%20%5Eself%20call%3A%20%27removeAttribute%27%20withArgument%3A%20aString%0A')}),
 smalltalk.JQuery);
 
@@ -17,11 +16,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'attr:',
 category: 'attributes',
-fn: function (aString) {
-    var self = this;
-    return self._call_withArgument_("attr", aString);
-    return self;
-},
+fn: function (aString){
+var self=this;
+return smalltalk.send(self, "_call_withArgument_", ["attr", aString]);
+return self;},
 source: unescape('attr%3A%20aString%0A%20%20%20%20%22Get%20the%20value%20of%20an%20attribute%20for%20the%20first%20element%20in%20the%20set%20of%20matched%20elements.%22%0A%20%20%20%20%5Eself%20call%3A%20%27attr%27%20withArgument%3A%20aString%0A')}),
 smalltalk.JQuery);
 
@@ -30,11 +28,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'val',
 category: 'attributes',
-fn: function () {
-    var self = this;
-    return self._call_("val");
-    return self;
-},
+fn: function (){
+var self=this;
+return smalltalk.send(self, "_call_", ["val"]);
+return self;},
 source: unescape('val%0A%20%20%20%20%22Get%20the%20current%20value%20of%20the%20first%20element%20in%20the%20set%20of%20matched%20elements.%22%0A%20%20%20%20%5Eself%20call%3A%20%27val%27%0A')}),
 smalltalk.JQuery);
 
@@ -43,11 +40,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'val:',
 category: 'attributes',
-fn: function (aString) {
-    var self = this;
-    self._call_withArgument_("val", aString);
-    return self;
-},
+fn: function (aString){
+var self=this;
+smalltalk.send(self, "_call_withArgument_", ["val", aString]);
+return self;},
 source: unescape('val%3A%20aString%0A%20%20%20%20self%20call%3A%20%27val%27%20withArgument%3A%20aString%0A')}),
 smalltalk.JQuery);
 
@@ -68,11 +64,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'cssAt:put:',
 category: 'css',
-fn: function (aString, anotherString) {
-    var self = this;
-    (function () {self['@jquery'].css(aString, anotherString);}());
-    return self;
-},
+fn: function (aString, anotherString){
+var self=this;
+self['@jquery'].css(aString, anotherString);
+return self;},
 source: unescape('cssAt%3A%20aString%20put%3A%20anotherString%0A%20%20%20%20%7B%27self%5B%27%27@jquery%27%27%5D.css%28aString%2C%20anotherString%29%27%7D%0A')}),
 smalltalk.JQuery);
 
@@ -81,11 +76,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'addClass:',
 category: 'css',
-fn: function (aString) {
-    var self = this;
-    self._call_withArgument_("addClass", aString);
-    return self;
-},
+fn: function (aString){
+var self=this;
+smalltalk.send(self, "_call_withArgument_", ["addClass", aString]);
+return self;},
 source: unescape('addClass%3A%20aString%0A%20%20%20%20%22Adds%20the%20specified%20class%28es%29%20to%20each%20of%20the%20set%20of%20matched%20elements.%22%0A%20%20%20%20self%20call%3A%20%27addClass%27%20withArgument%3A%20aString%0A')}),
 smalltalk.JQuery);
 
@@ -94,11 +88,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'removeClass:',
 category: 'css',
-fn: function (aString) {
-    var self = this;
-    self._call_withArgument_("removeClass", aString);
-    return self;
-},
+fn: function (aString){
+var self=this;
+smalltalk.send(self, "_call_withArgument_", ["removeClass", aString]);
+return self;},
 source: unescape('removeClass%3A%20aString%0A%20%20%20%20%22Remove%20a%20single%20class%2C%20multiple%20classes%2C%20or%20all%20classes%20from%20each%20element%20in%20the%20set%20of%20matched%20elements.%22%0A%20%20%20%20self%20call%3A%20%27removeClass%27%20withArgument%3A%20aString%0A')}),
 smalltalk.JQuery);
 
@@ -107,11 +100,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'toggleClass:',
 category: 'css',
-fn: function (aString) {
-    var self = this;
-    self._call_withArgument_("toggleClass", aString);
-    return self;
-},
+fn: function (aString){
+var self=this;
+smalltalk.send(self, "_call_withArgument_", ["toggleClass", aString]);
+return self;},
 source: unescape('toggleClass%3A%20aString%0A%20%20%20%20%22Add%20or%20remove%20one%20or%20more%20classes%20from%20each%20element%20in%20the%20set%20of%20matched%20elements%2C%20depending%20on%20either%20the%20class%27s%20presence%20or%20the%20value%20of%20the%20switch%20argument.%22%0A%20%20%20%20self%20call%3A%20%27toggleClass%27%20withArgument%3A%20aString%0A')}),
 smalltalk.JQuery);
 
@@ -120,11 +112,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'height',
 category: 'css',
-fn: function () {
-    var self = this;
-    return self._call_("height");
-    return self;
-},
+fn: function (){
+var self=this;
+return smalltalk.send(self, "_call_", ["height"]);
+return self;},
 source: unescape('height%20%0A%20%20%20%20%22Get%20the%20current%20computed%20height%20for%20the%20first%20element%20in%20the%20set%20of%20matched%20elements.%22%0A%20%20%20%20%5Eself%20call%3A%20%27height%27%0A')}),
 smalltalk.JQuery);
 
@@ -133,11 +124,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'height:',
 category: 'css',
-fn: function (anInteger) {
-    var self = this;
-    self._call_withArgument_("height", anInteger);
-    return self;
-},
+fn: function (anInteger){
+var self=this;
+smalltalk.send(self, "_call_withArgument_", ["height", anInteger]);
+return self;},
 source: unescape('height%3A%20anInteger%0A%20%20%20%20self%20call%3A%20%27height%27%20withArgument%3A%20anInteger%0A')}),
 smalltalk.JQuery);
 
@@ -146,11 +136,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'width:',
 category: 'css',
-fn: function (anInteger) {
-    var self = this;
-    self._call_withArgument_("width", anInteger);
-    return self;
-},
+fn: function (anInteger){
+var self=this;
+smalltalk.send(self, "_call_withArgument_", ["width", anInteger]);
+return self;},
 source: unescape('width%3A%20anInteger%0A%20%20%20%20self%20call%3A%20%27width%27%20withArgument%3A%20anInteger%0A')}),
 smalltalk.JQuery);
 
@@ -159,11 +148,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'width',
 category: 'css',
-fn: function () {
-    var self = this;
-    return self._call_("width");
-    return self;
-},
+fn: function (){
+var self=this;
+return smalltalk.send(self, "_call_", ["width"]);
+return self;},
 source: unescape('width%0A%20%20%20%20%22Get%20the%20current%20computed%20width%20for%20the%20first%20element%20in%20the%20set%20of%20matched%20elements.%22%0A%20%20%20%20%5Eself%20call%3A%20%27width%27%0A')}),
 smalltalk.JQuery);
 
@@ -172,11 +160,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'innerHeight',
 category: 'css',
-fn: function () {
-    var self = this;
-    return self._call_("innerHeight");
-    return self;
-},
+fn: function (){
+var self=this;
+return smalltalk.send(self, "_call_", ["innerHeight"]);
+return self;},
 source: unescape('innerHeight%0A%20%20%20%20%22Get%20the%20current%20computed%20height%20for%20the%20first%20element%20in%20the%20set%20of%20matched%20elements%2C%20including%20padding%20but%20not%20border.%22%0A%20%20%20%20%5Eself%20call%3A%20%27innerHeight%27%0A')}),
 smalltalk.JQuery);
 
@@ -185,11 +172,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'innerWidth',
 category: 'css',
-fn: function () {
-    var self = this;
-    return self._call_("innerWidth");
-    return self;
-},
+fn: function (){
+var self=this;
+return smalltalk.send(self, "_call_", ["innerWidth"]);
+return self;},
 source: unescape('innerWidth%0A%20%20%20%20%22Get%20the%20current%20computed%20width%20for%20the%20first%20element%20in%20the%20set%20of%20matched%20elements%2C%20including%20padding%20but%20not%20border.%22%0A%20%20%20%20%5Eself%20call%3A%20%27innerWidth%27%0A')}),
 smalltalk.JQuery);
 
@@ -198,11 +184,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'outerHeight',
 category: 'css',
-fn: function () {
-    var self = this;
-    return self._call_("outerHeight");
-    return self;
-},
+fn: function (){
+var self=this;
+return smalltalk.send(self, "_call_", ["outerHeight"]);
+return self;},
 source: unescape('outerHeight%0A%20%20%20%20%22Get%20the%20current%20computed%20height%20for%20the%20first%20element%20in%20the%20set%20of%20matched%20elements%2C%20including%20padding%2C%20border%2C%20and%20optionally%20margin.%22%0A%20%20%20%20%5Eself%20call%3A%20%27outerHeight%27%0A')}),
 smalltalk.JQuery);
 
@@ -211,11 +196,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'outerWidth',
 category: 'css',
-fn: function () {
-    var self = this;
-    return self._call_("outerWidth");
-    return self;
-},
+fn: function (){
+var self=this;
+return smalltalk.send(self, "_call_", ["outerWidth"]);
+return self;},
 source: unescape('outerWidth%0A%20%20%20%20%22Get%20the%20current%20computed%20width%20for%20the%20first%20element%20in%20the%20set%20of%20matched%20elements%2C%20including%20padding%20and%20border.%22%0A%20%20%20%20%5Eself%20call%3A%20%27outerWidth%27%0A')}),
 smalltalk.JQuery);
 
@@ -224,11 +208,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'top',
 category: 'css',
-fn: function () {
-    var self = this;
-    return self._call_("position")._basicAt_("top");
-    return self;
-},
+fn: function (){
+var self=this;
+return smalltalk.send(smalltalk.send(self, "_call_", ["position"]), "_basicAt_", ["top"]);
+return self;},
 source: unescape('top%0A%20%20%20%20%22Get%20the%20current%20y%20coordinate%20of%20the%20first%20element%20in%20the%20set%20of%20matched%20elements%2C%20relative%20to%20the%20offset%20parent.%22%0A%20%20%20%20%5E%28self%20call%3A%20%27position%27%29%20basicAt%3A%20%27top%27%0A')}),
 smalltalk.JQuery);
 
@@ -237,11 +220,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'left',
 category: 'css',
-fn: function () {
-    var self = this;
-    return self._call_("position")._basicAt_("left");
-    return self;
-},
+fn: function (){
+var self=this;
+return smalltalk.send(smalltalk.send(self, "_call_", ["position"]), "_basicAt_", ["left"]);
+return self;},
 source: unescape('left%0A%20%20%20%20%22Get%20the%20current%20x%20coordinate%20of%20the%20first%20element%20in%20the%20set%20of%20matched%20elements%2C%20relative%20to%20the%20offset%20parent.%22%0A%20%20%20%20%5E%28self%20call%3A%20%27position%27%29%20basicAt%3A%20%27left%27%0A')}),
 smalltalk.JQuery);
 
@@ -250,11 +232,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'offsetLeft',
 category: 'css',
-fn: function () {
-    var self = this;
-    return self._call_("offset")._basicAt_("left");
-    return self;
-},
+fn: function (){
+var self=this;
+return smalltalk.send(smalltalk.send(self, "_call_", ["offset"]), "_basicAt_", ["left"]);
+return self;},
 source: unescape('offsetLeft%0A%20%20%20%20%22Get%20the%20current%20coordinates%20of%20the%20first%20element%20in%20the%20set%20of%20matched%20elements%2C%20relative%20to%20the%20document.%22%0A%20%20%20%20%5E%28self%20call%3A%20%27offset%27%29%20basicAt%3A%20%27left%27%0A')}),
 smalltalk.JQuery);
 
@@ -263,11 +244,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'offsetTop',
 category: 'css',
-fn: function () {
-    var self = this;
-    return self._call_("offset")._basicAt_("top");
-    return self;
-},
+fn: function (){
+var self=this;
+return smalltalk.send(smalltalk.send(self, "_call_", ["offset"]), "_basicAt_", ["top"]);
+return self;},
 source: unescape('offsetTop%0A%20%20%20%20%22Get%20the%20current%20coordinates%20of%20the%20first%20element%20in%20the%20set%20of%20matched%20elements%2C%20relative%20to%20the%20document.%22%0A%20%20%20%20%5E%28self%20call%3A%20%27offset%27%29%20basicAt%3A%20%27top%27%0A')}),
 smalltalk.JQuery);
 
@@ -276,11 +256,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'scrollLeft',
 category: 'css',
-fn: function () {
-    var self = this;
-    return self._call_("scrollLeft");
-    return self;
-},
+fn: function (){
+var self=this;
+return smalltalk.send(self, "_call_", ["scrollLeft"]);
+return self;},
 source: unescape('scrollLeft%0A%20%20%20%20%22Get%20the%20current%20horizontal%20position%20of%20the%20scroll%20bar%20for%20the%20first%20element%20in%20the%20set%20of%20matched%20elements.%22%0A%20%20%20%20%5Eself%20call%3A%20%27scrollLeft%27%0A')}),
 smalltalk.JQuery);
 
@@ -289,11 +268,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'scrollTop',
 category: 'css',
-fn: function () {
-    var self = this;
-    return self._call_("scrollTop");
-    return self;
-},
+fn: function (){
+var self=this;
+return smalltalk.send(self, "_call_", ["scrollTop"]);
+return self;},
 source: unescape('scrollTop%0A%20%20%20%20%22Get%20the%20current%20vertical%20position%20of%20the%20scroll%20bar%20for%20the%20first%20element%20in%20the%20set%20of%20matched%20elements.%22%0A%20%20%20%20%5Eself%20call%3A%20%27scrollTop%27%0A')}),
 smalltalk.JQuery);
 
@@ -302,11 +280,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'scrollLeft:',
 category: 'css',
-fn: function (anInteger) {
-    var self = this;
-    self._call_withArgument_("scrollLeft", anInteger);
-    return self;
-},
+fn: function (anInteger){
+var self=this;
+smalltalk.send(self, "_call_withArgument_", ["scrollLeft", anInteger]);
+return self;},
 source: unescape('scrollLeft%3A%20anInteger%0A%20%20%20%20self%20call%3A%20%27scrollLeft%27%20withArgument%3A%20anInteger%0A')}),
 smalltalk.JQuery);
 
@@ -315,11 +292,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'scrollTop:',
 category: 'css',
-fn: function (anInteger) {
-    var self = this;
-    self._call_withArgument_("scrollTop", anInteger);
-    return self;
-},
+fn: function (anInteger){
+var self=this;
+smalltalk.send(self, "_call_withArgument_", ["scrollTop", anInteger]);
+return self;},
 source: unescape('scrollTop%3A%20anInteger%0A%20%20%20%20self%20call%3A%20%27scrollTop%27%20withArgument%3A%20anInteger%0A')}),
 smalltalk.JQuery);
 
@@ -328,11 +304,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'focus',
 category: 'events',
-fn: function () {
-    var self = this;
-    self._call_("focus");
-    return self;
-},
+fn: function (){
+var self=this;
+smalltalk.send(self, "_call_", ["focus"]);
+return self;},
 source: unescape('focus%0A%20%20%20%20self%20call%3A%20%27focus%27%0A')}),
 smalltalk.JQuery);
 
@@ -341,11 +316,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'show',
 category: 'events',
-fn: function () {
-    var self = this;
-    self._call_("show");
-    return self;
-},
+fn: function (){
+var self=this;
+smalltalk.send(self, "_call_", ["show"]);
+return self;},
 source: unescape('show%0A%20%20%20%20self%20call%3A%20%27show%27%0A')}),
 smalltalk.JQuery);
 
@@ -354,11 +328,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'hide',
 category: 'events',
-fn: function () {
-    var self = this;
-    self._call_("hide");
-    return self;
-},
+fn: function (){
+var self=this;
+smalltalk.send(self, "_call_", ["hide"]);
+return self;},
 source: unescape('hide%0A%20%20%20%20self%20call%3A%20%27hide%27%0A')}),
 smalltalk.JQuery);
 
@@ -367,11 +340,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'remove',
 category: 'events',
-fn: function () {
-    var self = this;
-    self._call_("remove");
-    return self;
-},
+fn: function (){
+var self=this;
+smalltalk.send(self, "_call_", ["remove"]);
+return self;},
 source: unescape('remove%0A%20%20%20%20self%20call%3A%20%27remove%27%0A')}),
 smalltalk.JQuery);
 
@@ -380,11 +352,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'on:do:',
 category: 'events',
-fn: function (anEventString, aBlock) {
-    var self = this;
-    (function () {self['@jquery'].bind(anEventString, function (e) {aBlock(e, self);});}());
-    return self;
-},
+fn: function (anEventString, aBlock){
+var self=this;
+self['@jquery'].bind(anEventString, function(e){aBlock(e, self)});
+return self;},
 source: unescape('on%3A%20anEventString%20do%3A%20aBlock%0A%20%20%20%20%22Attach%20aBlock%20for%20anEventString%20on%20the%20element%22%0A%20%20%20%20%7B%27self%5B%27%27@jquery%27%27%5D.bind%28anEventString%2C%20function%28e%29%7BaBlock%28e%2C%20self%29%7D%29%27%7D%0A')}),
 smalltalk.JQuery);
 
@@ -393,11 +364,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'removeEvents:',
 category: 'events',
-fn: function (aString) {
-    var self = this;
-    self._call_withArgument_("unbind", aString);
-    return self;
-},
+fn: function (aString){
+var self=this;
+smalltalk.send(self, "_call_withArgument_", ["unbind", aString]);
+return self;},
 source: unescape('removeEvents%3A%20aString%0A%20%20%20%20%22Unbind%20all%20handlers%20attached%20to%20the%20event%20aString%22%0A%20%20%20%20self%20call%3A%20%27unbind%27%20withArgument%3A%20aString%0A')}),
 smalltalk.JQuery);
 
@@ -406,11 +376,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'append:',
 category: 'DOM insertion',
-fn: function (anObject) {
-    var self = this;
-    anObject._appendToJQuery_(self);
-    return self;
-},
+fn: function (anObject){
+var self=this;
+smalltalk.send(anObject, "_appendToJQuery_", [self]);
+return self;},
 source: unescape('append%3A%20anObject%0A%20%20%20%20%22Append%20anObject%20at%20the%20end%20of%20the%20element.%22%0A%20%20%20%20anObject%20appendToJQuery%3A%20self%0A')}),
 smalltalk.JQuery);
 
@@ -419,11 +388,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'appendElement:',
 category: 'DOM insertion',
-fn: function (anElement) {
-    var self = this;
-    self._call_withArgument_("append", anElement);
-    return self;
-},
+fn: function (anElement){
+var self=this;
+smalltalk.send(self, "_call_withArgument_", ["append", anElement]);
+return self;},
 source: unescape('appendElement%3A%20anElement%0A%20%20%20%20%22Append%20anElement%20at%20the%20end%20of%20the%20element.%0A%20%20%20%20%20Dont%27t%20call%20this%20method%20directly%2C%20use%20%23append%3A%20instead%22%0A%20%20%20%20self%20call%3A%20%27append%27%20withArgument%3A%20anElement%0A')}),
 smalltalk.JQuery);
 
@@ -432,11 +400,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'appendToJQuery:',
 category: 'DOM insertion',
-fn: function (aJQuery) {
-    var self = this;
-    aJQuery._appendElement_(self['@jquery']);
-    return self;
-},
+fn: function (aJQuery){
+var self=this;
+smalltalk.send(aJQuery, "_appendElement_", [self['@jquery']]);
+return self;},
 source: unescape('appendToJQuery%3A%20aJQuery%0A%20%20%20%20aJQuery%20appendElement%3A%20jquery%0A')}),
 smalltalk.JQuery);
 
@@ -445,12 +412,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'contents:',
 category: 'DOM insertion',
-fn: function (anObject) {
-    var self = this;
-    self._empty();
-    self._append_(anObject);
-    return self;
-},
+fn: function (anObject){
+var self=this;
+smalltalk.send(self, "_empty", []);
+smalltalk.send(self, "_append_", [anObject]);
+return self;},
 source: unescape('contents%3A%20anObject%0A%20%20%20%20self%20empty.%0A%20%20%20%20self%20append%3A%20anObject%0A')}),
 smalltalk.JQuery);
 
@@ -459,11 +425,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'empty',
 category: 'DOM insertion',
-fn: function () {
-    var self = this;
-    self._call_("empty");
-    return self;
-},
+fn: function (){
+var self=this;
+smalltalk.send(self, "_call_", ["empty"]);
+return self;},
 source: unescape('empty%0A%20%20%20%20self%20call%3A%20%27empty%27%0A')}),
 smalltalk.JQuery);
 
@@ -472,11 +437,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'initializeWithJQueryObject:',
 category: 'initialization',
-fn: function (anObject) {
-    var self = this;
-    self['@jquery'] = anObject;
-    return self;
-},
+fn: function (anObject){
+var self=this;
+self['@jquery']=anObject;
+return self;},
 source: unescape('initializeWithJQueryObject%3A%20anObject%0A%20%20%20%20jquery%20%3A%3D%20anObject%0A')}),
 smalltalk.JQuery);
 
@@ -509,11 +473,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'hasClass:',
 category: 'testing',
-fn: function (aString) {
-    var self = this;
-    return self._call_withArgument_("hasClass", aString);
-    return self;
-},
+fn: function (aString){
+var self=this;
+return smalltalk.send(self, "_call_withArgument_", ["hasClass", aString]);
+return self;},
 source: unescape('hasClass%3A%20aString%0A%20%20%20%20%22Determine%20whether%20any%20of%20the%20matched%20elements%20are%20assigned%20the%20given%20class.%22%0A%20%20%20%20%5Eself%20call%3A%20%27hasClass%27%20withArgument%3A%20aString%0A')}),
 smalltalk.JQuery);
 
@@ -523,13 +486,12 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'fromString:',
 category: 'instance creation',
-fn: function (aString) {
-    var self = this;
-    var newJQuery = nil;
-    (function () {newJQuery = jQuery(String(aString));}());
-    return self._from_(newJQuery);
-    return self;
-},
+fn: function (aString){
+var self=this;
+var newJQuery=nil;
+newJQuery = jQuery(String(aString));
+return smalltalk.send(self, "_from_", [newJQuery]);
+return self;},
 source: unescape('fromString%3A%20aString%0A%20%20%20%20%7C%20newJQuery%20%7C%0A%20%20%20%20%7B%27newJQuery%20%3D%20jQuery%28String%28aString%29%29%27%7D.%0A%20%20%20%20%5Eself%20from%3A%20newJQuery%0A')}),
 smalltalk.JQuery.klass);
 
@@ -538,11 +500,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'from:',
 category: 'instance creation',
-fn: function (anObject) {
-    var self = this;
-    return function ($rec) {$rec._initializeWithJQueryObject_(anObject);return $rec._yourself();}(self._new());
-    return self;
-},
+fn: function (anObject){
+var self=this;
+return (function($rec){smalltalk.send($rec, "_initializeWithJQueryObject_", [anObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
+return self;},
 source: unescape('from%3A%20anObject%0A%20%20%20%20%5Eself%20new%0A%09initializeWithJQueryObject%3A%20anObject%3B%0A%09yourself%0A')}),
 smalltalk.JQuery.klass);
 
@@ -554,12 +515,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'initialize',
 category: 'initialization',
-fn: function () {
-    var self = this;
-    self.klass.superclass.fn.prototype._initialize.apply(self, []);
-    self['@settings'] = smalltalk.Dictionary._new();
-    return self;
-},
+fn: function (){
+var self=this;
+self.klass.superclass.fn.prototype['_initialize'].apply(self, []);
+self['@settings']=smalltalk.send(smalltalk.Dictionary, "_new", []);
+return self;},
 source: unescape('initialize%0A%20%20%20%20super%20initialize.%0A%20%20%20%20settings%20%3A%3D%20Dictionary%20new%0A')}),
 smalltalk.Ajax);
 
@@ -568,11 +528,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'at:',
 category: 'accessing',
-fn: function (aKey) {
-    var self = this;
-    return self['@settings']._at_ifAbsent_(aKey, function () {return nil;});
-    return self;
-},
+fn: function (aKey){
+var self=this;
+return smalltalk.send(self['@settings'], "_at_ifAbsent_", [aKey, (function(){return nil;})]);
+return self;},
 source: unescape('at%3A%20aKey%0A%20%20%20%20%5Esettings%20at%3A%20aKey%20ifAbsent%3A%20%5Bnil%5D%0A')}),
 smalltalk.Ajax);
 
@@ -581,11 +540,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'at:put:',
 category: 'accessing',
-fn: function (aKey, aValue) {
-    var self = this;
-    self['@settings']._at_put_(aKey, aValue);
-    return self;
-},
+fn: function (aKey, aValue){
+var self=this;
+smalltalk.send(self['@settings'], "_at_put_", [aKey, aValue]);
+return self;},
 source: unescape('at%3A%20aKey%20put%3A%20aValue%0A%20%20%20%20settings%20at%3A%20aKey%20put%3A%20aValue%0A')}),
 smalltalk.Ajax);
 
@@ -594,11 +552,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'url',
 category: 'accessing',
-fn: function () {
-    var self = this;
-    return self._at_("url");
-    return self;
-},
+fn: function (){
+var self=this;
+return smalltalk.send(self, "_at_", ["url"]);
+return self;},
 source: unescape('url%0A%20%20%20%20%5Eself%20at%3A%20%27url%27%0A')}),
 smalltalk.Ajax);
 
@@ -607,11 +564,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'url:',
 category: 'accessing',
-fn: function (aString) {
-    var self = this;
-    self._at_put_("url", aString);
-    return self;
-},
+fn: function (aString){
+var self=this;
+smalltalk.send(self, "_at_put_", ["url", aString]);
+return self;},
 source: unescape('url%3A%20aString%0A%20%20%20%20self%20at%3A%20%27url%27%20put%3A%20aString%0A')}),
 smalltalk.Ajax);
 
@@ -620,11 +576,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'send',
 category: 'actions',
-fn: function () {
-    var self = this;
-    (function () {jQuery.ajax(self['@settings']);}());
-    return self;
-},
+fn: function (){
+var self=this;
+jQuery.ajax(self['@settings']);
+return self;},
 source: unescape('send%0A%20%20%20%20%7B%27jQuery.ajax%28self%5B%27%27@settings%27%27%5D%29%27%7D%0A')}),
 smalltalk.Ajax);
 
@@ -634,11 +589,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: 'url:',
 category: 'instance creation',
-fn: function (aString) {
-    var self = this;
-    return function ($rec) {$rec._url_(aString);return $rec._yourself();}(self._new());
-    return self;
-},
+fn: function (aString){
+var self=this;
+return (function($rec){smalltalk.send($rec, "_url_", [aString]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
+return self;},
 source: unescape('url%3A%20aString%0A%20%20%20%20%5Eself%20new%0A%09url%3A%20aString%3B%0A%09yourself%0A')}),
 smalltalk.Ajax.klass);
 

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 147 - 126
js/Kernel.js


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 273 - 330
js/Parser.js


+ 226 - 96
js/boot.js

@@ -1,4 +1,41 @@
-function Smalltalk(){};
+/* ====================================================================
+   |
+   |   Jtalk Smalltalk
+   |   http://jtalk-project.org
+   |
+   ======================================================================
+
+   ======================================================================
+   |
+   | Copyright (c) 2010-2011
+   | Nicolas Petton <petton.nicolas@gmail.com>
+   |
+   | Jtalk is released under the MIT license
+   |
+   | Permission is hereby granted, free of charge, to any person obtaining
+   | a copy of this software and associated documentation files (the 
+   | 'Software'), to deal in the Software without restriction, including 
+   | without limitation the rights to use, copy, modify, merge, publish, 
+   | distribute, sublicense, and/or sell copies of the Software, and to 
+   | permit persons to whom the Software is furnished to do so, subject to 
+   | the following conditions:
+   |
+   | The above copyright notice and this permission notice shall be 
+   | included in all copies or substantial portions of the Software.
+   |
+   | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 
+   | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 
+   | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
+   | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+   | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+   | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 
+   | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.  
+   |
+   ==================================================================== */
+
+
+/* Smalltalk constructors definition */
+
 function SmalltalkObject(){};
 function SmalltalkBehavior(){};
 function SmalltalkClass(){};
@@ -8,121 +45,214 @@ function SmalltalkMetaclass(){
 function SmalltalkMethod(){};
 function SmalltalkNil(){};
 
-var nil = new SmalltalkNil();
-var smalltalk = new Smalltalk();
+function Smalltalk(){
+
+    var st = this;
 
-smalltalk.klass = function(spec) {
-    var spec = spec || {};
-    var that;
-    if(spec.meta) {
-	that = new SmalltalkMetaclass();
-    } else {
-	that = new (smalltalk.klass({meta: true})).fn;
-	that.klass.instanceClass = that;
-	that.className = spec.className;
-	that.klass.className = that.className + ' class';
-    }
+    /* Smalltalk class creation. A class is an instance of an automatically 
+       created metaclass object. Newly created classes (not their metaclass) 
+       should be added to the smalltalk object, see smalltalk.addClass().
+       Superclass linking is *not* handled here, see smalltalk.init()  */
+
+    st.klass = function(spec) {
+	var spec = spec || {};
+	var that;
+	if(spec.meta) {
+	    that = new SmalltalkMetaclass();
+	} else {
+	    that = new (st.klass({meta: true})).fn;
+	    that.klass.instanceClass = that;
+	    that.className = spec.className;
+	    that.klass.className = that.className + ' class';
+	}
 	
-    that.fn = spec.fn || function(){};
-    that.superclass = spec.superclass;
-    that.iVarNames = spec.iVarNames || [];
-    if(that.superclass) {
-	that.klass.superclass = that.superclass.klass;
-    }
-    that.category = spec.category || "";
-    that.fn.prototype.methods = {};
-    that.fn.prototype.klass = that;
-
-    return that;
-};
+	that.fn = spec.fn || function(){};
+	that.superclass = spec.superclass;
+	that.iVarNames = spec.iVarNames || [];
+	if(that.superclass) {
+	    that.klass.superclass = that.superclass.klass;
+	}
+	that.category = spec.category || "";
+	that.fn.prototype.methods = {};
+	that.fn.prototype.klass = that;
 
-smalltalk.method = function(spec) {
-    var that = new SmalltalkMethod();
-    that.selector = spec.selector;
-    that.category = spec.category;
-    that.source   = spec.source;
-    that.fn       = spec.fn;
-    return that
-};
+	return that;
+    };
+
+    /* Smalltalk method object. To add a method to a class,
+       use smalltalk.addMethod() */
+
+    st.method = function(spec) {
+	var that = new SmalltalkMethod();
+	that.selector = spec.selector;
+	that.category = spec.category;
+	that.source   = spec.source;
+	that.fn       = spec.fn;
+	return that
+    };
 
-smalltalk.init = function(klass) {
-    var subclasses = smalltalk.subclasses(klass);
-    for(var i=0;i<klass.iVarNames.length;i++) {
-	klass.fn.prototype["@"+klass.iVarNames[i]] = nil;
-    }
-    if(klass.superclass && klass.superclass !== nil) {
-	klass.fn.prototype.__proto__ = klass.superclass.fn.prototype;
-	for(var i=0;i<klass.superclass.iVarNames.length;i++) {
-	    if(!klass["@"+klass.superclass.iVarNames[i]]) {
-		klass.fn.prototype["@"+klass.superclass.iVarNames[i]] = nil;
+    /* Initialize a class in its class hierarchy. Handle both class and
+       metaclasses. */
+
+    st.init = function(klass) {
+	var subclasses = st.subclasses(klass);
+	for(var i=0;i<klass.iVarNames.length;i++) {
+	    klass.fn.prototype["@"+klass.iVarNames[i]] = nil;
+	}
+	if(klass.superclass && klass.superclass !== nil) {
+	    klass.fn.prototype.__proto__ = klass.superclass.fn.prototype;
+	    for(var i=0;i<klass.superclass.iVarNames.length;i++) {
+		if(!klass["@"+klass.superclass.iVarNames[i]]) {
+		    klass.fn.prototype["@"+klass.superclass.iVarNames[i]] = nil;
+		}
 	    }
 	}
-    }
-    for(var i=0;i<subclasses.length;i++) {
-     	smalltalk.init(subclasses[i]);
-    }
-    if(klass.klass && !klass.meta) {
-	smalltalk.init(klass.klass);
-    }
-};
-
-smalltalk.classes = function() {
-    var classes = [];
-    for(var i in smalltalk) {
-	if(i.search(/^[A-Z]/g) != -1) {
-	    classes.push(smalltalk[i]);
+	for(var i=0;i<subclasses.length;i++) {
+     	    st.init(subclasses[i]);
 	}
+	if(klass.klass && !klass.meta) {
+	    st.init(klass.klass);
+	}
+    };
 
-    }
-    return classes
-};
+    /* Answer all registered Smalltalk classes */
 
-smalltalk.subclasses = function(klass) {
-    var subclasses = [];
-    var classes = smalltalk.classes();
-    for(var i in classes) {
-	if(classes[i].fn) {
-	    //Metaclasses
-	    if(classes[i].klass && classes[i].klass.superclass === klass) {
-		subclasses.push(classes[i].klass);
+    st.classes = function() {
+	var classes = [];
+	for(var i in st) {
+	    if(i.search(/^[A-Z]/g) != -1) {
+		classes.push(st[i]);
 	    }
-	    //Classes
-	    if(classes[i].superclass === klass) {
-		subclasses.push(classes[i]);
+
+	}
+	return classes
+    };
+
+    /* Answer the direct subclasses of a given class.
+       This is computed dynamically */
+
+    st.subclasses = function(klass) {
+	var subclasses = [];
+	var classes = st.classes();
+	for(var i in classes) {
+	    if(classes[i].fn) {
+		//Metaclasses
+		if(classes[i].klass && classes[i].klass.superclass === klass) {
+		    subclasses.push(classes[i].klass);
+		}
+		//Classes
+		if(classes[i].superclass === klass) {
+		    subclasses.push(classes[i]);
+		}
 	    }
 	}
-    }
-    return subclasses;
-};
+	return subclasses;
+    };
+
+    /* Create a new class wrapping a JavaScript constructor, and add it to the 
+       global smalltalk object. */
 
-smalltalk.mapClassName = function(className, category, fn, superclass) {
-    smalltalk[className] = smalltalk.klass({
-		className:  className, 
-		category:   category, 
-		superclass: superclass,
-		fn:         fn
+    st.mapClassName = function(className, category, fn, superclass) {
+	st[className] = st.klass({
+	    className:  className, 
+	    category:   category, 
+	    superclass: superclass,
+	    fn:         fn
 	});
-};
+    };
 
-smalltalk.addClass = function(className, superclass, iVarNames, category) {
-    if(smalltalk[className]) {
-	smalltalk[className].superclass = superclass;
-	smalltalk[className].iVarNames = iVarNames;
-	smalltalk[className].category = category || smalltalk[className].category;
-    } else {
-	smalltalk[className] = smalltalk.klass({
+    /* Add a class to the smalltalk object, creating a new one if needed. */
+
+    st.addClass = function(className, superclass, iVarNames, category) {
+	if(st[className]) {
+	    st[className].superclass = superclass;
+	    st[className].iVarNames = iVarNames;
+	    st[className].category = category || st[className].category;
+	} else {
+	    st[className] = smalltalk.klass({
 		className: className, 
 		iVarNames: iVarNames,
 		superclass: superclass
 	    });
-	smalltalk[className].category = category || '';
-    }
-};
+	    st[className].category = category || '';
+	}
+    };
 
-smalltalk.addMethod = function(jsSelector, method, klass) {
-    klass.fn.prototype[jsSelector] = method.fn;
-    klass.fn.prototype.methods[method.selector] = method;
-};
+    /* Add a method to a class */
+
+    st.addMethod = function(jsSelector, method, klass) {
+	klass.fn.prototype[jsSelector] = method.fn;
+	klass.fn.prototype.methods[method.selector] = method;
+    };
+
+    /* Handles Smalltalk message send. Automatically converts undefined to the nil object.
+       If the receiver does not understand the selector, call its #doesNotUnderstand: method */
+
+    st.send = function(receiver, selector, args) {
+	if(typeof receiver === "undefined") {
+	    receiver = nil;
+	}
+	if(receiver[selector]) {
+	    return receiver[selector].apply(receiver, args);
+	} else {
+	    return messageNotUnderstood(receiver, selector, args);
+	}
+    };
+
+
+    /* handle #dnu:. 
+       Assume that the receiver understands #doesNotUnderstand: */
+
+    messageNotUnderstood = function(receiver, selector, args) {
+	return receiver._doesNotUnderstand_(
+	    st.Message._new()
+		._selector_(convertSelector(selector))
+		._arguments_(args)
+	);
+    };
+
+    /* Convert a string to a valid smalltalk selector.
+       if you modify the following functions, also change String>>asSelector
+       accordingly */
+
+    convertSelector = function(selector) {
+	if(selector.match(/__/)) {
+	    return convertBinarySelector(selector);
+	} else {
+	    return convertKeywordSelector(selector);
+	}
+    };
+
+    convertKeywordSelector = function(selector) {
+	return selector.replace(/^_/, '').replace(/_/g, ':');
+    };
+
+    convertBinarySelector = function(selector) {
+	return selector
+	    .replace(/^_/, '')
+	    .replace(/_plus/, '+')
+	    .replace(/_minus/, '-')
+	    .replace(/_star/, '*')
+	    .replace(/_slash/, '/')
+	    .replace(/_gt/, '>')
+	    .replace(/_lt/, '<')
+	    .replace(/_eq/, '=')
+	    .replace(/_comma/, ',')
+	    .replace(/_at/, '@')
+    };
+}
+
+/* Global Smalltalk objects. nil shouldn't be a global. */
+
+var nil = new SmalltalkNil();
+var smalltalk = new Smalltalk();
+
+
+/****************************************************************************************/
+
+
+/* Base classes mapping. If you edit this part, do not forget to set the superclass of the
+   object metaclass to Class after the definition of Object */
 
 smalltalk.mapClassName("Object", "Kernel", SmalltalkObject);
 smalltalk.mapClassName("Smalltalk", "Kernel", Smalltalk, smalltalk.Object);

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 276 - 111
js/jtalk.js


Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov