Browse Source

- Port of SUnit
- Senders/Implementors/class references browser
- The exporter now correctly exports class extensions (*foo method categories)

Nicolas Petton 13 years ago
parent
commit
d249cb486e
15 changed files with 2434 additions and 1238 deletions
  1. 38 0
      css/jtalk.css
  2. 333 96
      js/Canvas.js
  3. 386 289
      js/Compiler.js
  4. 394 300
      js/Examples.js
  5. 332 86
      js/IDE.js
  6. 306 51
      js/JQuery.js
  7. 400 334
      js/Kernel.js
  8. 228 69
      js/Parser.js
  9. 16 13
      js/boot.js
  10. 1 0
      js/init.js
  11. 0 0
      js/jquery-1.4.4.min.js
  12. 0 0
      js/jquery-ui-1.8.9.custom.min.js
  13. 0 0
      js/jquery.textarea.js
  14. 0 0
      js/jtalk.deploy.js
  15. 0 0
      js/jtalk.js

+ 38 - 0
css/jtalk.css

@@ -257,3 +257,41 @@ body.jtalkBody {
     width: 100%;
     height: 100%;
 }
+
+/***** IDE - ReferencesBrowser ******/
+
+.jtalkTool .jt_box .implementors {
+	width: 100%
+}
+
+.jtalkTool .jt_box .jt_column.implementors,
+.jtalkTool .jt_box .jt_column.senders,
+.jtalkTool .jt_box .jt_column.referenced_classes {
+	top: 30px;
+	height: 100%;
+	bottom: 0px;
+	width: 33%;
+}
+
+.jtalkTool .jt_box .jt_column.senders {
+	left: 33.6%
+}
+
+.jtalkTool .jt_box .jt_column.referenced_classes {
+        left: 67.3%
+}
+
+.jtalkTool .jt_box .jt_column.implementors .column_label, 
+.jtalkTool .jt_box .jt_column.senders .column_label,
+.jtalkTool .jt_box .jt_column.referenced_classes .column_label {
+	background: #dbdbdb
+}
+
+.jtalkTool .jt_box .jt_column.implementors .column_label:hover,
+.jtalkTool .jt_box .jt_column.senders .column_label:hover,
+.jtalkTool .jt_box .jt_column.referenced_classes .column_label:hover {
+	font-weight: bold;
+	color: #000;
+	cursor: default
+}
+

File diff suppressed because it is too large
+ 333 - 96
js/Canvas.js


File diff suppressed because it is too large
+ 386 - 289
js/Compiler.js


File diff suppressed because it is too large
+ 394 - 300
js/Examples.js


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


+ 306 - 51
js/JQuery.js

@@ -8,7 +8,10 @@ fn: function (aString){
 var self=this;
 return smalltalk.send(self, "_call_withArgument_", ["removeAttribute", aString]);
 return self;},
