Browse Source

Removed JQuery binding! Now Canvas calls JQuery directly. Everything seems to be working fine, but I may have broken a few things in the IDE

Nicolas Petton 12 years ago
parent
commit
cd7a1e1308
16 changed files with 228 additions and 2678 deletions
  1. 1 1
      css/amber.css
  2. 0 1
      index.html
  3. 53 20
      js/Canvas.deploy.js
  4. 91 43
      js/Canvas.js
  5. 5 5
      js/IDE.deploy.js
  6. 13 13
      js/IDE.js
  7. 0 39
      js/JQuery-Tests.deploy.js
  8. 0 54
      js/JQuery-Tests.js
  9. 0 826
      js/JQuery.deploy.js
  10. 0 1197
      js/JQuery.js
  11. 0 3
      js/amber.js
  12. 25 14
      st/Canvas.st
  13. 34 27
      st/IDE.st
  14. 0 34
      st/JQuery-Tests.st
  15. 0 390
      st/JQuery.st
  16. 6 11
      st/Makefile

+ 1 - 1
css/amber.css

@@ -459,7 +459,7 @@ body.jtalkBody {
 
 /* SUnit TestRunner  */
 
-.jtalkTool .jt_column.sunit.categories,
+.jtalkTool .jt_column.sunit.packages,
 .jtalkTool .jt_column.sunit.classes {
 	height: 100%
 }

+ 0 - 1
index.html

@@ -6,7 +6,6 @@
     <meta http-equiv="content-type" content="text/html; charset=utf-8" /> 
     <meta name="author" content="Nicolas Petton" /> 
     <link rel="stylesheet" type="text/css" href='css/style.css' /> 
-    <link rel="stylesheet" type="text/css" href='css/syntax.css' /> 
     <link type="image/x-icon" rel="shortcut icon" href="/favicon.ico"/> 
     <link href='http://fonts.googleapis.com/css?family=Istok+Web' rel='stylesheet' type='text/css'> 
     <script type='text/javascript' src='js/amber.js'></script> 

+ 53 - 20
js/Canvas.deploy.js

@@ -679,18 +679,7 @@ smalltalk.method({
 selector: 'asJQuery',
 fn: function (){
 var self=this;
-return smalltalk.JQuery._from_(jQuery(self['@element']));
-return self;}
-}),
-smalltalk.TagBrush);
-
-smalltalk.addMethod(
-'_asJQueryDo_',
-smalltalk.method({
-selector: 'asJQueryDo:',
-fn: function (aBlock){
-var self=this;
-smalltalk.send(aBlock, "_value_", [smalltalk.send(self, "_asJQuery", [])]);
+return smalltalk.send((typeof window == 'undefined' ? nil : window), "_jQuery_", [smalltalk.send(self, "_element", [])]);
 return self;}
 }),
 smalltalk.TagBrush);
@@ -701,7 +690,7 @@ smalltalk.method({
 selector: 'onKeyDown:',
 fn: function (aBlock){
 var self=this;
-smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_on_do_", ["keydown", aBlock]);
+smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_bind_do_", ["keydown", aBlock]);
 return self;}
 }),
 smalltalk.TagBrush);
@@ -712,7 +701,7 @@ smalltalk.method({
 selector: 'onKeyPress:',
 fn: function (aBlock){
 var self=this;
-smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_on_do_", ["keypress", aBlock]);
+smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_bind_do_", ["keypress", aBlock]);
 return self;}
 }),
 smalltalk.TagBrush);
@@ -723,7 +712,7 @@ smalltalk.method({
 selector: 'onKeyUp:',
 fn: function (aBlock){
 var self=this;
-smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_on_do_", ["keyup", aBlock]);
+smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_bind_do_", ["keyup", aBlock]);
 return self;}
 }),
 smalltalk.TagBrush);
@@ -734,7 +723,7 @@ smalltalk.method({
 selector: 'onFocus:',
 fn: function (aBlock){
 var self=this;
-smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_on_do_", ["focus", aBlock]);
+smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_bind_do_", ["focus", aBlock]);
 return self;}
 }),
 smalltalk.TagBrush);
@@ -745,7 +734,7 @@ smalltalk.method({
 selector: 'onBlur:',
 fn: function (aBlock){
 var self=this;
-smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_on_do_", ["blur", aBlock]);
+smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_bind_do_", ["blur", aBlock]);
 return self;}
 }),
 smalltalk.TagBrush);
@@ -756,7 +745,7 @@ smalltalk.method({
 selector: 'onChange:',
 fn: function (aBlock){
 var self=this;
-smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_on_do_", ["change", aBlock]);
+smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_bind_do_", ["change", aBlock]);
 return self;}
 }),
 smalltalk.TagBrush);
@@ -767,7 +756,7 @@ smalltalk.method({
 selector: 'onClick:',
 fn: function (aBlock){
 var self=this;
-smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_on_do_", ["click", aBlock]);
+smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_bind_do_", ["click", aBlock]);
 return self;}
 }),
 smalltalk.TagBrush);
@@ -790,7 +779,7 @@ smalltalk.method({
 selector: 'initializeFromJQuery:canvas:',
 fn: function (aJQuery, aCanvas){
 var self=this;
-self['@element']=smalltalk.send(smalltalk.send(aJQuery, "_jquery", []), "_get_", [(0)]);
+self['@element']=smalltalk.send(aJQuery, "_get_", [(0)]);
 self['@canvas']=aCanvas;
 return self;}
 }),
@@ -922,6 +911,17 @@ smalltalk.Widget);
 
 
 
+smalltalk.addMethod(
+'_appendToJQuery_',
+smalltalk.method({
+selector: 'appendToJQuery:',
+fn: function (aJQuery){
+var self=this;
+smalltalk.send(aJQuery, "_append_", [smalltalk.send(self, "_asString", [])]);
+return self;}
+}),
+smalltalk.Object);
+
 smalltalk.addMethod(
 '_appendToBrush_',
 smalltalk.method({
@@ -933,6 +933,17 @@ return self;}
 }),
 smalltalk.Object);
 
+smalltalk.addMethod(
+'_appendToJQuery_',
+smalltalk.method({
+selector: 'appendToJQuery:',
+fn: function (aJQuery){
+var self=this;
+smalltalk.send(self, "_value_", [smalltalk.send((smalltalk.HTMLCanvas || HTMLCanvas), "_onJQuery_", [aJQuery])]);
+return self;}
+}),
+smalltalk.BlockClosure);
+
 smalltalk.addMethod(
 '_appendToBrush_',
 smalltalk.method({
@@ -944,6 +955,28 @@ return self;}
 }),
 smalltalk.BlockClosure);
 
+smalltalk.addMethod(
+'_asJQuery',
+smalltalk.method({
+selector: 'asJQuery',
+fn: function (){
+var self=this;
+return jQuery(String(self));
+return self;}
+}),
+smalltalk.String);
+
+smalltalk.addMethod(
+'_appendToJQuery_',
+smalltalk.method({
+selector: 'appendToJQuery:',
+fn: function (aJQuery){
+var self=this;
+smalltalk.send(aJQuery, "_append_", [self]);
+return self;}
+}),
+smalltalk.String);
+
 smalltalk.addMethod(
 '_appendToBrush_',
 smalltalk.method({

+ 91 - 43
js/Canvas.js

@@ -980,27 +980,11 @@ selector: unescape('asJQuery'),
 category: 'converting',
 fn: function (){
 var self=this;
-return smalltalk.JQuery._from_(jQuery(self['@element']));
+return smalltalk.send((typeof window == 'undefined' ? nil : window), "_jQuery_", [smalltalk.send(self, "_element", [])]);
 return self;},
 args: [],
-source: unescape('asJQuery%0A%09%3Creturn%20smalltalk.JQuery._from_%28jQuery%28self%5B%27@element%27%5D%29%29%3E'),
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.TagBrush);
-
-smalltalk.addMethod(
-unescape('_asJQueryDo_'),
-smalltalk.method({
-selector: unescape('asJQueryDo%3A'),
-category: 'converting',
-fn: function (aBlock){
-var self=this;
-smalltalk.send(aBlock, "_value_", [smalltalk.send(self, "_asJQuery", [])]);
-return self;},
-args: ["aBlock"],
-source: unescape('asJQueryDo%3A%20aBlock%0A%20%20%20%20aBlock%20value%3A%20self%20asJQuery'),
-messageSends: ["value:", "asJQuery"],
+source: unescape('asJQuery%0A%20%20%20%20%5Ewindow%20jQuery%3A%20self%20element'),
+messageSends: ["jQuery:", "element"],
 referencedClasses: []
 }),
 smalltalk.TagBrush);
@@ -1012,11 +996,11 @@ selector: unescape('onKeyDown%3A'),
 category: 'events',
 fn: function (aBlock){
 var self=this;
-smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_on_do_", ["keydown", aBlock]);
+smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_bind_do_", ["keydown", aBlock]);
 return self;},
 args: ["aBlock"],
-source: unescape('onKeyDown%3A%20aBlock%0A%20%20%20%20self%20asJQuery%20on%3A%20%27keydown%27%20do%3A%20aBlock'),
-messageSends: ["on:do:", "asJQuery"],
+source: unescape('onKeyDown%3A%20aBlock%0A%20%20%20%20self%20asJQuery%20bind%3A%20%27keydown%27%20do%3A%20aBlock'),
+messageSends: ["bind:do:", "asJQuery"],
 referencedClasses: []
 }),
 smalltalk.TagBrush);
@@ -1028,11 +1012,11 @@ selector: unescape('onKeyPress%3A'),
 category: 'events',
 fn: function (aBlock){
 var self=this;
-smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_on_do_", ["keypress", aBlock]);
+smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_bind_do_", ["keypress", aBlock]);
 return self;},
 args: ["aBlock"],
-source: unescape('onKeyPress%3A%20aBlock%0A%20%20%20%20self%20asJQuery%20on%3A%20%27keypress%27%20do%3A%20aBlock'),
-messageSends: ["on:do:", "asJQuery"],
+source: unescape('onKeyPress%3A%20aBlock%0A%20%20%20%20self%20asJQuery%20bind%3A%20%27keypress%27%20do%3A%20aBlock'),
+messageSends: ["bind:do:", "asJQuery"],
 referencedClasses: []
 }),
 smalltalk.TagBrush);
@@ -1044,11 +1028,11 @@ selector: unescape('onKeyUp%3A'),
 category: 'events',
 fn: function (aBlock){
 var self=this;
-smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_on_do_", ["keyup", aBlock]);
+smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_bind_do_", ["keyup", aBlock]);
 return self;},
 args: ["aBlock"],
-source: unescape('onKeyUp%3A%20aBlock%0A%20%20%20%20self%20asJQuery%20on%3A%20%27keyup%27%20do%3A%20aBlock'),
-messageSends: ["on:do:", "asJQuery"],
+source: unescape('onKeyUp%3A%20aBlock%0A%20%20%20%20self%20asJQuery%20bind%3A%20%27keyup%27%20do%3A%20aBlock'),
+messageSends: ["bind:do:", "asJQuery"],
 referencedClasses: []
 }),
 smalltalk.TagBrush);