-source: unescape('removeAttribute%3A%20aString%0A%20%20%20%20%22Remove%20an%20attribute%20from%20each%20element%20in%20the%20set%20of%20matched%20elements.%22%0A%20%20%20%20%5Eself%20call%3A%20%27removeAttribute%27%20withArgument%3A%20aString%0A')}),
+source: unescape('removeAttribute%3A%20aString%0A%20%20%20%20%22Remove%20an%20attribute%20from%20each%20element%20in%20the%20set%20of%20matched%20elements.%22%0A%20%20%20%20%5Eself%20call%3A%20%27removeAttribute%27%20withArgument%3A%20aString%0A'),
+messageSends: ["call:withArgument:"],
+referencedClasses: []
+}),
 smalltalk.JQuery);
 
 smalltalk.addMethod(
@@ -20,7 +23,10 @@ fn: function (aString){
 var self=this;
 return smalltalk.send(self, "_call_withArgument_", ["attr", aString]);
 return self;},
-source: unescape('attr%3A%20aString%0A%20%20%20%20%22Get%20the%20value%20of%20an%20attribute%20for%20the%20first%20element%20in%20the%20set%20of%20matched%20elements.%22%0A%20%20%20%20%5Eself%20call%3A%20%27attr%27%20withArgument%3A%20aString%0A')}),
+source: unescape('attr%3A%20aString%0A%20%20%20%20%22Get%20the%20value%20of%20an%20attribute%20for%20the%20first%20element%20in%20the%20set%20of%20matched%20elements.%22%0A%20%20%20%20%5Eself%20call%3A%20%27attr%27%20withArgument%3A%20aString%0A'),
+messageSends: ["call:withArgument:"],
+referencedClasses: []
+}),
 smalltalk.JQuery);
 
 smalltalk.addMethod(
@@ -32,7 +38,10 @@ fn: function (){
 var self=this;
 return smalltalk.send(self, "_call_", ["val"]);
 return self;},
-source: unescape('val%0A%20%20%20%20%22Get%20the%20current%20value%20of%20the%20first%20element%20in%20the%20set%20of%20matched%20elements.%22%0A%20%20%20%20%5Eself%20call%3A%20%27val%27%0A')}),
+source: unescape('val%0A%20%20%20%20%22Get%20the%20current%20value%20of%20the%20first%20element%20in%20the%20set%20of%20matched%20elements.%22%0A%20%20%20%20%5Eself%20call%3A%20%27val%27%0A'),
+messageSends: ["call:"],
+referencedClasses: []
+}),
 smalltalk.JQuery);
 
 smalltalk.addMethod(
@@ -44,7 +53,10 @@ fn: function (aString){
 var self=this;
 smalltalk.send(self, "_call_withArgument_", ["val", aString]);
 return self;},
-source: unescape('val%3A%20aString%0A%20%20%20%20self%20call%3A%20%27val%27%20withArgument%3A%20aString%0A')}),
+source: unescape('val%3A%20aString%0A%20%20%20%20self%20call%3A%20%27val%27%20withArgument%3A%20aString%0A'),
+messageSends: ["call:withArgument:"],
+referencedClasses: []
+}),
 smalltalk.JQuery);
 
 smalltalk.addMethod(
@@ -56,7 +68,10 @@ fn: function (aString){
 var self=this;
 return self['@jquery'].css(aString);
 return self;},
-source: unescape('cssAt%3A%20aString%0A%09%7B%27return%20self%5B%27%27@jquery%27%27%5D.css%28aString%29%27%7D')}),
+source: unescape('cssAt%3A%20aString%0A%09%7B%27return%20self%5B%27%27@jquery%27%27%5D.css%28aString%29%27%7D'),
+messageSends: [],
+referencedClasses: []
+}),
 smalltalk.JQuery);
 
 smalltalk.addMethod(
@@ -68,7 +83,10 @@ fn: function (aString, anotherString){
 var self=this;
 self['@jquery'].css(aString, anotherString);
 return self;},
-source: unescape('cssAt%3A%20aString%20put%3A%20anotherString%0A%20%20%20%20%7B%27self%5B%27%27@jquery%27%27%5D.css%28aString%2C%20anotherString%29%27%7D%0A')}),
+source: unescape('cssAt%3A%20aString%20put%3A%20anotherString%0A%20%20%20%20%7B%27self%5B%27%27@jquery%27%27%5D.css%28aString%2C%20anotherString%29%27%7D%0A'),
+messageSends: [],
+referencedClasses: []
+}),
 smalltalk.JQuery);
 
 smalltalk.addMethod(
@@ -80,7 +98,10 @@ fn: function (aString){
 var self=this;
 smalltalk.send(self, "_call_withArgument_", ["addClass", aString]);
 return self;},
-source: unescape('addClass%3A%20aString%0A%20%20%20%20%22Adds%20the%20specified%20class%28es%29%20to%20each%20of%20the%20set%20of%20matched%20elements.%22%0A%20%20%20%20self%20call%3A%20%27addClass%27%20withArgument%3A%20aString%0A')}),
+source: unescape('addClass%3A%20aString%0A%20%20%20%20%22Adds%20the%20specified%20class%28es%29%20to%20each%20of%20the%20set%20of%20matched%20elements.%22%0A%20%20%20%20self%20call%3A%20%27addClass%27%20withArgument%3A%20aString%0A'),
+messageSends: ["call:withArgument:"],
+referencedClasses: []
+}),
 smalltalk.JQuery);
 
 smalltalk.addMethod(
@@ -92,7 +113,10 @@ fn: function (aString){
 var self=this;
 smalltalk.send(self, "_call_withArgument_", ["removeClass", aString]);
 return self;},
-source: unescape('removeClass%3A%20aString%0A%20%20%20%20%22Remove%20a%20single%20class%2C%20multiple%20classes%2C%20or%20all%20classes%20from%20each%20element%20in%20the%20set%20of%20matched%20elements.%22%0A%20%20%20%20self%20call%3A%20%27removeClass%27%20withArgument%3A%20aString%0A')}),
+source: unescape('removeClass%3A%20aString%0A%20%20%20%20%22Remove%20a%20single%20class%2C%20multiple%20classes%2C%20or%20all%20classes%20from%20each%20element%20in%20the%20set%20of%20matched%20elements.%22%0A%20%20%20%20self%20call%3A%20%27removeClass%27%20withArgument%3A%20aString%0A'),
+messageSends: ["call:withArgument:"],
+referencedClasses: []
+}),
 smalltalk.JQuery);
 
 smalltalk.addMethod(
@@ -104,7 +128,10 @@ fn: function (aString){
 var self=this;
 smalltalk.send(self, "_call_withArgument_", ["toggleClass", aString]);
 return self;},
-source: unescape('toggleClass%3A%20aString%0A%20%20%20%20%22Add%20or%20remove%20one%20or%20more%20classes%20from%20each%20element%20in%20the%20set%20of%20matched%20elements%2C%20depending%20on%20either%20the%20class%27s%20presence%20or%20the%20value%20of%20the%20switch%20argument.%22%0A%20%20%20%20self%20call%3A%20%27toggleClass%27%20withArgument%3A%20aString%0A')}),
+source: unescape('toggleClass%3A%20aString%0A%20%20%20%20%22Add%20or%20remove%20one%20or%20more%20classes%20from%20each%20element%20in%20the%20set%20of%20matched%20elements%2C%20depending%20on%20either%20the%20class%27s%20presence%20or%20the%20value%20of%20the%20switch%20argument.%22%0A%20%20%20%20self%20call%3A%20%27toggleClass%27%20withArgument%3A%20aString%0A'),
+messageSends: ["call:withArgument:"],
+referencedClasses: []
+}),
 smalltalk.JQuery);
 
 smalltalk.addMethod(
@@ -116,7 +143,10 @@ fn: function (){
 var self=this;
 return smalltalk.send(self, "_call_", ["height"]);
 return self;},
-source: unescape('height%20%0A%20%20%20%20%22Get%20the%20current%20computed%20height%20for%20the%20first%20element%20in%20the%20set%20of%20matched%20elements.%22%0A%20%20%20%20%5Eself%20call%3A%20%27height%27%0A')}),
+source: unescape('height%20%0A%20%20%20%20%22Get%20the%20current%20computed%20height%20for%20the%20first%20element%20in%20the%20set%20of%20matched%20elements.%22%0A%20%20%20%20%5Eself%20call%3A%20%27height%27%0A'),
+messageSends: ["call:"],
+referencedClasses: []
+}),
 smalltalk.JQuery);
 
 smalltalk.addMethod(
@@ -128,7 +158,10 @@ fn: function (anInteger){
 var self=this;
 smalltalk.send(self, "_call_withArgument_", ["height", anInteger]);
 return self;},
-source: unescape('height%3A%20anInteger%0A%20%20%20%20self%20call%3A%20%27height%27%20withArgument%3A%20anInteger%0A')}),
+source: unescape('height%3A%20anInteger%0A%20%20%20%20self%20call%3A%20%27height%27%20withArgument%3A%20anInteger%0A'),
+messageSends: ["call:withArgument:"],
+referencedClasses: []
+}),
 smalltalk.JQuery);
 
 smalltalk.addMethod(
@@ -140,7 +173,10 @@ fn: function (anInteger){
 var self=this;
 smalltalk.send(self, "_call_withArgument_", ["width", anInteger]);
 return self;},
-source: unescape('width%3A%20anInteger%0A%20%20%20%20self%20call%3A%20%27width%27%20withArgument%3A%20anInteger%0A')}),
+source: unescape('width%3A%20anInteger%0A%20%20%20%20self%20call%3A%20%27width%27%20withArgument%3A%20anInteger%0A'),
+messageSends: ["call:withArgument:"],
+referencedClasses: []
+}),
 smalltalk.JQuery);
 
 smalltalk.addMethod(
@@ -152,7 +188,10 @@ fn: function (){
 var self=this;
 return smalltalk.send(self, "_call_", ["width"]);
 return self;},
-source: unescape('width%0A%20%20%20%20%22Get%20the%20current%20computed%20width%20for%20the%20first%20element%20in%20the%20set%20of%20matched%20elements.%22%0A%20%20%20%20%5Eself%20call%3A%20%27width%27%0A')}),
+source: unescape('width%0A%20%20%20%20%22Get%20the%20current%20computed%20width%20for%20the%20first%20element%20in%20the%20set%20of%20matched%20elements.%22%0A%20%20%20%20%5Eself%20call%3A%20%27width%27%0A'),
+messageSends: ["call:"],
+referencedClasses: []
+}),
 smalltalk.JQuery);
 
 smalltalk.addMethod(
@@ -164,7 +203,10 @@ fn: function (){
 var self=this;
 return smalltalk.send(self, "_call_", ["innerHeight"]);
 return self;},
-source: unescape('innerHeight%0A%20%20%20%20%22Get%20the%20current%20computed%20height%20for%20the%20first%20element%20in%20the%20set%20of%20matched%20elements%2C%20including%20padding%20but%20not%20border.%22%0A%20%20%20%20%5Eself%20call%3A%20%27innerHeight%27%0A')}),
+source: unescape('innerHeight%0A%20%20%20%20%22Get%20the%20current%20computed%20height%20for%20the%20first%20element%20in%20the%20set%20of%20matched%20elements%2C%20including%20padding%20but%20not%20border.%22%0A%20%20%20%20%5Eself%20call%3A%20%27innerHeight%27%0A'),
+messageSends: ["call:"],
+referencedClasses: []
+}),
 smalltalk.JQuery);
 
 smalltalk.addMethod(
@@ -176,7 +218,10 @@ fn: function (){
 var self=this;
 return smalltalk.send(self, "_call_", ["innerWidth"]);
 return self;},
-source: unescape('innerWidth%0A%20%20%20%20%22Get%20the%20current%20computed%20width%20for%20the%20first%20element%20in%20the%20set%20of%20matched%20elements%2C%20including%20padding%20but%20not%20border.%22%0A%20%20%20%20%5Eself%20call%3A%20%27innerWidth%27%0A')}),
+source: unescape('innerWidth%0A%20%20%20%20%22Get%20the%20current%20computed%20width%20for%20the%20first%20element%20in%20the%20set%20of%20matched%20elements%2C%20including%20padding%20but%20not%20border.%22%0A%20%20%20%20%5Eself%20call%3A%20%27innerWidth%27%0A'),
+messageSends: ["call:"],
+referencedClasses: []
+}),
 smalltalk.JQuery);
 
 smalltalk.addMethod(
@@ -188,7 +233,10 @@ fn: function (){
 var self=this;
 return smalltalk.send(self, "_call_", ["outerHeight"]);
 return self;},
-source: unescape('outerHeight%0A%20%20%20%20%22Get%20the%20current%20computed%20height%20for%20the%20first%20element%20in%20the%20set%20of%20matched%20elements%2C%20including%20padding%2C%20border%2C%20and%20optionally%20margin.%22%0A%20%20%20%20%5Eself%20call%3A%20%27outerHeight%27%0A')}),
+source: unescape('outerHeight%0A%20%20%20%20%22Get%20the%20current%20computed%20height%20for%20the%20first%20element%20in%20the%20set%20of%20matched%20elements%2C%20including%20padding%2C%20border%2C%20and%20optionally%20margin.%22%0A%20%20%20%20%5Eself%20call%3A%20%27outerHeight%27%0A'),
+messageSends: ["call:"],
+referencedClasses: []
+}),
 smalltalk.JQuery);
 
 smalltalk.addMethod(
@@ -200,7 +248,10 @@ fn: function (){
 var self=this;
 return smalltalk.send(self, "_call_", ["outerWidth"]);
 return self;},
-source: unescape('outerWidth%0A%20%20%20%20%22Get%20the%20current%20computed%20width%20for%20the%20first%20element%20in%20the%20set%20of%20matched%20elements%2C%20including%20padding%20and%20border.%22%0A%20%20%20%20%5Eself%20call%3A%20%27outerWidth%27%0A')}),
+source: unescape('outerWidth%0A%20%20%20%20%22Get%20the%20current%20computed%20width%20for%20the%20first%20element%20in%20the%20set%20of%20matched%20elements%2C%20including%20padding%20and%20border.%22%0A%20%20%20%20%5Eself%20call%3A%20%27outerWidth%27%0A'),
+messageSends: ["call:"],
+referencedClasses: []
+}),
 smalltalk.JQuery);
 
 smalltalk.addMethod(
@@ -212,7 +263,10 @@ fn: function (){
 var self=this;
 return smalltalk.send(smalltalk.send(self, "_call_", ["position"]), "_basicAt_", ["top"]);
 return self;},
-source: unescape('top%0A%20%20%20%20%22Get%20the%20current%20y%20coordinate%20of%20the%20first%20element%20in%20the%20set%20of%20matched%20elements%2C%20relative%20to%20the%20offset%20parent.%22%0A%20%20%20%20%5E%28self%20call%3A%20%27position%27%29%20basicAt%3A%20%27top%27%0A')}),
+source: unescape('top%0A%20%20%20%20%22Get%20the%20current%20y%20coordinate%20of%20the%20first%20element%20in%20the%20set%20of%20matched%20elements%2C%20relative%20to%20the%20offset%20parent.%22%0A%20%20%20%20%5E%28self%20call%3A%20%27position%27%29%20basicAt%3A%20%27top%27%0A'),
+messageSends: ["basicAt:", "call:"],
+referencedClasses: []
+}),
 smalltalk.JQuery);
 
 smalltalk.addMethod(
@@ -224,7 +278,10 @@ fn: function (){
 var self=this;
 return smalltalk.send(smalltalk.send(self, "_call_", ["position"]), "_basicAt_", ["left"]);
 return self;},
-source: unescape('left%0A%20%20%20%20%22Get%20the%20current%20x%20coordinate%20of%20the%20first%20element%20in%20the%20set%20of%20matched%20elements%2C%20relative%20to%20the%20offset%20parent.%22%0A%20%20%20%20%5E%28self%20call%3A%20%27position%27%29%20basicAt%3A%20%27left%27%0A')}),
+source: unescape('left%0A%20%20%20%20%22Get%20the%20current%20x%20coordinate%20of%20the%20first%20element%20in%20the%20set%20of%20matched%20elements%2C%20relative%20to%20the%20offset%20parent.%22%0A%20%20%20%20%5E%28self%20call%3A%20%27position%27%29%20basicAt%3A%20%27left%27%0A'),
+messageSends: ["basicAt:", "call:"],
+referencedClasses: []
+}),
 smalltalk.JQuery);
 
 smalltalk.addMethod(
@@ -236,7 +293,10 @@ fn: function (){
 var self=this;
 return smalltalk.send(smalltalk.send(self, "_call_", ["offset"]), "_basicAt_", ["left"]);
 return self;},
-source: unescape('offsetLeft%0A%20%20%20%20%22Get%20the%20current%20coordinates%20of%20the%20first%20element%20in%20the%20set%20of%20matched%20elements%2C%20relative%20to%20the%20document.%22%0A%20%20%20%20%5E%28self%20call%3A%20%27offset%27%29%20basicAt%3A%20%27left%27%0A')}),
+source: unescape('offsetLeft%0A%20%20%20%20%22Get%20the%20current%20coordinates%20of%20the%20first%20element%20in%20the%20set%20of%20matched%20elements%2C%20relative%20to%20the%20document.%22%0A%20%20%20%20%5E%28self%20call%3A%20%27offset%27%29%20basicAt%3A%20%27left%27%0A'),
+messageSends: ["basicAt:", "call:"],
+referencedClasses: []
+}),
 smalltalk.JQuery);
 
 smalltalk.addMethod(
@@ -248,7 +308,10 @@ fn: function (){
 var self=this;
 return smalltalk.send(smalltalk.send(self, "_call_", ["offset"]), "_basicAt_", ["top"]);
 return self;},
-source: unescape('offsetTop%0A%20%20%20%20%22Get%20the%20current%20coordinates%20of%20the%20first%20element%20in%20the%20set%20of%20matched%20elements%2C%20relative%20to%20the%20document.%22%0A%20%20%20%20%5E%28self%20call%3A%20%27offset%27%29%20basicAt%3A%20%27top%27%0A')}),
+source: unescape('offsetTop%0A%20%20%20%20%22Get%20the%20current%20coordinates%20of%20the%20first%20element%20in%20the%20set%20of%20matched%20elements%2C%20relative%20to%20the%20document.%22%0A%20%20%20%20%5E%28self%20call%3A%20%27offset%27%29%20basicAt%3A%20%27top%27%0A'),
+messageSends: ["basicAt:", "call:"],
+referencedClasses: []
+}),
 smalltalk.JQuery);
 
 smalltalk.addMethod(
@@ -260,7 +323,10 @@ fn: function (){
 var self=this;
 return smalltalk.send(self, "_call_", ["scrollLeft"]);
 return self;},
-source: unescape('scrollLeft%0A%20%20%20%20%22Get%20the%20current%20horizontal%20position%20of%20the%20scroll%20bar%20for%20the%20first%20element%20in%20the%20set%20of%20matched%20elements.%22%0A%20%20%20%20%5Eself%20call%3A%20%27scrollLeft%27%0A')}),
+source: unescape('scrollLeft%0A%20%20%20%20%22Get%20the%20current%20horizontal%20position%20of%20the%20scroll%20bar%20for%20the%20first%20element%20in%20the%20set%20of%20matched%20elements.%22%0A%20%20%20%20%5Eself%20call%3A%20%27scrollLeft%27%0A'),
+messageSends: ["call:"],
+referencedClasses: []
+}),
 smalltalk.JQuery);
 
 smalltalk.addMethod(
@@ -272,7 +338,10 @@ fn: function (){
 var self=this;
 return smalltalk.send(self, "_call_", ["scrollTop"]);
 return self;},
-source: unescape('scrollTop%0A%20%20%20%20%22Get%20the%20current%20vertical%20position%20of%20the%20scroll%20bar%20for%20the%20first%20element%20in%20the%20set%20of%20matched%20elements.%22%0A%20%20%20%20%5Eself%20call%3A%20%27scrollTop%27%0A')}),
+source: unescape('scrollTop%0A%20%20%20%20%22Get%20the%20current%20vertical%20position%20of%20the%20scroll%20bar%20for%20the%20first%20element%20in%20the%20set%20of%20matched%20elements.%22%0A%20%20%20%20%5Eself%20call%3A%20%27scrollTop%27%0A'),
+messageSends: ["call:"],
+referencedClasses: []
+}),
 smalltalk.JQuery);
 
 smalltalk.addMethod(
@@ -284,7 +353,10 @@ fn: function (anInteger){
 var self=this;
 smalltalk.send(self, "_call_withArgument_", ["scrollLeft", anInteger]);
 return self;},
-source: unescape('scrollLeft%3A%20anInteger%0A%20%20%20%20self%20call%3A%20%27scrollLeft%27%20withArgument%3A%20anInteger%0A')}),
+source: unescape('scrollLeft%3A%20anInteger%0A%20%20%20%20self%20call%3A%20%27scrollLeft%27%20withArgument%3A%20anInteger%0A'),
+messageSends: ["call:withArgument:"],
+referencedClasses: []
+}),
 smalltalk.JQuery);
 
 smalltalk.addMethod(
@@ -296,7 +368,10 @@ fn: function (anInteger){
 var self=this;
 smalltalk.send(self, "_call_withArgument_", ["scrollTop", anInteger]);
 return self;},
-source: unescape('scrollTop%3A%20anInteger%0A%20%20%20%20self%20call%3A%20%27scrollTop%27%20withArgument%3A%20anInteger%0A')}),
+source: unescape('scrollTop%3A%20anInteger%0A%20%20%20%20self%20call%3A%20%27scrollTop%27%20withArgument%3A%20anInteger%0A'),
+messageSends: ["call:withArgument:"],
+referencedClasses: []
+}),
 smalltalk.JQuery);
 
 smalltalk.addMethod(
@@ -308,7 +383,10 @@ fn: function (){
 var self=this;
 smalltalk.send(self, "_call_", ["focus"]);
 return self;},
-source: unescape('focus%0A%20%20%20%20self%20call%3A%20%27focus%27%0A')}),
+source: unescape('focus%0A%20%20%20%20self%20call%3A%20%27focus%27%0A'),
+messageSends: ["call:"],
+referencedClasses: []
+}),
 smalltalk.JQuery);
 
 smalltalk.addMethod(
@@ -320,7 +398,10 @@ fn: function (){
 var self=this;
 smalltalk.send(self, "_call_", ["show"]);
 return self;},
-source: unescape('show%0A%20%20%20%20self%20call%3A%20%27show%27%0A')}),
+source: unescape('show%0A%20%20%20%20self%20call%3A%20%27show%27%0A'),
+messageSends: ["call:"],
+referencedClasses: []
+}),
 smalltalk.JQuery);
 
 smalltalk.addMethod(
@@ -332,7 +413,10 @@ fn: function (){
 var self=this;
 smalltalk.send(self, "_call_", ["hide"]);
 return self;},
-source: unescape('hide%0A%20%20%20%20self%20call%3A%20%27hide%27%0A')}),
+source: unescape('hide%0A%20%20%20%20self%20call%3A%20%27hide%27%0A'),
+messageSends: ["call:"],
+referencedClasses: []
+}),
 smalltalk.JQuery);
 
 smalltalk.addMethod(
@@ -344,7 +428,10 @@ fn: function (){
 var self=this;
 smalltalk.send(self, "_call_", ["remove"]);
 return self;},
-source: unescape('remove%0A%20%20%20%20self%20call%3A%20%27remove%27%0A')}),
+source: unescape('remove%0A%20%20%20%20self%20call%3A%20%27remove%27%0A'),
+messageSends: ["call:"],
+referencedClasses: []
+}),
 smalltalk.JQuery);
 
 smalltalk.addMethod(
@@ -356,7 +443,10 @@ fn: function (anEventString, aBlock){
 var self=this;
 self['@jquery'].bind(anEventString, function(e){aBlock(e, self)});
 return self;},
-source: unescape('on%3A%20anEventString%20do%3A%20aBlock%0A%20%20%20%20%22Attach%20aBlock%20for%20anEventString%20on%20the%20element%22%0A%20%20%20%20%7B%27self%5B%27%27@jquery%27%27%5D.bind%28anEventString%2C%20function%28e%29%7BaBlock%28e%2C%20self%29%7D%29%27%7D%0A')}),
+source: unescape('on%3A%20anEventString%20do%3A%20aBlock%0A%20%20%20%20%22Attach%20aBlock%20for%20anEventString%20on%20the%20element%22%0A%20%20%20%20%7B%27self%5B%27%27@jquery%27%27%5D.bind%28anEventString%2C%20function%28e%29%7BaBlock%28e%2C%20self%29%7D%29%27%7D%0A'),
+messageSends: [],
+referencedClasses: []
+}),
 smalltalk.JQuery);
 
 smalltalk.addMethod(
@@ -368,7 +458,10 @@ fn: function (aString){
 var self=this;
 smalltalk.send(self, "_call_withArgument_", ["unbind", aString]);
 return self;},
-source: unescape('removeEvents%3A%20aString%0A%20%20%20%20%22Unbind%20all%20handlers%20attached%20to%20the%20event%20aString%22%0A%20%20%20%20self%20call%3A%20%27unbind%27%20withArgument%3A%20aString%0A')}),
+source: unescape('removeEvents%3A%20aString%0A%20%20%20%20%22Unbind%20all%20handlers%20attached%20to%20the%20event%20aString%22%0A%20%20%20%20self%20call%3A%20%27unbind%27%20withArgument%3A%20aString%0A'),
+messageSends: ["call:withArgument:"],
+referencedClasses: []
+}),
 smalltalk.JQuery);
 
 smalltalk.addMethod(
@@ -380,7 +473,10 @@ fn: function (anObject){
 var self=this;
 smalltalk.send(anObject, "_appendToJQuery_", [self]);
 return self;},
-source: unescape('append%3A%20anObject%0A%20%20%20%20%22Append%20anObject%20at%20the%20end%20of%20the%20element.%22%0A%20%20%20%20anObject%20appendToJQuery%3A%20self%0A')}),
+source: unescape('append%3A%20anObject%0A%20%20%20%20%22Append%20anObject%20at%20the%20end%20of%20the%20element.%22%0A%20%20%20%20anObject%20appendToJQuery%3A%20self%0A'),
+messageSends: ["appendToJQuery:"],
+referencedClasses: []
+}),
 smalltalk.JQuery);
 
 smalltalk.addMethod(
@@ -392,7 +488,10 @@ fn: function (anElement){
 var self=this;
 smalltalk.send(self, "_call_withArgument_", ["append", anElement]);
 return self;},
-source: unescape('appendElement%3A%20anElement%0A%20%20%20%20%22Append%20anElement%20at%20the%20end%20of%20the%20element.%0A%20%20%20%20%20Dont%27t%20call%20this%20method%20directly%2C%20use%20%23append%3A%20instead%22%0A%20%20%20%20self%20call%3A%20%27append%27%20withArgument%3A%20anElement%0A')}),
+source: unescape('appendElement%3A%20anElement%0A%20%20%20%20%22Append%20anElement%20at%20the%20end%20of%20the%20element.%0A%20%20%20%20%20Dont%27t%20call%20this%20method%20directly%2C%20use%20%23append%3A%20instead%22%0A%20%20%20%20self%20call%3A%20%27append%27%20withArgument%3A%20anElement%0A'),
+messageSends: ["call:withArgument:"],
+referencedClasses: []
+}),
 smalltalk.JQuery);
 
 smalltalk.addMethod(
@@ -404,7 +503,10 @@ fn: function (aJQuery){
 var self=this;
 smalltalk.send(aJQuery, "_appendElement_", [self['@jquery']]);
 return self;},
-source: unescape('appendToJQuery%3A%20aJQuery%0A%20%20%20%20aJQuery%20appendElement%3A%20jquery%0A')}),
+source: unescape('appendToJQuery%3A%20aJQuery%0A%20%20%20%20aJQuery%20appendElement%3A%20jquery%0A'),
+messageSends: ["appendElement:"],
+referencedClasses: []
+}),
 smalltalk.JQuery);
 
 smalltalk.addMethod(
@@ -417,7 +519,10 @@ var self=this;
 smalltalk.send(self, "_empty", []);
 smalltalk.send(self, "_append_", [anObject]);
 return self;},
-source: unescape('contents%3A%20anObject%0A%20%20%20%20self%20empty.%0A%20%20%20%20self%20append%3A%20anObject%0A')}),
+source: unescape('contents%3A%20anObject%0A%20%20%20%20self%20empty.%0A%20%20%20%20self%20append%3A%20anObject%0A'),
+messageSends: ["empty", "append:"],
+referencedClasses: []
+}),
 smalltalk.JQuery);
 
 smalltalk.addMethod(
@@ -427,9 +532,12 @@ selector: 'empty',
 category: 'DOM insertion',
 fn: function (){
 var self=this;
-smalltalk.send(self, "_call_", ["empty"]);
+return smalltalk.send(self, "_call_", ["empty"]);
 return self;},
-source: unescape('empty%0A%20%20%20%20self%20call%3A%20%27empty%27%0A')}),
+source: unescape('empty%0A%20%20%20%20%5Eself%20call%3A%20%27empty%27'),
+messageSends: ["call:"],
+referencedClasses: []
+}),
 smalltalk.JQuery);
 
 smalltalk.addMethod(
@@ -441,7 +549,10 @@ fn: function (anObject){
 var self=this;
 self['@jquery']=anObject;
 return self;},
-source: unescape('initializeWithJQueryObject%3A%20anObject%0A%20%20%20%20jquery%20%3A%3D%20anObject%0A')}),
+source: unescape('initializeWithJQueryObject%3A%20anObject%0A%20%20%20%20jquery%20%3A%3D%20anObject%0A'),
+messageSends: [],
+referencedClasses: []
+}),
 smalltalk.JQuery);
 
 smalltalk.addMethod(
@@ -453,7 +564,10 @@ fn: function (aString){
 var self=this;
 return self['@jquery'][aString]();
 return self;},
-source: unescape('call%3A%20aString%0A%09%7B%27return%20self%5B%27%27@jquery%27%27%5D%5BaString%5D%28%29%27%7D')}),
+source: unescape('call%3A%20aString%0A%09%7B%27return%20self%5B%27%27@jquery%27%27%5D%5BaString%5D%28%29%27%7D'),
+messageSends: [],
+referencedClasses: []
+}),
 smalltalk.JQuery);
 
 smalltalk.addMethod(
@@ -465,7 +579,10 @@ fn: function (aString, anObject){
 var self=this;
 return self['@jquery'][aString](anObject);
 return self;},
-source: unescape('call%3A%20aString%20withArgument%3A%20anObject%0A%20%20%20%20%7B%27return%20self%5B%27%27@jquery%27%27%5D%5BaString%5D%28anObject%29%27%7D')}),
+source: unescape('call%3A%20aString%20withArgument%3A%20anObject%0A%20%20%20%20%7B%27return%20self%5B%27%27@jquery%27%27%5D%5BaString%5D%28anObject%29%27%7D'),
+messageSends: [],
+referencedClasses: []
+}),
 smalltalk.JQuery);
 
 smalltalk.addMethod(
@@ -477,7 +594,10 @@ fn: function (aString){
 var self=this;
 return smalltalk.send(self, "_call_withArgument_", ["hasClass", aString]);
 return self;},
-source: unescape('hasClass%3A%20aString%0A%20%20%20%20%22Determine%20whether%20any%20of%20the%20matched%20elements%20are%20assigned%20the%20given%20class.%22%0A%20%20%20%20%5Eself%20call%3A%20%27hasClass%27%20withArgument%3A%20aString%0A')}),
+source: unescape('hasClass%3A%20aString%0A%20%20%20%20%22Determine%20whether%20any%20of%20the%20matched%20elements%20are%20assigned%20the%20given%20class.%22%0A%20%20%20%20%5Eself%20call%3A%20%27hasClass%27%20withArgument%3A%20aString%0A'),
+messageSends: ["call:withArgument:"],
+referencedClasses: []
+}),
 smalltalk.JQuery);
 
 