@@ -1060,11 +1044,11 @@ selector: unescape('onFocus%3A'),
 category: 'events',
 fn: function (aBlock){
 var self=this;
-smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_on_do_", ["focus", aBlock]);
+smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_bind_do_", ["focus", aBlock]);
 return self;},
 args: ["aBlock"],
-source: unescape('onFocus%3A%20aBlock%0A%20%20%20%20self%20asJQuery%20on%3A%20%27focus%27%20do%3A%20aBlock'),
-messageSends: ["on:do:", "asJQuery"],
+source: unescape('onFocus%3A%20aBlock%0A%20%20%20%20self%20asJQuery%20bind%3A%20%27focus%27%20do%3A%20aBlock'),
+messageSends: ["bind:do:", "asJQuery"],
 referencedClasses: []
 }),
 smalltalk.TagBrush);
@@ -1076,11 +1060,11 @@ selector: unescape('onBlur%3A'),
 category: 'events',
 fn: function (aBlock){
 var self=this;
-smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_on_do_", ["blur", aBlock]);
+smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_bind_do_", ["blur", aBlock]);
 return self;},
 args: ["aBlock"],
-source: unescape('onBlur%3A%20aBlock%0A%20%20%20%20self%20asJQuery%20on%3A%20%27blur%27%20do%3A%20aBlock'),
-messageSends: ["on:do:", "asJQuery"],
+source: unescape('onBlur%3A%20aBlock%0A%20%20%20%20self%20asJQuery%20bind%3A%20%27blur%27%20do%3A%20aBlock'),
+messageSends: ["bind:do:", "asJQuery"],
 referencedClasses: []
 }),
 smalltalk.TagBrush);
@@ -1092,11 +1076,11 @@ selector: unescape('onChange%3A'),
 category: 'events',
 fn: function (aBlock){
 var self=this;
-smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_on_do_", ["change", aBlock]);
+smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_bind_do_", ["change", aBlock]);
 return self;},
 args: ["aBlock"],
-source: unescape('onChange%3A%20aBlock%0A%20%20%20%20self%20asJQuery%20on%3A%20%27change%27%20do%3A%20aBlock'),
-messageSends: ["on:do:", "asJQuery"],
+source: unescape('onChange%3A%20aBlock%0A%20%20%20%20self%20asJQuery%20bind%3A%20%27change%27%20do%3A%20aBlock'),
+messageSends: ["bind:do:", "asJQuery"],
 referencedClasses: []
 }),
 smalltalk.TagBrush);
@@ -1108,11 +1092,11 @@ selector: unescape('onClick%3A'),
 category: 'events',
 fn: function (aBlock){
 var self=this;
-smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_on_do_", ["click", aBlock]);
+smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_bind_do_", ["click", aBlock]);
 return self;},
 args: ["aBlock"],
-source: unescape('onClick%3A%20aBlock%0A%20%20%20%20self%20asJQuery%20on%3A%20%27click%27%20do%3A%20aBlock'),
-messageSends: ["on:do:", "asJQuery"],
+source: unescape('onClick%3A%20aBlock%0A%20%20%20%20self%20asJQuery%20bind%3A%20%27click%27%20do%3A%20aBlock'),
+messageSends: ["bind:do:", "asJQuery"],
 referencedClasses: []
 }),
 smalltalk.TagBrush);
@@ -1141,12 +1125,12 @@ selector: unescape('initializeFromJQuery%3Acanvas%3A'),
 category: 'initialization',
 fn: function (aJQuery, aCanvas){
 var self=this;
-self['@element']=smalltalk.send(smalltalk.send(aJQuery, "_jquery", []), "_get_", [(0)]);
+self['@element']=smalltalk.send(aJQuery, "_get_", [(0)]);
 self['@canvas']=aCanvas;
 return self;},
 args: ["aJQuery", "aCanvas"],
-source: unescape('initializeFromJQuery%3A%20aJQuery%20canvas%3A%20aCanvas%0A%20%20%20%20element%20%3A%3D%20aJQuery%20jquery%20get%3A%200.%0A%20%20%20%20canvas%20%3A%3D%20aCanvas'),
-messageSends: ["get:", "jquery"],
+source: unescape('initializeFromJQuery%3A%20aJQuery%20canvas%3A%20aCanvas%0A%20%20%20%20element%20%3A%3D%20aJQuery%20get%3A%200.%0A%20%20%20%20canvas%20%3A%3D%20aCanvas'),
+messageSends: ["get:"],
 referencedClasses: []
 }),
 smalltalk.TagBrush);
@@ -1332,6 +1316,22 @@ smalltalk.Widget);
 
 
 
+smalltalk.addMethod(
+unescape('_appendToJQuery_'),
+smalltalk.method({
+selector: unescape('appendToJQuery%3A'),
+category: '*Canvas',
+fn: function (aJQuery){
+var self=this;
+smalltalk.send(aJQuery, "_append_", [smalltalk.send(self, "_asString", [])]);
+return self;},
+args: ["aJQuery"],
+source: unescape('appendToJQuery%3A%20aJQuery%0A%20%20%20%20aJQuery%20append%3A%20self%20asString'),
+messageSends: ["append:", "asString"],
+referencedClasses: []
+}),
+smalltalk.Object);
+
 smalltalk.addMethod(
 unescape('_appendToBrush_'),
 smalltalk.method({
@@ -1348,6 +1348,22 @@ referencedClasses: []
 }),
 smalltalk.Object);
 
+smalltalk.addMethod(
+unescape('_appendToJQuery_'),
+smalltalk.method({
+selector: unescape('appendToJQuery%3A'),
+category: '*Canvas',
+fn: function (aJQuery){
+var self=this;
+smalltalk.send(self, "_value_", [smalltalk.send((smalltalk.HTMLCanvas || HTMLCanvas), "_onJQuery_", [aJQuery])]);
+return self;},
+args: ["aJQuery"],
+source: unescape('appendToJQuery%3A%20aJQuery%0A%20%20%20%20self%20value%3A%20%28HTMLCanvas%20onJQuery%3A%20aJQuery%29'),
+messageSends: ["value:", "onJQuery:"],
+referencedClasses: [smalltalk.HTMLCanvas]
+}),
+smalltalk.BlockClosure);
+
 smalltalk.addMethod(
 unescape('_appendToBrush_'),
 smalltalk.method({
@@ -1364,6 +1380,38 @@ referencedClasses: []
 }),
 smalltalk.BlockClosure);
 
+smalltalk.addMethod(
+unescape('_asJQuery'),
+smalltalk.method({
+selector: unescape('asJQuery'),
+category: '*Canvas',
+fn: function (){
+var self=this;
+return jQuery(String(self));
+return self;},
+args: [],
+source: unescape('asJQuery%0A%20%20%20%20%3Creturn%20jQuery%28String%28self%29%29%3E'),
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.String);
+
+smalltalk.addMethod(
+unescape('_appendToJQuery_'),
+smalltalk.method({
+selector: unescape('appendToJQuery%3A'),
+category: '*Canvas',
+fn: function (aJQuery){
+var self=this;
+smalltalk.send(aJQuery, "_append_", [self]);
+return self;},
+args: ["aJQuery"],
+source: unescape('appendToJQuery%3A%20aJQuery%0A%20%20%20%20aJQuery%20append%3A%20self'),
+messageSends: ["append:"],
+referencedClasses: []
+}),
+smalltalk.String);
+
 smalltalk.addMethod(
 unescape('_appendToBrush_'),
 smalltalk.method({

File diff suppressed because it is too large
+ 5 - 5
js/IDE.deploy.js


File diff suppressed because it is too large
+ 13 - 13
js/IDE.js


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

@@ -1,39 +0,0 @@
-smalltalk.addClass('JQueryTest', smalltalk.TestCase, ['document'], 'JQuery-Tests');
-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(
-'_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(
-'_testEach',
-smalltalk.method({
-selector: 'testEach',
-fn: function (){
-var self=this;
-var classes=nil;
-classes=smalltalk.send((smalltalk.Array || 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 || JQuery), "_fromElement_", [element]), "_attr_", ["class"])]);})]);
-smalltalk.send(self, "_assert_equals_", [smalltalk.send(["firstname", "lastname"], "_printString", []), smalltalk.send(classes, "_printString", [])]);
-return self;}
-}),
-smalltalk.JQueryTest);
-
-
-

+ 0 - 54
js/JQuery-Tests.js

@@ -1,54 +0,0 @@
-smalltalk.addClass('JQueryTest', smalltalk.TestCase, ['document'], 'JQuery-Tests');
-smalltalk.addMethod(
-unescape('_setUp'),
-smalltalk.method({
-selector: unescape('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;},
-args: [],
-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(
-unescape('_testFind'),
-smalltalk.method({
-selector: unescape('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;},
-args: [],
-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.'),
-messageSends: ["assert:equals:", "html", "find:", "asJQuery"],
-referencedClasses: []
-}),
-smalltalk.JQueryTest);
-
-smalltalk.addMethod(
-unescape('_testEach'),
-smalltalk.method({
-selector: unescape('testEach'),
-category: 'tests',
-fn: function (){
-var self=this;
-var classes=nil;
-classes=smalltalk.send((smalltalk.Array || 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 || JQuery), "_fromElement_", [element]), "_attr_", ["class"])]);})]);
-smalltalk.send(self, "_assert_equals_", [smalltalk.send(["firstname", "lastname"], "_printString", []), smalltalk.send(classes, "_printString", [])]);
-return self;},
-args: [],
-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);
-
-
-

+ 0 - 826
js/JQuery.deploy.js