@@ -492,7 +612,10 @@ var newJQuery=nil;
 newJQuery = jQuery(String(aString));
 return smalltalk.send(self, "_from_", [newJQuery]);
 return self;},
-source: unescape('fromString%3A%20aString%0A%20%20%20%20%7C%20newJQuery%20%7C%0A%20%20%20%20%7B%27newJQuery%20%3D%20jQuery%28String%28aString%29%29%27%7D.%0A%20%20%20%20%5Eself%20from%3A%20newJQuery%0A')}),
+source: unescape('fromString%3A%20aString%0A%20%20%20%20%7C%20newJQuery%20%7C%0A%20%20%20%20%7B%27newJQuery%20%3D%20jQuery%28String%28aString%29%29%27%7D.%0A%20%20%20%20%5Eself%20from%3A%20newJQuery%0A'),
+messageSends: ["from:"],
+referencedClasses: []
+}),
 smalltalk.JQuery.klass);
 
 smalltalk.addMethod(
@@ -504,7 +627,55 @@ fn: function (anObject){
 var self=this;
 return (function($rec){smalltalk.send($rec, "_initializeWithJQueryObject_", [anObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
 return self;},
-source: unescape('from%3A%20anObject%0A%20%20%20%20%5Eself%20new%0A%09initializeWithJQueryObject%3A%20anObject%3B%0A%09yourself%0A')}),
+source: unescape('from%3A%20anObject%0A%20%20%20%20%5Eself%20new%0A%09initializeWithJQueryObject%3A%20anObject%3B%0A%09yourself%0A'),
+messageSends: ["initializeWithJQueryObject:", "yourself", "new"],
+referencedClasses: []
+}),
+smalltalk.JQuery.klass);
+
+smalltalk.addMethod(
+'_window',
+smalltalk.method({
+selector: 'window',
+category: 'instance creation',
+fn: function (){
+var self=this;
+return self._from_(jQuery(window));
+return self;},
+source: unescape('window%0A%09%7B%27return%20self._from_%28jQuery%28window%29%29%27%7D'),
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.JQuery.klass);
+
+smalltalk.addMethod(
+'_body',
+smalltalk.method({
+selector: 'body',
+category: 'instance creation',
+fn: function (){
+var self=this;
+return self._from_(jQuery(body));
+return self;},
+source: unescape('body%0A%09%7B%27return%20self._from_%28jQuery%28body%29%29%27%7D'),
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.JQuery.klass);
+
+smalltalk.addMethod(
+'_document',
+smalltalk.method({
+selector: 'document',
+category: 'instance creation',
+fn: function (){
+var self=this;
+return self._from_(jQuery(document));
+return self;},
+source: unescape('document%0A%09%7B%27return%20self._from_%28jQuery%28document%29%29%27%7D'),
+messageSends: [],
+referencedClasses: []
+}),
 smalltalk.JQuery.klass);
 
 
@@ -517,10 +688,13 @@ selector: 'initialize',
 category: 'initialization',
 fn: function (){
 var self=this;
-self.klass.superclass.fn.prototype['_initialize'].apply(self, []);
+smalltalk.send(self, "_initialize", [], smalltalk.Object);
 self['@settings']=smalltalk.send(smalltalk.Dictionary, "_new", []);
 return self;},
-source: unescape('initialize%0A%20%20%20%20super%20initialize.%0A%20%20%20%20settings%20%3A%3D%20Dictionary%20new%0A')}),
+source: unescape('initialize%0A%20%20%20%20super%20initialize.%0A%20%20%20%20settings%20%3A%3D%20Dictionary%20new%0A'),
+messageSends: ["initialize", "new"],
+referencedClasses: [smalltalk.Dictionary]
+}),
 smalltalk.Ajax);
 
 smalltalk.addMethod(
@@ -532,7 +706,10 @@ fn: function (aKey){
 var self=this;
 return smalltalk.send(self['@settings'], "_at_ifAbsent_", [aKey, (function(){return nil;})]);
 return self;},
-source: unescape('at%3A%20aKey%0A%20%20%20%20%5Esettings%20at%3A%20aKey%20ifAbsent%3A%20%5Bnil%5D%0A')}),
+source: unescape('at%3A%20aKey%0A%20%20%20%20%5Esettings%20at%3A%20aKey%20ifAbsent%3A%20%5Bnil%5D%0A'),
+messageSends: ["at:ifAbsent:"],
+referencedClasses: []
+}),
 smalltalk.Ajax);
 
 smalltalk.addMethod(
@@ -544,7 +721,10 @@ fn: function (aKey, aValue){
 var self=this;
 smalltalk.send(self['@settings'], "_at_put_", [aKey, aValue]);
 return self;},
-source: unescape('at%3A%20aKey%20put%3A%20aValue%0A%20%20%20%20settings%20at%3A%20aKey%20put%3A%20aValue%0A')}),
+source: unescape('at%3A%20aKey%20put%3A%20aValue%0A%20%20%20%20settings%20at%3A%20aKey%20put%3A%20aValue%0A'),
+messageSends: ["at:put:"],
+referencedClasses: []
+}),
 smalltalk.Ajax);
 
 smalltalk.addMethod(
@@ -556,7 +736,10 @@ fn: function (){
 var self=this;
 return smalltalk.send(self, "_at_", ["url"]);
 return self;},
-source: unescape('url%0A%20%20%20%20%5Eself%20at%3A%20%27url%27%0A')}),
+source: unescape('url%0A%20%20%20%20%5Eself%20at%3A%20%27url%27%0A'),
+messageSends: ["at:"],
+referencedClasses: []
+}),
 smalltalk.Ajax);
 
 smalltalk.addMethod(
@@ -568,7 +751,10 @@ fn: function (aString){
 var self=this;
 smalltalk.send(self, "_at_put_", ["url", aString]);
 return self;},
-source: unescape('url%3A%20aString%0A%20%20%20%20self%20at%3A%20%27url%27%20put%3A%20aString%0A')}),
+source: unescape('url%3A%20aString%0A%20%20%20%20self%20at%3A%20%27url%27%20put%3A%20aString%0A'),
+messageSends: ["at:put:"],
+referencedClasses: []
+}),
 smalltalk.Ajax);
 
 smalltalk.addMethod(
@@ -580,7 +766,10 @@ fn: function (){
 var self=this;
 jQuery.ajax(self['@settings']);
 return self;},
-source: unescape('send%0A%20%20%20%20%7B%27jQuery.ajax%28self%5B%27%27@settings%27%27%5D%29%27%7D%0A')}),
+source: unescape('send%0A%20%20%20%20%7B%27jQuery.ajax%28self%5B%27%27@settings%27%27%5D%29%27%7D%0A'),
+messageSends: [],
+referencedClasses: []
+}),
 smalltalk.Ajax);
 
 
@@ -593,7 +782,73 @@ fn: function (aString){
 var self=this;
 return (function($rec){smalltalk.send($rec, "_url_", [aString]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
 return self;},
-source: unescape('url%3A%20aString%0A%20%20%20%20%5Eself%20new%0A%09url%3A%20aString%3B%0A%09yourself%0A')}),
+source: unescape('url%3A%20aString%0A%20%20%20%20%5Eself%20new%0A%09url%3A%20aString%3B%0A%09yourself%0A'),
+messageSends: ["url:", "yourself", "new"],
+referencedClasses: []
+}),
 smalltalk.Ajax.klass);
 
 
+smalltalk.addMethod(
+'_appendToJQuery_',
+smalltalk.method({
+selector: 'appendToJQuery:',
+category: '*JQuery',
+fn: function (aJQuery){
+var self=this;
+var canvas=nil;
+canvas=smalltalk.send(smalltalk.HTMLCanvas, "_new", []);
+smalltalk.send(self, "_value_", [canvas]);
+smalltalk.send(aJQuery, "_append_", [canvas]);
+return self;},
+source: unescape('appendToJQuery%3A%20aJQuery%0A%09%7C%20canvas%20%7C%0A%09canvas%20%3A%3D%20HTMLCanvas%20new.%0A%09self%20value%3A%20canvas.%0A%09aJQuery%20append%3A%20canvas%0A'),
+messageSends: ["new", "value:", "append:"],
+referencedClasses: [smalltalk.HTMLCanvas]
+}),
+smalltalk.BlockClosure);
+
+smalltalk.addMethod(
+'_asJQuery',
+smalltalk.method({
+selector: 'asJQuery',
+category: '*JQuery',
+fn: function (){
+var self=this;
+return smalltalk.send(smalltalk.JQuery, "_fromString_", [self]);
+return self;},
+source: unescape('asJQuery%0A%20%20%20%20%5EJQuery%20fromString%3A%20self%0A'),
+messageSends: ["fromString:"],
+referencedClasses: [smalltalk.JQuery]
+}),
+smalltalk.String);
+
+smalltalk.addMethod(
+'_appendToJQuery_',
+smalltalk.method({
+selector: 'appendToJQuery:',
+category: '*JQuery',
+fn: function (aJQuery){
+var self=this;
+aJQuery._appendElement_(String(self));
+return self;},
+source: unescape('appendToJQuery%3A%20aJQuery%0A%20%20%20%20%7B%27aJQuery._appendElement_%28String%28self%29%29%27%7D%0A'),
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.String);
+
+smalltalk.addMethod(
+'_appendToJQuery_',
+smalltalk.method({
+selector: 'appendToJQuery:',
+category: '*JQuery',
+fn: function (aJQuery){
+var self=this;
+smalltalk.send(aJQuery, "_appendElement_", [smalltalk.send(self['@root'], "_element", [])]);
+return self;},
+source: unescape('appendToJQuery%3A%20aJQuery%0A%20%20%20%20aJQuery%20appendElement%3A%20root%20element%0A'),
+messageSends: ["appendElement:", "element"],
+referencedClasses: []
+}),
+smalltalk.HTMLCanvas);
+

File diff suppressed because it is too large
+ 400 - 334
js/Kernel.js


File diff suppressed because it is too large
+ 228 - 69
js/Parser.js


+ 16 - 13
js/boot.js

@@ -55,13 +55,13 @@ function Smalltalk(){
        should be added to the smalltalk object, see smalltalk.addClass().
        Superclass linking is *not* handled here, see smalltalk.init()  */
 
-    st.klass = function(spec) {
+    klass = function(spec) {
 	var spec = spec || {};
 	var that;
 	if(spec.meta) {
 	    that = new SmalltalkMetaclass();
 	} else {
-	    that = new (st.klass({meta: true})).fn;
+	    that = new (klass({meta: true})).fn;
 	    that.klass.instanceClass = that;
 	    that.className = spec.className;
 	    that.klass.className = that.className + ' class';
@@ -85,10 +85,12 @@ function Smalltalk(){
 
     st.method = function(spec) {
 	var that = new SmalltalkMethod();
-	that.selector = spec.selector;
-	that.category = spec.category;
-	that.source   = spec.source;
-	that.fn       = spec.fn;
+	that.selector          = spec.selector;
+	that.category          = spec.category;
+	that.source            = spec.source;
+	that.messageSends      = spec.messageSends || [];
+	that.referencedClasses = spec.referencedClasses || [];
+	that.fn                = spec.fn;
 	return that
     };
 
@@ -154,7 +156,7 @@ function Smalltalk(){
        global smalltalk object. */
 
     st.mapClassName = function(className, category, fn, superclass) {
-	st[className] = st.klass({
+	st[className] = klass({
 	    className:  className, 
 	    category:   category, 
 	    superclass: superclass,
@@ -170,7 +172,7 @@ function Smalltalk(){
 	    st[className].iVarNames = iVarNames;
 	    st[className].category = category || st[className].category;
 	} else {
-	    st[className] = smalltalk.klass({
+	    st[className] = klass({
 		className: className, 
 		iVarNames: iVarNames,
 		superclass: superclass
@@ -184,23 +186,24 @@ function Smalltalk(){
     st.addMethod = function(jsSelector, method, klass) {
 	klass.fn.prototype[jsSelector] = method.fn;
 	klass.fn.prototype.methods[method.selector] = method;
+	method.methodClass = klass;
     };
 
     /* Handles Smalltalk message send. Automatically converts undefined to the nil object.
        If the receiver does not understand the selector, call its #doesNotUnderstand: method */
 
-    st.send = function(receiver, selector, args) {
+    st.send = function(receiver, selector, args, klass) {
 	if(typeof receiver === "undefined") {
 	    receiver = nil;
 	}
-	if(receiver[selector]) {
-	    return receiver[selector].apply(receiver, args);
-	} else {
+	var klass = klass || receiver.klass;
+	var method = klass.fn.prototype[selector];
+	if(!method) {
 	    return messageNotUnderstood(receiver, selector, args);
 	}
+	return method.apply(receiver, args);
     };
 
-
     /* handle #dnu:. 
        Assume that the receiver understands #doesNotUnderstand: */
 

+ 1 - 0
js/init.js

@@ -1 +1,2 @@
 smalltalk.init(smalltalk.Object);
+smalltalk.classes()._do_(function(each) {each._initialize()});

+ 0 - 0
js/jquery-1.4.4.min.js


+ 0 - 0
js/jquery-ui-1.8.9.custom.min.js


+ 0 - 0
js/jquery.textarea.js


+ 0 - 0
js/jtalk.deploy.js


+ 0 - 0
js/jtalk.js


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