@@ -1,826 +0,0 @@
-smalltalk.addClass('JQuery', smalltalk.Object, ['jquery'], 'JQuery');
-smalltalk.addMethod(
-'_append_',
-smalltalk.method({
-selector: 'append:',
-fn: function (anObject){
-var self=this;
-smalltalk.send(anObject, "_appendToJQuery_", [self]);
-return self;}
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-'_appendElement_',
-smalltalk.method({
-selector: 'appendElement:',
-fn: function (anElement){
-var self=this;
-smalltalk.send(self, "_call_withArgument_", ["append", anElement]);
-return self;}
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-'_appendToJQuery_',
-smalltalk.method({
-selector: 'appendToJQuery:',
-fn: function (aJQuery){
-var self=this;
-smalltalk.send(aJQuery, "_appendElement_", [self['@jquery']]);
-return self;}
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-'_contents_',
-smalltalk.method({
-selector: 'contents:',
-fn: function (anObject){
-var self=this;
-smalltalk.send(self, "_empty", []);
-smalltalk.send(self, "_append_", [anObject]);
-return self;}
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-'_empty',
-smalltalk.method({
-selector: 'empty',
-fn: function (){
-var self=this;
-return smalltalk.send(self, "_call_", ["empty"]);
-return self;}
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-'_jquery',
-smalltalk.method({
-selector: 'jquery',
-fn: function (){
-var self=this;
-return self['@jquery'];
-return self;}
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-'_removeAttribute_',
-smalltalk.method({
-selector: 'removeAttribute:',
-fn: function (aString){
-var self=this;
-return smalltalk.send(self, "_call_withArgument_", ["removeAttribute", aString]);
-return self;}
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-'_attr_',
-smalltalk.method({
-selector: 'attr:',
-fn: function (aString){
-var self=this;
-return smalltalk.send(self, "_call_withArgument_", ["attr", aString]);
-return self;}
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-'_val',
-smalltalk.method({
-selector: 'val',
-fn: function (){
-var self=this;
-return smalltalk.send(self, "_call_", ["val"]);
-return self;}
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-'_val_',
-smalltalk.method({
-selector: 'val:',
-fn: function (aString){
-var self=this;
-smalltalk.send(self, "_call_withArgument_", ["val", aString]);
-return self;}
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-'_attrAt_put_',
-smalltalk.method({
-selector: 'attrAt:put:',
-fn: function (aString, anotherString){
-var self=this;
-self['@jquery'].attr(aString, anotherString);
-return self;}
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-'_cssAt_',
-smalltalk.method({
-selector: 'cssAt:',
-fn: function (aString){
-var self=this;
-return self['@jquery'].css(aString);
-return self;}
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-'_cssAt_put_',
-smalltalk.method({
-selector: 'cssAt:put:',
-fn: function (aString, anotherString){
-var self=this;
-self['@jquery'].css(aString, anotherString);
-return self;}
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-'_addClass_',
-smalltalk.method({
-selector: 'addClass:',
-fn: function (aString){
-var self=this;
-smalltalk.send(self, "_call_withArgument_", ["addClass", aString]);
-return self;}
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-'_removeClass_',
-smalltalk.method({
-selector: 'removeClass:',
-fn: function (aString){
-var self=this;
-smalltalk.send(self, "_call_withArgument_", ["removeClass", aString]);
-return self;}
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-'_toggleClass_',
-smalltalk.method({
-selector: 'toggleClass:',
-fn: function (aString){
-var self=this;
-smalltalk.send(self, "_call_withArgument_", ["toggleClass", aString]);
-return self;}
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-'_height',
-smalltalk.method({
-selector: 'height',
-fn: function (){
-var self=this;
-return smalltalk.send(self, "_call_", ["height"]);
-return self;}
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-'_height_',
-smalltalk.method({
-selector: 'height:',
-fn: function (anInteger){
-var self=this;
-smalltalk.send(self, "_call_withArgument_", ["height", anInteger]);
-return self;}
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-'_width_',
-smalltalk.method({
-selector: 'width:',
-fn: function (anInteger){
-var self=this;
-smalltalk.send(self, "_call_withArgument_", ["width", anInteger]);
-return self;}
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-'_width',
-smalltalk.method({
-selector: 'width',
-fn: function (){
-var self=this;
-return smalltalk.send(self, "_call_", ["width"]);
-return self;}
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-'_innerHeight',
-smalltalk.method({
-selector: 'innerHeight',
-fn: function (){
-var self=this;
-return smalltalk.send(self, "_call_", ["innerHeight"]);
-return self;}
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-'_innerWidth',
-smalltalk.method({
-selector: 'innerWidth',
-fn: function (){
-var self=this;
-return smalltalk.send(self, "_call_", ["innerWidth"]);
-return self;}
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-'_outerHeight',
-smalltalk.method({
-selector: 'outerHeight',
-fn: function (){
-var self=this;
-return smalltalk.send(self, "_call_", ["outerHeight"]);
-return self;}
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-'_outerWidth',
-smalltalk.method({
-selector: 'outerWidth',
-fn: function (){
-var self=this;
-return smalltalk.send(self, "_call_", ["outerWidth"]);
-return self;}
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-'_top',
-smalltalk.method({
-selector: 'top',
-fn: function (){
-var self=this;
-return smalltalk.send(smalltalk.send(self, "_call_", ["position"]), "_basicAt_", ["top"]);
-return self;}
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-'_left',
-smalltalk.method({
-selector: 'left',
-fn: function (){
-var self=this;
-return smalltalk.send(smalltalk.send(self, "_call_", ["position"]), "_basicAt_", ["left"]);
-return self;}
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-'_offsetLeft',
-smalltalk.method({
-selector: 'offsetLeft',
-fn: function (){
-var self=this;
-return smalltalk.send(smalltalk.send(self, "_call_", ["offset"]), "_basicAt_", ["left"]);
-return self;}
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-'_offsetTop',
-smalltalk.method({
-selector: 'offsetTop',
-fn: function (){
-var self=this;
-return smalltalk.send(smalltalk.send(self, "_call_", ["offset"]), "_basicAt_", ["top"]);
-return self;}
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-'_scrollLeft',
-smalltalk.method({
-selector: 'scrollLeft',
-fn: function (){
-var self=this;
-return smalltalk.send(self, "_call_", ["scrollLeft"]);
-return self;}
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-'_scrollTop',
-smalltalk.method({
-selector: 'scrollTop',
-fn: function (){
-var self=this;
-return smalltalk.send(self, "_call_", ["scrollTop"]);
-return self;}
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-'_scrollLeft_',
-smalltalk.method({
-selector: 'scrollLeft:',
-fn: function (anInteger){
-var self=this;
-smalltalk.send(self, "_call_withArgument_", ["scrollLeft", anInteger]);
-return self;}
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-'_scrollTop_',
-smalltalk.method({
-selector: 'scrollTop:',
-fn: function (anInteger){
-var self=this;
-smalltalk.send(self, "_call_withArgument_", ["scrollTop", anInteger]);
-return self;}
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-'_fadeIn',
-smalltalk.method({
-selector: 'fadeIn',
-fn: function (){
-var self=this;
-smalltalk.send(self, "_call_", ["fadeIn"]);
-return self;}
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-'_slideDown',
-smalltalk.method({
-selector: 'slideDown',
-fn: function (){
-var self=this;
-smalltalk.send(self, "_call_", ["slideDown"]);
-return self;}
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-'_fadeInSlow',
-smalltalk.method({
-selector: 'fadeInSlow',
-fn: function (){
-var self=this;
-smalltalk.send(self, "_call_withArgument_", ["fadeIn", "slow"]);
-return self;}
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-'_fadeOut',
-smalltalk.method({
-selector: 'fadeOut',
-fn: function (){
-var self=this;
-smalltalk.send(self, "_call_", ["fadeOut"]);
-return self;}
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-'_fadeOutSlow',
-smalltalk.method({
-selector: 'fadeOutSlow',
-fn: function (){
-var self=this;
-smalltalk.send(self, "_call_withArgument_", ["fadeOut", "slow"]);
-return self;}
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-'_slideUp',
-smalltalk.method({
-selector: 'slideUp',
-fn: function (){
-var self=this;
-smalltalk.send(self, "_call_", ["slideUp"]);
-return self;}
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-'_fadeOut_do_',
-smalltalk.method({
-selector: 'fadeOut:do:',
-fn: function (aString, aBlock){
-var self=this;
-self['@jquery'].fadeOut(aString, aBlock);
-return self;}
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-'_do_',
-smalltalk.method({
-selector: 'do:',
-fn: function (aBlock){
-var self=this;
-smalltalk.send(self, "_elementsDo_", [(function(anElement){return smalltalk.send(aBlock, "_value_", [smalltalk.send((smalltalk.JQuery || JQuery), "_fromElement_", [anElement])]);})]);
-return self;}
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-'_focus',
-smalltalk.method({
-selector: 'focus',
-fn: function (){
-var self=this;
-smalltalk.send(self, "_call_", ["focus"]);
-return self;}
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-'_show',
-smalltalk.method({
-selector: 'show',
-fn: function (){
-var self=this;
-smalltalk.send(self, "_call_", ["show"]);
-return self;}
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-'_hide',
-smalltalk.method({
-selector: 'hide',
-fn: function (){
-var self=this;
-smalltalk.send(self, "_call_", ["hide"]);
-return self;}
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-'_remove',
-smalltalk.method({
-selector: 'remove',
-fn: function (){
-var self=this;
-smalltalk.send(self, "_call_", ["remove"]);
-return self;}
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-'_on_do_',
-smalltalk.method({
-selector: 'on:do:',
-fn: function (anEventString, aBlock){
-var self=this;
-self['@jquery'].bind(anEventString, function(e){aBlock(e, self)});
-return self;}
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-'_removeEvents_',
-smalltalk.method({
-selector: 'removeEvents:',
-fn: function (aString){
-var self=this;
-smalltalk.send(self, "_call_withArgument_", ["unbind", aString]);
-return self;}
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-'_onLoadDo_',
-smalltalk.method({
-selector: 'onLoadDo:',
-fn: function (aBlock){
-var self=this;
-smalltalk.send(self, "_call_withArgument_", ["load", aBlock]);
-return self;}
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-'_initializeWithJQueryObject_',
-smalltalk.method({
-selector: 'initializeWithJQueryObject:',
-fn: function (anObject){
-var self=this;
-self['@jquery']=anObject;
-return self;}
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-'_call_',
-smalltalk.method({
-selector: 'call:',
-fn: function (aString){
-var self=this;
-return self['@jquery'][aString]();
-return self;}
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-'_call_withArgument_',
-smalltalk.method({
-selector: 'call:withArgument:',
-fn: function (aString, anObject){
-var self=this;
-return self['@jquery'][aString](anObject);
-return self;}
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-'_elementsDo_',
-smalltalk.method({
-selector: 'elementsDo:',
-fn: function (aBlock){
-var self=this;
-self['@jquery'].each(function(index, element){aBlock(element, self)});
-return self;}
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-'_hasClass_',
-smalltalk.method({
-selector: 'hasClass:',
-fn: function (aString){
-var self=this;
-return smalltalk.send(self, "_call_withArgument_", ["hasClass", aString]);
-return self;}
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-'_find_',
-smalltalk.method({
-selector: 'find:',
-fn: function (aSelector){
-var self=this;
-return smalltalk.send(self, "_call_withArgument_", ["find", aSelector]);
-return self;}
-}),
-smalltalk.JQuery);
-
-
-smalltalk.addMethod(
-'_fromString_',
-smalltalk.method({
-selector: 'fromString:',
-fn: function (aString){
-var self=this;
-var newJQuery=nil;
-newJQuery = jQuery(String(aString));
-return smalltalk.send(self, "_from_", [newJQuery]);
-return self;}
-}),
-smalltalk.JQuery.klass);
-
-smalltalk.addMethod(
-'_from_',
-smalltalk.method({
-selector: 'from:',
-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;}
-}),
-smalltalk.JQuery.klass);
-
-smalltalk.addMethod(
-'_window',
-smalltalk.method({
-selector: 'window',
-fn: function (){
-var self=this;
-return self._from_(jQuery(window));
-return self;}
-}),
-smalltalk.JQuery.klass);
-
-smalltalk.addMethod(
-'_body',
-smalltalk.method({
-selector: 'body',
-fn: function (){
-var self=this;
-return self._from_(jQuery('body'));
-return self;}
-}),
-smalltalk.JQuery.klass);
-
-smalltalk.addMethod(
-'_document',
-smalltalk.method({
-selector: 'document',
-fn: function (){
-var self=this;
-return self._from_(jQuery(document));
-return self;}
-}),
-smalltalk.JQuery.klass);
-
-smalltalk.addMethod(
-'_fromElement_',
-smalltalk.method({
-selector: 'fromElement:',
-fn: function (anElement){
-var self=this;
-var newJQuery=nil;
-newJQuery = jQuery(anElement);
-return smalltalk.send(self, "_from_", [newJQuery]);
-return self;}
-}),
-smalltalk.JQuery.klass);
-
-smalltalk.addMethod(
-'_documentReady_',
-smalltalk.method({
-selector: 'documentReady:',
-fn: function (aBlock){
-var self=this;
-jQuery(document).ready(aBlock);
-return self;}
-}),
-smalltalk.JQuery.klass);
-
-
-smalltalk.addClass('Ajax', smalltalk.Object, ['settings'], 'JQuery');
-smalltalk.addMethod(
-'_at_',
-smalltalk.method({
-selector: 'at:',
-fn: function (aKey){
-var self=this;
-return smalltalk.send(self['@settings'], "_at_ifAbsent_", [aKey, (function(){return nil;})]);
-return self;}
-}),
-smalltalk.Ajax);
-
-smalltalk.addMethod(
-'_at_put_',
-smalltalk.method({
-selector: 'at:put:',
-fn: function (aKey, aValue){
-var self=this;
-smalltalk.send(self['@settings'], "_at_put_", [aKey, aValue]);
-return self;}
-}),
-smalltalk.Ajax);
-
-smalltalk.addMethod(
-'_url',
-smalltalk.method({
-selector: 'url',
-fn: function (){
-var self=this;
-return smalltalk.send(self, "_at_", ["url"]);
-return self;}
-}),
-smalltalk.Ajax);
-
-smalltalk.addMethod(
-'_url_',
-smalltalk.method({
-selector: 'url:',
-fn: function (aString){
-var self=this;
-smalltalk.send(self, "_at_put_", ["url", aString]);
-return self;}
-}),
-smalltalk.Ajax);
-
-smalltalk.addMethod(
-'_send',
-smalltalk.method({
-selector: 'send',
-fn: function (){
-var self=this;
-jQuery.ajax(self['@settings']);
-return self;}
-}),
-smalltalk.Ajax);
-
-smalltalk.addMethod(
-'_onSuccessDo_',
-smalltalk.method({
-selector: 'onSuccessDo:',
-fn: function (aBlock){
-var self=this;
-smalltalk.send(self, "_at_put_", ["success", aBlock]);
-return self;}
-}),
-smalltalk.Ajax);
-
-smalltalk.addMethod(
-'_onCompleteDo_',
-smalltalk.method({
-selector: 'onCompleteDo:',
-fn: function (aBlock){
-var self=this;
-smalltalk.send(self, "_at_put_", ["complete", aBlock]);
-return self;}
-}),
-smalltalk.Ajax);
-
-smalltalk.addMethod(
-'_onErrorDo_',
-smalltalk.method({
-selector: 'onErrorDo:',
-fn: function (aBlock){
-var self=this;
-smalltalk.send(self, "_at_put_", ["error", aBlock]);
-return self;}
-}),
-smalltalk.Ajax);
-
-smalltalk.addMethod(
-'_initialize',
-smalltalk.method({
-selector: 'initialize',
-fn: function (){
-var self=this;
-smalltalk.send(self, "_initialize", [], smalltalk.Object);
-self['@settings']=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []);
-return self;}
-}),
-smalltalk.Ajax);
-
-
-smalltalk.addMethod(
-'_url_',
-smalltalk.method({
-selector: 'url:',
-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;}
-}),
-smalltalk.Ajax.klass);
-
-
-smalltalk.addMethod(
-'_appendToJQuery_',
-smalltalk.method({
-selector: 'appendToJQuery:',
-fn: function (aJQuery){
-var self=this;
-smalltalk.send(self, "_value_", [smalltalk.send((smalltalk.HTMLCanvas || HTMLCanvas), "_onJQuery_", [aJQuery])]);
-return self;}
-}),
-smalltalk.BlockClosure);
-
-smalltalk.addMethod(
-'_asJQuery',
-smalltalk.method({
-selector: 'asJQuery',
-fn: function (){
-var self=this;
-return smalltalk.send((smalltalk.JQuery || JQuery), "_fromString_", [self]);
-return self;}
-}),
-smalltalk.String);
-
-smalltalk.addMethod(
-'_appendToJQuery_',
-smalltalk.method({
-selector: 'appendToJQuery:',
-fn: function (aJQuery){
-var self=this;
-aJQuery._appendElement_(String(self));
-return self;}
-}),
-smalltalk.String);
-
-smalltalk.addMethod(
-'_appendToJQuery_',
-smalltalk.method({
-selector: 'appendToJQuery:',
-fn: function (aJQuery){
-var self=this;
-smalltalk.send(aJQuery, "_appendElement_", [smalltalk.send(self['@root'], "_element", [])]);
-return self;}
-}),
-smalltalk.HTMLCanvas);
-

+ 0 - 1197
js/JQuery.js

@@ -1,1197 +0,0 @@
-smalltalk.addClass('JQuery', smalltalk.Object, ['jquery'], 'JQuery');
-smalltalk.addMethod(
-unescape('_append_'),
-smalltalk.method({
-selector: unescape('append%3A'),
-category: 'DOM insertion',
-fn: function (anObject){
-var self=this;
-smalltalk.send(anObject, "_appendToJQuery_", [self]);
-return self;},
-args: ["anObject"],
-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'),
-messageSends: ["appendToJQuery:"],
-referencedClasses: []
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-unescape('_appendElement_'),
-smalltalk.method({
-selector: unescape('appendElement%3A'),
-category: 'DOM insertion',
-fn: function (anElement){
-var self=this;
-smalltalk.send(self, "_call_withArgument_", ["append", anElement]);
-return self;},
-args: ["anElement"],
-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'),
-messageSends: ["call:withArgument:"],
-referencedClasses: []
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-unescape('_appendToJQuery_'),
-smalltalk.method({
-selector: unescape('appendToJQuery%3A'),
-category: 'DOM insertion',
-fn: function (aJQuery){
-var self=this;
-smalltalk.send(aJQuery, "_appendElement_", [self['@jquery']]);
-return self;},
-args: ["aJQuery"],
-source: unescape('appendToJQuery%3A%20aJQuery%0A%20%20%20%20aJQuery%20appendElement%3A%20jquery'),
-messageSends: ["appendElement:"],
-referencedClasses: []
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-unescape('_contents_'),
-smalltalk.method({
-selector: unescape('contents%3A'),
-category: 'DOM insertion',
-fn: function (anObject){
-var self=this;
-smalltalk.send(self, "_empty", []);
-smalltalk.send(self, "_append_", [anObject]);
-return self;},
-args: ["anObject"],
-source: unescape('contents%3A%20anObject%0A%20%20%20%20self%20empty.%0A%20%20%20%20self%20append%3A%20anObject'),
-messageSends: ["empty", "append:"],
-referencedClasses: []
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-unescape('_empty'),
-smalltalk.method({
-selector: unescape('empty'),
-category: 'DOM insertion',
-fn: function (){
-var self=this;
-return smalltalk.send(self, "_call_", ["empty"]);
-return self;},
-args: [],
-source: unescape('empty%0A%20%20%20%20%5Eself%20call%3A%20%27empty%27'),
-messageSends: ["call:"],
-referencedClasses: []
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-unescape('_jquery'),
-smalltalk.method({
-selector: unescape('jquery'),
-category: 'accessing',
-fn: function (){
-var self=this;
-return self['@jquery'];
-return self;},
-args: [],
-source: unescape('jquery%0A%09%5Ejquery'),
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-unescape('_removeAttribute_'),
-smalltalk.method({
-selector: unescape('removeAttribute%3A'),
-category: 'attributes',
-fn: function (aString){
-var self=this;
-return smalltalk.send(self, "_call_withArgument_", ["removeAttribute", aString]);
-return self;},
-args: ["aString"],
-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'),
-messageSends: ["call:withArgument:"],
-referencedClasses: []
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-unescape('_attr_'),
-smalltalk.method({
-selector: unescape('attr%3A'),
-category: 'attributes',
-fn: function (aString){
-var self=this;
-return smalltalk.send(self, "_call_withArgument_", ["attr", aString]);
-return self;},
-args: ["aString"],
-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'),
-messageSends: ["call:withArgument:"],
-referencedClasses: []
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-unescape('_val'),
-smalltalk.method({
-selector: unescape('val'),
-category: 'attributes',
-fn: function (){
-var self=this;
-return smalltalk.send(self, "_call_", ["val"]);
-return self;},
-args: [],
-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'),
-messageSends: ["call:"],
-referencedClasses: []
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-unescape('_val_'),
-smalltalk.method({
-selector: unescape('val%3A'),
-category: 'attributes',
-fn: function (aString){
-var self=this;
-smalltalk.send(self, "_call_withArgument_", ["val", aString]);
-return self;},
-args: ["aString"],
-source: unescape('val%3A%20aString%0A%20%20%20%20self%20call%3A%20%27val%27%20withArgument%3A%20aString'),
-messageSends: ["call:withArgument:"],
-referencedClasses: []
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-unescape('_attrAt_put_'),
-smalltalk.method({
-selector: unescape('attrAt%3Aput%3A'),
-category: 'attributes',
-fn: function (aString, anotherString){
-var self=this;
-self['@jquery'].attr(aString, anotherString);
-return self;},
-args: ["aString", "anotherString"],
-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(
-unescape('_cssAt_'),
-smalltalk.method({
-selector: unescape('cssAt%3A'),
-category: 'css',
-fn: function (aString){
-var self=this;
-return self['@jquery'].css(aString);
-return self;},
-args: ["aString"],
-source: unescape('cssAt%3A%20aString%0A%09%3Creturn%20self%5B%27@jquery%27%5D.css%28aString%29%3E'),
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-unescape('_cssAt_put_'),
-smalltalk.method({
-selector: unescape('cssAt%3Aput%3A'),
-category: 'css',
-fn: function (aString, anotherString){
-var self=this;
-self['@jquery'].css(aString, anotherString);
-return self;},
-args: ["aString", "anotherString"],
-source: unescape('cssAt%3A%20aString%20put%3A%20anotherString%0A%20%20%20%20%3Cself%5B%27@jquery%27%5D.css%28aString%2C%20anotherString%29%3E'),
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-unescape('_addClass_'),
-smalltalk.method({
-selector: unescape('addClass%3A'),
-category: 'css',
-fn: function (aString){
-var self=this;
-smalltalk.send(self, "_call_withArgument_", ["addClass", aString]);
-return self;},
-args: ["aString"],
-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'),
-messageSends: ["call:withArgument:"],
-referencedClasses: []
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-unescape('_removeClass_'),
-smalltalk.method({
-selector: unescape('removeClass%3A'),
-category: 'css',
-fn: function (aString){
-var self=this;
-smalltalk.send(self, "_call_withArgument_", ["removeClass", aString]);
-return self;},
-args: ["aString"],
-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'),
-messageSends: ["call:withArgument:"],
-referencedClasses: []
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-unescape('_toggleClass_'),
-smalltalk.method({
-selector: unescape('toggleClass%3A'),
-category: 'css',
-fn: function (aString){
-var self=this;
-smalltalk.send(self, "_call_withArgument_", ["toggleClass", aString]);
-return self;},
-args: ["aString"],
-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'),
-messageSends: ["call:withArgument:"],
-referencedClasses: []
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-unescape('_height'),
-smalltalk.method({
-selector: unescape('height'),
-category: 'css',
-fn: function (){
-var self=this;
-return smalltalk.send(self, "_call_", ["height"]);
-return self;},
-args: [],
-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'),
-messageSends: ["call:"],
-referencedClasses: []
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-unescape('_height_'),
-smalltalk.method({
-selector: unescape('height%3A'),
-category: 'css',
-fn: function (anInteger){
-var self=this;
-smalltalk.send(self, "_call_withArgument_", ["height", anInteger]);
-return self;},
-args: ["anInteger"],
-source: unescape('height%3A%20anInteger%0A%20%20%20%20self%20call%3A%20%27height%27%20withArgument%3A%20anInteger'),
-messageSends: ["call:withArgument:"],
-referencedClasses: []
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-unescape('_width_'),
-smalltalk.method({
-selector: unescape('width%3A'),
-category: 'css',
-fn: function (anInteger){
-var self=this;
-smalltalk.send(self, "_call_withArgument_", ["width", anInteger]);
-return self;},
-args: ["anInteger"],
-source: unescape('width%3A%20anInteger%0A%20%20%20%20self%20call%3A%20%27width%27%20withArgument%3A%20anInteger'),
-messageSends: ["call:withArgument:"],
-referencedClasses: []
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-unescape('_width'),
-smalltalk.method({
-selector: unescape('width'),
-category: 'css',
-fn: function (){
-var self=this;
-return smalltalk.send(self, "_call_", ["width"]);
-return self;},
-args: [],
-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'),
-messageSends: ["call:"],
-referencedClasses: []
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-unescape('_innerHeight'),
-smalltalk.method({
-selector: unescape('innerHeight'),
-category: 'css',
-fn: function (){
-var self=this;
-return smalltalk.send(self, "_call_", ["innerHeight"]);
-return self;},
-args: [],
-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'),
-messageSends: ["call:"],
-referencedClasses: []
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-unescape('_innerWidth'),
-smalltalk.method({
-selector: unescape('innerWidth'),
-category: 'css',
-fn: function (){
-var self=this;
-return smalltalk.send(self, "_call_", ["innerWidth"]);
-return self;},
-args: [],
-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'),
-messageSends: ["call:"],
-referencedClasses: []
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-unescape('_outerHeight'),
-smalltalk.method({
-selector: unescape('outerHeight'),
-category: 'css',
-fn: function (){
-var self=this;
-return smalltalk.send(self, "_call_", ["outerHeight"]);
-return self;},
-args: [],
-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'),
-messageSends: ["call:"],
-referencedClasses: []
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-unescape('_outerWidth'),
-smalltalk.method({
-selector: unescape('outerWidth'),
-category: 'css',
-fn: function (){
-var self=this;
-return smalltalk.send(self, "_call_", ["outerWidth"]);
-return self;},
-args: [],
-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'),
-messageSends: ["call:"],
-referencedClasses: []
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-unescape('_top'),
-smalltalk.method({
-selector: unescape('top'),
-category: 'css',
-fn: function (){
-var self=this;
-return smalltalk.send(smalltalk.send(self, "_call_", ["position"]), "_basicAt_", ["top"]);
-return self;},
-args: [],
-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'),
-messageSends: ["basicAt:", "call:"],
-referencedClasses: []
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-unescape('_left'),
-smalltalk.method({
-selector: unescape('left'),
-category: 'css',
-fn: function (){
-var self=this;
-return smalltalk.send(smalltalk.send(self, "_call_", ["position"]), "_basicAt_", ["left"]);
-return self;},
-args: [],
-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'),
-messageSends: ["basicAt:", "call:"],
-referencedClasses: []
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-unescape('_offsetLeft'),
-smalltalk.method({
-selector: unescape('offsetLeft'),
-category: 'css',
-fn: function (){
-var self=this;
-return smalltalk.send(smalltalk.send(self, "_call_", ["offset"]), "_basicAt_", ["left"]);
-return self;},
-args: [],
-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'),
-messageSends: ["basicAt:", "call:"],
-referencedClasses: []
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-unescape('_offsetTop'),
-smalltalk.method({
-selector: unescape('offsetTop'),
-category: 'css',
-fn: function (){
-var self=this;
-return smalltalk.send(smalltalk.send(self, "_call_", ["offset"]), "_basicAt_", ["top"]);
-return self;},
-args: [],
-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'),
-messageSends: ["basicAt:", "call:"],
-referencedClasses: []
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-unescape('_scrollLeft'),
-smalltalk.method({
-selector: unescape('scrollLeft'),
-category: 'css',
-fn: function (){
-var self=this;
-return smalltalk.send(self, "_call_", ["scrollLeft"]);
-return self;},
-args: [],
-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'),
-messageSends: ["call:"],
-referencedClasses: []
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-unescape('_scrollTop'),
-smalltalk.method({
-selector: unescape('scrollTop'),
-category: 'css',
-fn: function (){
-var self=this;
-return smalltalk.send(self, "_call_", ["scrollTop"]);
-return self;},
-args: [],
-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'),
-messageSends: ["call:"],
-referencedClasses: []
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-unescape('_scrollLeft_'),
-smalltalk.method({
-selector: unescape('scrollLeft%3A'),
-category: 'css',
-fn: function (anInteger){
-var self=this;
-smalltalk.send(self, "_call_withArgument_", ["scrollLeft", anInteger]);
-return self;},
-args: ["anInteger"],
-source: unescape('scrollLeft%3A%20anInteger%0A%20%20%20%20self%20call%3A%20%27scrollLeft%27%20withArgument%3A%20anInteger'),
-messageSends: ["call:withArgument:"],
-referencedClasses: []
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-unescape('_scrollTop_'),
-smalltalk.method({
-selector: unescape('scrollTop%3A'),
-category: 'css',
-fn: function (anInteger){
-var self=this;
-smalltalk.send(self, "_call_withArgument_", ["scrollTop", anInteger]);
-return self;},
-args: ["anInteger"],
-source: unescape('scrollTop%3A%20anInteger%0A%20%20%20%20self%20call%3A%20%27scrollTop%27%20withArgument%3A%20anInteger'),
-messageSends: ["call:withArgument:"],
-referencedClasses: []
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-unescape('_fadeIn'),
-smalltalk.method({
-selector: unescape('fadeIn'),
-category: 'effects',
-fn: function (){
-var self=this;
-smalltalk.send(self, "_call_", ["fadeIn"]);
-return self;},
-args: [],
-source: unescape('fadeIn%0A%20%09self%20call%3A%20%27fadeIn%27'),
-messageSends: ["call:"],
-referencedClasses: []
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-unescape('_slideDown'),
-smalltalk.method({
-selector: unescape('slideDown'),
-category: 'effects',
-fn: function (){
-var self=this;
-smalltalk.send(self, "_call_", ["slideDown"]);
-return self;},
-args: [],
-source: unescape('slideDown%0A%20%09self%20call%3A%20%27slideDown%27'),
-messageSends: ["call:"],
-referencedClasses: []
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-unescape('_fadeInSlow'),
-smalltalk.method({
-selector: unescape('fadeInSlow'),
-category: 'effects',
-fn: function (){
-var self=this;
-smalltalk.send(self, "_call_withArgument_", ["fadeIn", "slow"]);
-return self;},
-args: [],
-source: unescape('fadeInSlow%0A%20%09self%20call%3A%20%27fadeIn%27%20withArgument%3A%20%27slow%27'),
-messageSends: ["call:withArgument:"],
-referencedClasses: []
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-unescape('_fadeOut'),
-smalltalk.method({
-selector: unescape('fadeOut'),
-category: 'effects',
-fn: function (){
-var self=this;
-smalltalk.send(self, "_call_", ["fadeOut"]);
-return self;},
-args: [],
-source: unescape('fadeOut%0A%20%09self%20call%3A%20%27fadeOut%27'),
-messageSends: ["call:"],
-referencedClasses: []
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-unescape('_fadeOutSlow'),
-smalltalk.method({
-selector: unescape('fadeOutSlow'),
-category: 'effects',
-fn: function (){
-var self=this;
-smalltalk.send(self, "_call_withArgument_", ["fadeOut", "slow"]);
-return self;},
-args: [],
-source: unescape('fadeOutSlow%0A%20%09self%20call%3A%20%27fadeOut%27%20withArgument%3A%20%27slow%27'),
-messageSends: ["call:withArgument:"],
-referencedClasses: []
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-unescape('_slideUp'),
-smalltalk.method({
-selector: unescape('slideUp'),
-category: 'effects',
-fn: function (){
-var self=this;
-smalltalk.send(self, "_call_", ["slideUp"]);
-return self;},
-args: [],
-source: unescape('slideUp%0A%20%09self%20call%3A%20%27slideUp%27'),
-messageSends: ["call:"],
-referencedClasses: []
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-unescape('_fadeOut_do_'),
-smalltalk.method({
-selector: unescape('fadeOut%3Ado%3A'),
-category: 'effects',
-fn: function (aString, aBlock){
-var self=this;
-self['@jquery'].fadeOut(aString, aBlock);
-return self;},
-args: ["aString", "aBlock"],
-source: unescape('fadeOut%3A%20aString%20do%3A%20aBlock%0A%20%20%20%20%3Cself%5B%27@jquery%27%5D.fadeOut%28aString%2C%20aBlock%29%3E'),
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-unescape('_do_'),
-smalltalk.method({
-selector: unescape('do%3A'),
-category: 'enumerating',
-fn: function (aBlock){
-var self=this;
-smalltalk.send(self, "_elementsDo_", [(function(anElement){return smalltalk.send(aBlock, "_value_", [smalltalk.send((smalltalk.JQuery || JQuery), "_fromElement_", [anElement])]);})]);
-return self;},
-args: ["aBlock"],
-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(
-unescape('_focus'),
-smalltalk.method({
-selector: unescape('focus'),
-category: 'events',
-fn: function (){
-var self=this;
-smalltalk.send(self, "_call_", ["focus"]);
-return self;},
-args: [],
-source: unescape('focus%0A%20%20%20%20self%20call%3A%20%27focus%27'),
-messageSends: ["call:"],
-referencedClasses: []
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-unescape('_show'),
-smalltalk.method({
-selector: unescape('show'),
-category: 'events',
-fn: function (){
-var self=this;
-smalltalk.send(self, "_call_", ["show"]);
-return self;},
-args: [],
-source: unescape('show%0A%20%20%20%20self%20call%3A%20%27show%27'),
-messageSends: ["call:"],
-referencedClasses: []
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-unescape('_hide'),
-smalltalk.method({
-selector: unescape('hide'),
-category: 'events',
-fn: function (){
-var self=this;
-smalltalk.send(self, "_call_", ["hide"]);
-return self;},
-args: [],
-source: unescape('hide%0A%20%20%20%20self%20call%3A%20%27hide%27'),
-messageSends: ["call:"],
-referencedClasses: []
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-unescape('_remove'),
-smalltalk.method({
-selector: unescape('remove'),
-category: 'events',
-fn: function (){
-var self=this;
-smalltalk.send(self, "_call_", ["remove"]);
-return self;},
-args: [],
-source: unescape('remove%0A%20%20%20%20self%20call%3A%20%27remove%27'),
-messageSends: ["call:"],
-referencedClasses: []
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-unescape('_on_do_'),
-smalltalk.method({
-selector: unescape('on%3Ado%3A'),
-category: 'events',
-fn: function (anEventString, aBlock){
-var self=this;
-self['@jquery'].bind(anEventString, function(e){aBlock(e, self)});
-return self;},
-args: ["anEventString", "aBlock"],
-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%3Cself%5B%27@jquery%27%5D.bind%28anEventString%2C%20function%28e%29%7BaBlock%28e%2C%20self%29%7D%29%3E'),
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-unescape('_removeEvents_'),
-smalltalk.method({
-selector: unescape('removeEvents%3A'),
-category: 'events',
-fn: function (aString){
-var self=this;
-smalltalk.send(self, "_call_withArgument_", ["unbind", aString]);
-return self;},
-args: ["aString"],
-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'),
-messageSends: ["call:withArgument:"],
-referencedClasses: []
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-unescape('_onLoadDo_'),
-smalltalk.method({
-selector: unescape('onLoadDo%3A'),
-category: 'events',
-fn: function (aBlock){
-var self=this;
-smalltalk.send(self, "_call_withArgument_", ["load", aBlock]);
-return self;},
-args: ["aBlock"],
-source: unescape('onLoadDo%3A%20aBlock%0A%09%22Bind%20an%20event%20handler%20to%20the%20%27load%27%20JavaScript%20event.%22%0A%09self%20call%3A%20%27load%27%20withArgument%3A%20aBlock'),
-messageSends: ["call:withArgument:"],
-referencedClasses: []
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-unescape('_initializeWithJQueryObject_'),
-smalltalk.method({
-selector: unescape('initializeWithJQueryObject%3A'),
-category: 'initialization',
-fn: function (anObject){
-var self=this;
-self['@jquery']=anObject;
-return self;},
-args: ["anObject"],
-source: unescape('initializeWithJQueryObject%3A%20anObject%0A%20%20%20%20jquery%20%3A%3D%20anObject'),
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-unescape('_call_'),
-smalltalk.method({
-selector: unescape('call%3A'),
-category: 'private',
-fn: function (aString){
-var self=this;
-return self['@jquery'][aString]();
-return self;},
-args: ["aString"],
-source: unescape('call%3A%20aString%0A%09%3Creturn%20self%5B%27@jquery%27%5D%5BaString%5D%28%29%3E'),
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-unescape('_call_withArgument_'),
-smalltalk.method({
-selector: unescape('call%3AwithArgument%3A'),
-category: 'private',
-fn: function (aString, anObject){
-var self=this;
-return self['@jquery'][aString](anObject);
-return self;},
-args: ["aString", "anObject"],
-source: unescape('call%3A%20aString%20withArgument%3A%20anObject%0A%20%20%20%20%3Creturn%20self%5B%27@jquery%27%5D%5BaString%5D%28anObject%29%3E'),
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-unescape('_elementsDo_'),
-smalltalk.method({
-selector: unescape('elementsDo%3A'),
-category: 'private',
-fn: function (aBlock){
-var self=this;
-self['@jquery'].each(function(index, element){aBlock(element, self)});
-return self;},
-args: ["aBlock"],
-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(
-unescape('_hasClass_'),
-smalltalk.method({
-selector: unescape('hasClass%3A'),
-category: 'testing',
-fn: function (aString){
-var self=this;
-return smalltalk.send(self, "_call_withArgument_", ["hasClass", aString]);
-return self;},
-args: ["aString"],
-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'),
-messageSends: ["call:withArgument:"],
-referencedClasses: []
-}),
-smalltalk.JQuery);
-
-smalltalk.addMethod(
-unescape('_find_'),
-smalltalk.method({
-selector: unescape('find%3A'),
-category: 'traversing',
-fn: function (aSelector){
-var self=this;
-return smalltalk.send(self, "_call_withArgument_", ["find", aSelector]);
-return self;},
-args: ["aSelector"],
-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(
-unescape('_fromString_'),
-smalltalk.method({
-selector: unescape('fromString%3A'),
-category: 'instance creation',
-fn: function (aString){
-var self=this;
-var newJQuery=nil;
-newJQuery = jQuery(String(aString));
-return smalltalk.send(self, "_from_", [newJQuery]);
-return self;},
-args: ["aString"],
-source: unescape('fromString%3A%20aString%0A%20%20%20%20%7C%20newJQuery%20%7C%0A%20%20%20%20%3CnewJQuery%20%3D%20jQuery%28String%28aString%29%29%3E.%0A%20%20%20%20%5Eself%20from%3A%20newJQuery'),
-messageSends: ["from:"],
-referencedClasses: []
-}),
-smalltalk.JQuery.klass);
-
-smalltalk.addMethod(
-unescape('_from_'),
-smalltalk.method({
-selector: unescape('from%3A'),
-category: 'instance creation',
-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;},
-args: ["anObject"],
-source: unescape('from%3A%20anObject%0A%20%20%20%20%5Eself%20new%0A%09initializeWithJQueryObject%3A%20anObject%3B%0A%09yourself'),
-messageSends: ["initializeWithJQueryObject:", "yourself", "new"],
-referencedClasses: []
-}),
-smalltalk.JQuery.klass);
-
-smalltalk.addMethod(
-unescape('_window'),
-smalltalk.method({
-selector: unescape('window'),
-category: 'instance creation',
-fn: function (){
-var self=this;
-return self._from_(jQuery(window));
-return self;},
-args: [],
-source: unescape('window%0A%09%3Creturn%20self._from_%28jQuery%28window%29%29%3E'),
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.JQuery.klass);
-
-smalltalk.addMethod(
-unescape('_body'),
-smalltalk.method({
-selector: unescape('body'),
-category: 'instance creation',
-fn: function (){
-var self=this;
-return self._from_(jQuery('body'));
-return self;},
-args: [],
-source: unescape('body%0A%09%3Creturn%20self._from_%28jQuery%28%27body%27%29%29%3E'),
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.JQuery.klass);
-
-smalltalk.addMethod(
-unescape('_document'),
-smalltalk.method({
-selector: unescape('document'),
-category: 'instance creation',
-fn: function (){
-var self=this;
-return self._from_(jQuery(document));
-return self;},
-args: [],
-source: unescape('document%0A%09%3Creturn%20self._from_%28jQuery%28document%29%29%3E'),
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.JQuery.klass);
-
-smalltalk.addMethod(
-unescape('_fromElement_'),
-smalltalk.method({
-selector: unescape('fromElement%3A'),
-category: 'instance creation',
-fn: function (anElement){
-var self=this;
-var newJQuery=nil;
-newJQuery = jQuery(anElement);
-return smalltalk.send(self, "_from_", [newJQuery]);
-return self;},
-args: ["anElement"],
-source: unescape('fromElement%3A%20anElement%0A%20%20%20%20%7C%20newJQuery%20%7C%0A%20%20%20%20%3CnewJQuery%20%3D%20jQuery%28anElement%29%3E.%0A%20%20%20%20%5Eself%20from%3A%20newJQuery'),
-messageSends: ["from:"],
-referencedClasses: []
-}),
-smalltalk.JQuery.klass);
-
-smalltalk.addMethod(
-unescape('_documentReady_'),
-smalltalk.method({
-selector: unescape('documentReady%3A'),
-category: 'instance creation',
-fn: function (aBlock){
-var self=this;
-jQuery(document).ready(aBlock);
-return self;},
-args: ["aBlock"],
-source: unescape('documentReady%3A%20aBlock%0A%09%3CjQuery%28document%29.ready%28aBlock%29%3E'),
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.JQuery.klass);
-
-
-smalltalk.addClass('Ajax', smalltalk.Object, ['settings'], 'JQuery');
-smalltalk.Ajax.comment=unescape('instance%20variable%20names%3A%0A-%20settings%20%20A%20set%20of%20key/value%20pairs%20that%20configure%20the%20Ajax%20request.%20All%20settings%20are%20optional.%0A%0AFull%20list%20of%20settings%20options%20at%20http%3A//api.jquery.com/jQuery.ajax/')
-smalltalk.addMethod(
-unescape('_at_'),
-smalltalk.method({
-selector: unescape('at%3A'),
-category: 'accessing',
-fn: function (aKey){
-var self=this;
-return smalltalk.send(self['@settings'], "_at_ifAbsent_", [aKey, (function(){return nil;})]);
-return self;},
-args: ["aKey"],
-source: unescape('at%3A%20aKey%0A%20%20%20%20%5Esettings%20at%3A%20aKey%20ifAbsent%3A%20%5Bnil%5D'),
-messageSends: ["at:ifAbsent:"],
-referencedClasses: []
-}),
-smalltalk.Ajax);
-
-smalltalk.addMethod(
-unescape('_at_put_'),
-smalltalk.method({
-selector: unescape('at%3Aput%3A'),
-category: 'accessing',
-fn: function (aKey, aValue){
-var self=this;
-smalltalk.send(self['@settings'], "_at_put_", [aKey, aValue]);
-return self;},
-args: ["aKey", "aValue"],
-source: unescape('at%3A%20aKey%20put%3A%20aValue%0A%20%20%20%20settings%20at%3A%20aKey%20put%3A%20aValue'),
-messageSends: ["at:put:"],
-referencedClasses: []
-}),
-smalltalk.Ajax);
-
-smalltalk.addMethod(
-unescape('_url'),
-smalltalk.method({
-selector: unescape('url'),
-category: 'accessing',
-fn: function (){
-var self=this;
-return smalltalk.send(self, "_at_", ["url"]);
-return self;},
-args: [],
-source: unescape('url%0A%20%20%20%20%5Eself%20at%3A%20%27url%27'),
-messageSends: ["at:"],
-referencedClasses: []
-}),
-smalltalk.Ajax);
-
-smalltalk.addMethod(
-unescape('_url_'),
-smalltalk.method({
-selector: unescape('url%3A'),
-category: 'accessing',
-fn: function (aString){
-var self=this;
-smalltalk.send(self, "_at_put_", ["url", aString]);
-return self;},
-args: ["aString"],
-source: unescape('url%3A%20aString%0A%20%20%20%20self%20at%3A%20%27url%27%20put%3A%20aString'),
-messageSends: ["at:put:"],
-referencedClasses: []
-}),
-smalltalk.Ajax);
-
-smalltalk.addMethod(
-unescape('_send'),
-smalltalk.method({
-selector: unescape('send'),
-category: 'actions',
-fn: function (){
-var self=this;
-jQuery.ajax(self['@settings']);
-return self;},
-args: [],
-source: unescape('send%0A%20%20%20%20%3CjQuery.ajax%28self%5B%27@settings%27%5D%29%3E'),
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.Ajax);
-
-smalltalk.addMethod(
-unescape('_onSuccessDo_'),
-smalltalk.method({
-selector: unescape('onSuccessDo%3A'),
-category: 'callbacks',
-fn: function (aBlock){
-var self=this;
-smalltalk.send(self, "_at_put_", ["success", aBlock]);
-return self;},
-args: ["aBlock"],
-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(
-unescape('_onCompleteDo_'),
-smalltalk.method({
-selector: unescape('onCompleteDo%3A'),
-category: 'callbacks',
-fn: function (aBlock){
-var self=this;
-smalltalk.send(self, "_at_put_", ["complete", aBlock]);
-return self;},
-args: ["aBlock"],
-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(
-unescape('_onErrorDo_'),
-smalltalk.method({
-selector: unescape('onErrorDo%3A'),
-category: 'callbacks',
-fn: function (aBlock){
-var self=this;
-smalltalk.send(self, "_at_put_", ["error", aBlock]);
-return self;},
-args: ["aBlock"],
-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(
-unescape('_initialize'),
-smalltalk.method({
-selector: unescape('initialize'),
-category: 'initialization',
-fn: function (){
-var self=this;
-smalltalk.send(self, "_initialize", [], smalltalk.Object);
-self['@settings']=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []);
-return self;},
-args: [],
-source: unescape('initialize%0A%20%20%20%20super%20initialize.%0A%20%20%20%20settings%20%3A%3D%20Dictionary%20new'),
-messageSends: ["initialize", "new"],
-referencedClasses: [smalltalk.Dictionary]
-}),
-smalltalk.Ajax);
-
-
-smalltalk.addMethod(
-unescape('_url_'),
-smalltalk.method({
-selector: unescape('url%3A'),
-category: 'instance creation',
-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;},
-args: ["aString"],
-source: unescape('url%3A%20aString%0A%20%20%20%20%5Eself%20new%0A%09url%3A%20aString%3B%0A%09yourself'),
-messageSends: ["url:", "yourself", "new"],
-referencedClasses: []
-}),
-smalltalk.Ajax.klass);
-
-
-smalltalk.addMethod(
-unescape('_appendToJQuery_'),
-smalltalk.method({
-selector: unescape('appendToJQuery%3A'),
-category: '*JQuery',
-fn: function (aJQuery){
-var self=this;
-smalltalk.send(self, "_value_", [smalltalk.send((smalltalk.HTMLCanvas || HTMLCanvas), "_onJQuery_", [aJQuery])]);
-return self;},
-args: ["aJQuery"],
-source: unescape('appendToJQuery%3A%20aJQuery%0A%09self%20value%3A%20%28HTMLCanvas%20onJQuery%3A%20aJQuery%29'),
-messageSends: ["value:", "onJQuery:"],
-referencedClasses: [smalltalk.HTMLCanvas]
-}),
-smalltalk.BlockClosure);
-
-smalltalk.addMethod(
-unescape('_asJQuery'),
-smalltalk.method({
-selector: unescape('asJQuery'),
-category: '*JQuery',
-fn: function (){
-var self=this;
-return smalltalk.send((smalltalk.JQuery || JQuery), "_fromString_", [self]);
-return self;},
-args: [],
-source: unescape('asJQuery%0A%20%20%20%20%5EJQuery%20fromString%3A%20self'),
-messageSends: ["fromString:"],
-referencedClasses: [smalltalk.JQuery]
-}),
-smalltalk.String);
-
-smalltalk.addMethod(
-unescape('_appendToJQuery_'),
-smalltalk.method({
-selector: unescape('appendToJQuery%3A'),
-category: '*JQuery',
-fn: function (aJQuery){
-var self=this;
-aJQuery._appendElement_(String(self));
-return self;},
-args: ["aJQuery"],
-source: unescape('appendToJQuery%3A%20aJQuery%0A%20%20%20%20%3CaJQuery._appendElement_%28String%28self%29%29%3E'),
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.String);
-
-smalltalk.addMethod(
-unescape('_appendToJQuery_'),
-smalltalk.method({
-selector: unescape('appendToJQuery%3A'),
-category: '*JQuery',
-fn: function (aJQuery){
-var self=this;
-smalltalk.send(aJQuery, "_appendElement_", [smalltalk.send(self['@root'], "_element", [])]);
-return self;},
-args: ["aJQuery"],
-source: unescape('appendToJQuery%3A%20aJQuery%0A%20%20%20%20aJQuery%20appendElement%3A%20root%20element'),
-messageSends: ["appendElement:", "element"],
-referencedClasses: []
-}),
-smalltalk.HTMLCanvas);
-

+ 0 - 3
js/amber.js

@@ -67,14 +67,12 @@
 	    loadJS("boot.js");
 	    loadJS("Kernel.deploy.js");
 	    loadJS("Canvas.deploy.js");
-	    loadJS("JQuery.deploy.js");
 	} else {
 	    loadIDEDependencies();
 	    loadCSS('amber.css');
 	    loadJS("boot.js");
 	    loadJS("Kernel.js");
 	    loadJS("Canvas.js");
-	    loadJS("JQuery.js");
 	    loadJS("Compiler.js");
 	    loadJS("parser.js");
 	    loadJS("IDE.js");
@@ -82,7 +80,6 @@
 	    loadJS("Examples.js");
 	    loadJS("Benchfib.js");
 	    loadJS("Kernel-Tests.js");
-	    loadJS("JQuery-Tests.js");
 	}
 
 	// Load other files, possibly with another directory prefix than 'js'

+ 25 - 14
st/Canvas.st

@@ -282,41 +282,37 @@ rel: aString
 !TagBrush methodsFor: 'converting'!
 
 asJQuery
-	<return smalltalk.JQuery._from_(jQuery(self['@element']))>
-!
-
-asJQueryDo: aBlock
-    aBlock value: self asJQuery
+    ^window jQuery: self element
 ! !
 
 !TagBrush methodsFor: 'events'!
 
 onKeyDown: aBlock
-    self asJQuery on: 'keydown' do: aBlock
+    self asJQuery bind: 'keydown' do: aBlock
 !
 
 onKeyPress: aBlock
-    self asJQuery on: 'keypress' do: aBlock
+    self asJQuery bind: 'keypress' do: aBlock
 !
 
 onKeyUp: aBlock
-    self asJQuery on: 'keyup' do: aBlock
+    self asJQuery bind: 'keyup' do: aBlock
 !
 
 onFocus: aBlock
-    self asJQuery on: 'focus' do: aBlock
+    self asJQuery bind: 'focus' do: aBlock
 !
 
 onBlur: aBlock
-    self asJQuery on: 'blur' do: aBlock
+    self asJQuery bind: 'blur' do: aBlock
 !
 
 onChange: aBlock
-    self asJQuery on: 'change' do: aBlock
+    self asJQuery bind: 'change' do: aBlock
 !
 
 onClick: aBlock
-    self asJQuery on: 'click' do: aBlock
+    self asJQuery bind: 'click' do: aBlock
 ! !
 
 !TagBrush methodsFor: 'initialization'!
@@ -327,7 +323,7 @@ initializeFromString: aString canvas: aCanvas
 !
 
 initializeFromJQuery: aJQuery canvas: aCanvas
-    element := aJQuery jquery get: 0.
+    element := aJQuery get: 0.
     canvas := aCanvas
 ! !
 
@@ -395,19 +391,34 @@ renderOn: html
 
 !Object methodsFor: '*Canvas'!
 
+appendToJQuery: aJQuery
+    aJQuery append: self asString
+!
+
 appendToBrush: aTagBrush
     aTagBrush append: self asString
 ! !
 
 !BlockClosure methodsFor: '*Canvas'!
 
+appendToJQuery: aJQuery
+    self value: (HTMLCanvas onJQuery: aJQuery)
+!
+
 appendToBrush: aTagBrush
     aTagBrush appendBlock: self
 ! !
 
 !String methodsFor: '*Canvas'!
 
+asJQuery
+    <return jQuery(String(self))>
+!
+
+appendToJQuery: aJQuery
+    aJQuery append: self
+!
+
 appendToBrush: aTagBrush
     aTagBrush appendString: self
 ! !
-

+ 34 - 27
st/IDE.st

@@ -32,7 +32,7 @@ removeBodyMargin
 !
 
 setBodyMargin: anInteger
-    '.jtalkBody' asJQuery cssAt: 'margin-bottom' put: anInteger asString, 'px'
+    '.jtalkBody' asJQuery css: 'margin-bottom' put: anInteger asString, 'px'
 !
 
 onResize: aBlock
@@ -100,7 +100,7 @@ search: aString
 
 addTab: aWidget
     self tabs add: aWidget.
-    '#jtalk' asJQuery append: aWidget.
+    aWidget appendToJQuery: '#jtalk' asJQuery.
     aWidget hide
 !
 
@@ -114,10 +114,10 @@ removeTab: aWidget
 initialize
     super initialize.
     opened := true.
+    [:html | html div id: 'jtalk'] appendToJQuery: 'body' asJQuery.
     'body' asJQuery 
-	append: [:html | html div id: 'jtalk'];
 	addClass: 'jtalkBody'.
-    '#jtalk' asJQuery append: self.
+    self appendToJQuery: '#jtalk' asJQuery.
     self 
 	addTab: Transcript current;
 	addTab: Workspace new;
@@ -366,7 +366,6 @@ clear
 
 renderBoxOn: html
     textarea := html textarea.
-    textarea asJQuery call: 'tabby'.
     textarea 
 	class: 'jt_transcript';
 	at: 'spellcheck' put: 'false'
@@ -760,22 +759,28 @@ handleSourceAreaKeyDown: anEvent
 !
 
 commitPackage
-    selectedPackage ifNotNil: [
-	(Ajax url: self class commitPathJs, '/', selectedPackage, '.js')
-	    at: 'type' put: 'PUT';
-	    at: 'data' put: (Exporter new exportPackage: selectedPackage);
-	    at: 'error' put: [self alert: 'Commit failed!!'];
-	    send.
-	(Ajax url: self class commitPathJs, '/', selectedPackage, '.deploy.js')
-	    at: 'type' put: 'PUT';
-	    at: 'data' put: (StrippedExporter new exportPackage: selectedPackage);
-	    at: 'error' put: [self alert: 'Commit failed!!'];
-	    send.
-	(Ajax url: self class commitPathSt, '/', selectedPackage, '.st')
-	    at: 'type' put: 'PUT';
-	    at: 'data' put: (ChunkExporter new exportPackage: selectedPackage);
-	    at: 'error' put: [self alert: 'Commit failed!!'];
-	    send]
+	selectedPackage ifNotNil: [
+		jQuery 
+			ajax: self class commitPathJs, '/', selectedPackage, '.js'
+			options: #{
+				'type' -> 'PUT'.
+				'data' -> (Exporter new exportPackage: selectedPackage).
+				'error' -> [self alert: 'Commit failed!!']
+			}.
+		jQuery 
+			ajax: self class commitPathJs, '/', selectedPackage, '.deploy.js'
+			options: #{
+				'type' -> 'PUT'.
+				'data' -> (StrippedExporter new exportPackage: selectedPackage).
+				'error' -> [self alert: 'Commit failed!!']
+			}.
+		jQuery 
+			ajax: self class commitPathSt, '/', selectedPackage, '.st'
+			options: #{
+				'type' -> 'PUT'.
+				'data' -> (ChunkExporter new exportPackage: selectedPackage).
+				'error' -> [self alert: 'Commit failed!!']
+			}]
 !
 
 renamePackage
@@ -978,12 +983,13 @@ updateSourceAndButtons
 		html button
 			with: 'References';
 			onClick: [self searchClassReferences]].
-	methodButtons contents: [:html |
+	methodButtons contents: [:html | | protocolSelect referencesSelect |
 		html button
 			with: 'Remove method';
 			onClick: [self removeMethod].
-		html select 
-			onChange: [:e :select | self setMethodProtocol: select val];
+		protocolSelect := html select.
+                protocolSelect
+			onChange: [ self setMethodProtocol: protocolSelect asJQuery val];
 			with: [
 				html option
 					with: 'Method protocol';
@@ -994,8 +1000,9 @@ updateSourceAndButtons
 				self protocols do: [:each |
 					html option with: each]].
 		selectedMethod isNil ifFalse: [
-			html select 
-				onChange: [:e :select | self searchReferencesOf: select val];
+			referencesSelect := html select.
+                        referencesSelect
+				onChange: [self searchReferencesOf: referencesSelect asJQuery val];
 				with: [
 					html option
 						with: 'References';
@@ -1620,7 +1627,7 @@ renderOn: html
 	cssClass := ''.
 	li := html li 
 		onClick: [self browser selectClass: self theClass]. 
-	li asJQuery contents: self label.
+	li asJQuery html: self label.
 
 	self browser selectedClass = self theClass ifTrue:  [
 		cssClass := cssClass, ' selected'].

+ 0 - 34
st/JQuery-Tests.st

@@ -1,34 +0,0 @@
-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
-! !
-

+ 0 - 390
st/JQuery.st

@@ -1,390 +0,0 @@
-Object subclass: #JQuery
-	instanceVariableNames: 'jquery'
-	category: 'JQuery'!
-
-!JQuery methodsFor: 'DOM insertion'!
-
-append: anObject
-    "Append anObject at the end of the element."
-    anObject appendToJQuery: self
-!
-
-appendElement: anElement
-    "Append anElement at the end of the element.
-     Dont't call this method directly, use #append: instead"
-    self call: 'append' withArgument: anElement
-!
-
-appendToJQuery: aJQuery
-    aJQuery appendElement: jquery
-!
-
-contents: anObject
-    self empty.
-    self append: anObject
-!
-
-empty
-    ^self call: 'empty'
-! !
-
-!JQuery methodsFor: 'accessing'!
-
-jquery
-	^jquery
-! !
-
-!JQuery methodsFor: 'attributes'!
-
-removeAttribute: aString
-    "Remove an attribute from each element in the set of matched elements."
-    ^self call: 'removeAttribute' withArgument: aString
-!
-
-attr: aString
-    "Get the value of an attribute for the first element in the set of matched elements."
-    ^self call: 'attr' withArgument: aString
-!
-
-val
-    "Get the current value of the first element in the set of matched elements."
-    ^self call: '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'!
-
-cssAt: aString
-	<return self['@jquery'].css(aString)>
-!
-
-cssAt: aString put: anotherString
-    <self['@jquery'].css(aString, anotherString)>
-!
-
-addClass: aString
-    "Adds the specified class(es) to each of the set of matched elements."
-    self call: 'addClass' withArgument: aString
-!
-
-removeClass: aString
-    "Remove a single class, multiple classes, or all classes from each element in the set of matched elements."
-    self call: 'removeClass' withArgument: aString
-!
-
-toggleClass: aString
-    "Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the switch argument."
-    self call: 'toggleClass' withArgument: aString
-!
-
-height 
-    "Get the current computed height for the first element in the set of matched elements."
-    ^self call: 'height'
-!
-
-height: anInteger
-    self call: 'height' withArgument: anInteger
-!
-
-width: anInteger
-    self call: 'width' withArgument: anInteger
-!
-
-width
-    "Get the current computed width for the first element in the set of matched elements."
-    ^self call: 'width'
-!
-
-innerHeight
-    "Get the current computed height for the first element in the set of matched elements, including padding but not border."
-    ^self call: 'innerHeight'
-!
-
-innerWidth
-    "Get the current computed width for the first element in the set of matched elements, including padding but not border."
-    ^self call: 'innerWidth'
-!
-
-outerHeight
-    "Get the current computed height for the first element in the set of matched elements, including padding, border, and optionally margin."
-    ^self call: 'outerHeight'
-!
-
-outerWidth
-    "Get the current computed width for the first element in the set of matched elements, including padding and border."
-    ^self call: 'outerWidth'
-!
-
-top
-    "Get the current y coordinate of the first element in the set of matched elements, relative to the offset parent."
-    ^(self call: 'position') basicAt: 'top'
-!
-
-left
-    "Get the current x coordinate of the first element in the set of matched elements, relative to the offset parent."
-    ^(self call: 'position') basicAt: 'left'
-!
-
-offsetLeft
-    "Get the current coordinates of the first element in the set of matched elements, relative to the document."
-    ^(self call: 'offset') basicAt: 'left'
-!
-
-offsetTop
-    "Get the current coordinates of the first element in the set of matched elements, relative to the document."
-    ^(self call: 'offset') basicAt: 'top'
-!
-
-scrollLeft
-    "Get the current horizontal position of the scroll bar for the first element in the set of matched elements."
-    ^self call: 'scrollLeft'
-!
-
-scrollTop
-    "Get the current vertical position of the scroll bar for the first element in the set of matched elements."
-    ^self call: 'scrollTop'
-!
-
-scrollLeft: anInteger
-    self call: 'scrollLeft' withArgument: anInteger
-!
-
-scrollTop: anInteger
-    self call: 'scrollTop' withArgument: anInteger
-! !
-
-!JQuery methodsFor: 'effects'!
-
-fadeIn
- 	self call: 'fadeIn'
-!
-
-slideDown
- 	self call: 'slideDown'
-!
-
-fadeInSlow
- 	self call: 'fadeIn' withArgument: 'slow'
-!
-
-fadeOut
- 	self call: 'fadeOut'
-!
-
-fadeOutSlow
- 	self call: 'fadeOut' withArgument: 'slow'
-!
-
-slideUp
- 	self call: 'slideUp'
-!
-
-fadeOut: aString do: aBlock
-    <self['@jquery'].fadeOut(aString, aBlock)>
-! !
-
-!JQuery methodsFor: 'enumerating'!
-
-do: aBlock
-    self elementsDo: [:anElement|  aBlock value: (JQuery fromElement: anElement)]
-! !
-
-!JQuery methodsFor: 'events'!
-
-focus
-    self call: 'focus'
-!
-
-show
-    self call: 'show'
-!
-
-hide
-    self call: 'hide'
-!
-
-remove
-    self call: 'remove'
-!
-
-on: anEventString do: aBlock
-    "Attach aBlock for anEventString on the element"
-    <self['@jquery'].bind(anEventString, function(e){aBlock(e, self)})>
-!
-
-removeEvents: aString
-    "Unbind all handlers attached to the event aString"
-    self call: 'unbind' withArgument: aString
-!
-
-onLoadDo: aBlock
-	"Bind an event handler to the 'load' JavaScript event."
-	self call: 'load' withArgument: aBlock
-! !
-
-!JQuery methodsFor: 'initialization'!
-
-initializeWithJQueryObject: anObject
-    jquery := anObject
-! !
-
-!JQuery methodsFor: 'private'!
-
-call: aString
-	<return self['@jquery'][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'!
-
-hasClass: aString
-    "Determine whether any of the matched elements are assigned the given class."
-    ^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
-    | newJQuery |
-    <newJQuery = jQuery(String(aString))>.
-    ^self from: newJQuery
-!
-
-from: anObject
-    ^self new
-	initializeWithJQueryObject: anObject;
-	yourself
-!
-
-window
-	<return self._from_(jQuery(window))>
-!
-
-body
-	<return self._from_(jQuery('body'))>
-!
-
-document
-	<return self._from_(jQuery(document))>
-!
-
-fromElement: anElement
-    | newJQuery |
-    <newJQuery = jQuery(anElement)>.
-    ^self from: newJQuery
-!
-
-documentReady: aBlock
-	<jQuery(document).ready(aBlock)>
-! !
-
-Object subclass: #Ajax
-	instanceVariableNames: 'settings'
-	category: 'JQuery'!
-!Ajax commentStamp!
-instance variable names:
-- settings  A set of key/value pairs that configure the Ajax request. All settings are optional.
-
-Full list of settings options at http://api.jquery.com/jQuery.ajax/!
-
-!Ajax methodsFor: 'accessing'!
-
-at: aKey
-    ^settings at: aKey ifAbsent: [nil]
-!
-
-at: aKey put: aValue
-    settings at: aKey put: aValue
-!
-
-url
-    ^self at: 'url'
-!
-
-url: aString
-    self at: 'url' put: aString
-! !
-
-!Ajax methodsFor: 'actions'!
-
-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
-    super initialize.
-    settings := Dictionary new
-! !
-
-!Ajax class methodsFor: 'instance creation'!
-
-url: aString
-    ^self new
-	url: aString;
-	yourself
-! !
-
-!BlockClosure methodsFor: '*JQuery'!
-
-appendToJQuery: aJQuery
-	self value: (HTMLCanvas onJQuery: aJQuery)
-! !
-
-!String methodsFor: '*JQuery'!
-
-asJQuery
-    ^JQuery fromString: self
-!
-
-appendToJQuery: aJQuery
-    <aJQuery._appendElement_(String(self))>
-! !
-
-!HTMLCanvas methodsFor: '*JQuery'!
-
-appendToJQuery: aJQuery
-    aJQuery appendElement: root element
-! !
-

+ 6 - 11
st/Makefile

@@ -49,29 +49,24 @@ Compiler.js: Compiler.st Kernel.js
 #
 # NOTE: With the new dependency model in class Package etc this will change!
 #
-# JQuery uses Canvas
-JQuery.js: JQuery.st Canvas.js
-	$(AMBERC) $(FLAGS) -l Canvas $<
+Canvas.js: Canvas.st
+	$(AMBERC) $(FLAGS) $<
 
 # IDE uses JQuery
-IDE.js: IDE.st JQuery.js
-	$(AMBERC) $(FLAGS) -l Canvas,JQuery $<
+IDE.js: IDE.st Canvas.js
+	$(AMBERC) $(FLAGS) -l Canvas $<
 
 TrySmalltalk.js: TrySmalltalk.st IDE.js
-	$(AMBERC) $(FLAGS) -l Canvas,JQuery,IDE $<
+	$(AMBERC) $(FLAGS) -l Canvas,IDE $<
 
 # Some Examples use SUnit and also IDE
 Examples.js: Examples.st SUnit.js IDE.js
-	$(AMBERC) $(FLAGS) -l SUnit,Canvas,JQuery,IDE $<;
+	$(AMBERC) $(FLAGS) -l SUnit,Canvas,IDE $<;
 
 # Tests typically also use SUnit
 Kernel-Tests.js: Kernel-Tests.st SUnit.js
 	$(AMBERC) $(FLAGS) -l SUnit $<;
 
-# Tests typically also use SUnit
-JQuery-Tests.js: JQuery-Tests.st JQuery.js SUnit.js
-	$(AMBERC) $(FLAGS) -l Canvas,JQuery,SUnit $<;
-
 
 # Installing is simply copying all js files to js directory.
 install: all

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