resin 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. data/amber/css/amber-normalize.css +73 -73
  2. data/amber/css/amber-normalize.less +1 -1
  3. data/amber/css/amber.css +106 -106
  4. data/amber/css/helios.css +242 -0
  5. data/amber/images/hsplitter.png +0 -0
  6. data/amber/images/vsplitter.png +0 -0
  7. data/amber/js/Benchfib.deploy.js +116 -38
  8. data/amber/js/Benchfib.js +120 -42
  9. data/amber/js/Canvas.deploy.js +674 -403
  10. data/amber/js/Canvas.js +682 -411
  11. data/amber/js/Compiler-AST.deploy.js +1150 -0
  12. data/amber/js/Compiler-AST.js +1591 -0
  13. data/amber/js/Compiler-Core.deploy.js +1562 -0
  14. data/amber/js/Compiler-Core.js +1972 -0
  15. data/amber/js/Compiler-Exceptions.deploy.js +114 -0
  16. data/amber/js/Compiler-Exceptions.js +161 -0
  17. data/amber/js/Compiler-IR.deploy.js +2326 -0
  18. data/amber/js/Compiler-IR.js +3146 -0
  19. data/amber/js/Compiler-Inlining.deploy.js +1147 -0
  20. data/amber/js/Compiler-Inlining.js +1514 -0
  21. data/amber/js/Compiler-Semantic.deploy.js +1207 -0
  22. data/amber/js/Compiler-Semantic.js +1628 -0
  23. data/amber/js/Compiler-Tests.deploy.js +646 -60
  24. data/amber/js/Compiler-Tests.js +843 -82
  25. data/amber/js/Compiler.deploy.js +1097 -159
  26. data/amber/js/Compiler.js +1414 -161
  27. data/amber/js/Examples.deploy.js +31 -15
  28. data/amber/js/Examples.js +33 -17
  29. data/amber/js/Helios-Announcements.deploy.js +127 -0
  30. data/amber/js/Helios-Announcements.js +157 -0
  31. data/amber/js/Helios-Browser.deploy.js +1473 -0
  32. data/amber/js/Helios-Browser.js +1953 -0
  33. data/amber/js/Helios-Commands.deploy.js +403 -0
  34. data/amber/js/Helios-Commands.js +563 -0
  35. data/amber/js/Helios-Core.deploy.js +1070 -0
  36. data/amber/js/Helios-Core.js +1445 -0
  37. data/amber/js/Helios-Environments.deploy.js +132 -0
  38. data/amber/js/Helios-Environments.js +179 -0
  39. data/amber/js/Helios-Inspector.deploy.js +855 -0
  40. data/amber/js/Helios-Inspector.js +1155 -0
  41. data/amber/js/Helios-KeyBindings.deploy.js +753 -0
  42. data/amber/js/Helios-KeyBindings.js +1023 -0
  43. data/amber/js/Helios-Layout.deploy.js +383 -0
  44. data/amber/js/Helios-Layout.js +523 -0
  45. data/amber/js/Helios-Workspace.deploy.js +799 -0
  46. data/amber/js/Helios-Workspace.js +1074 -0
  47. data/amber/js/IDE.deploy.js +2541 -1490
  48. data/amber/js/IDE.js +2721 -1660
  49. data/amber/js/Importer-Exporter.deploy.js +671 -0
  50. data/amber/js/Importer-Exporter.js +816 -0
  51. data/amber/js/Kernel-Announcements.deploy.js +137 -20
  52. data/amber/js/Kernel-Announcements.js +176 -22
  53. data/amber/js/Kernel-Classes.deploy.js +555 -168
  54. data/amber/js/Kernel-Classes.js +662 -205
  55. data/amber/js/Kernel-Collections.deploy.js +1403 -618
  56. data/amber/js/Kernel-Collections.js +1545 -690
  57. data/amber/js/Kernel-Exceptions.deploy.js +109 -45
  58. data/amber/js/Kernel-Exceptions.js +123 -49
  59. data/amber/js/Kernel-Methods.deploy.js +196 -81
  60. data/amber/js/Kernel-Methods.js +214 -89
  61. data/amber/js/Kernel-Objects.deploy.js +1542 -1117
  62. data/amber/js/Kernel-Objects.js +1593 -1148
  63. data/amber/js/Kernel-Tests.deploy.js +1725 -772
  64. data/amber/js/Kernel-Tests.js +2301 -1123
  65. data/amber/js/Kernel-Transcript.deploy.js +23 -25
  66. data/amber/js/Kernel-Transcript.js +24 -26
  67. data/amber/js/SUnit.deploy.js +204 -131
  68. data/amber/js/SUnit.js +222 -139
  69. data/amber/js/Spaces.deploy.js +240 -0
  70. data/amber/js/Spaces.js +326 -0
  71. data/amber/js/amber.js +26 -7
  72. data/amber/js/boot.js +65 -47
  73. data/amber/js/init.js +1 -1
  74. data/amber/js/lib/CodeMirror/amber.css +21 -21
  75. data/amber/js/lib/CodeMirror/codemirror.css +119 -13
  76. data/amber/js/lib/CodeMirror/codemirror.js +2219 -1220
  77. data/amber/js/lib/CodeMirror/smalltalk.js +134 -129
  78. data/amber/js/lib/bootstrap/css/bootstrap.css +5837 -0
  79. data/amber/js/lib/bootstrap/css/bootstrap.min.css +841 -0
  80. data/amber/js/lib/bootstrap/img/glyphicons-halflings-white.png +0 -0
  81. data/amber/js/lib/bootstrap/img/glyphicons-halflings.png +0 -0
  82. data/amber/js/lib/bootstrap/js/bootstrap.js +2038 -0
  83. data/amber/js/lib/bootstrap/js/bootstrap.min.js +7 -0
  84. data/amber/js/lib/jQuery/jquery-1.8.2.min.js +2 -0
  85. data/amber/js/lib/jQuery/jquery-ui-1.8.24.custom.min.js +125 -0
  86. data/amber/st/Compiler-AST.st +505 -0
  87. data/amber/st/Compiler-Core.st +835 -0
  88. data/amber/st/Compiler-Exceptions.st +87 -0
  89. data/amber/st/Compiler-IR.st +1097 -0
  90. data/amber/st/Compiler-Inlining.st +650 -0
  91. data/amber/st/Compiler-Semantic.st +558 -0
  92. data/amber/st/Compiler-Tests.st +285 -381
  93. data/amber/st/Compiler.st +725 -2
  94. data/amber/st/Helios-Announcements.st +104 -0
  95. data/amber/st/Helios-Browser.st +708 -0
  96. data/amber/st/Helios-Commands.st +223 -0
  97. data/amber/st/Helios-Core.st +532 -0
  98. data/amber/st/Helios-Environments.st +98 -0
  99. data/amber/st/Helios-Inspector.st +367 -0
  100. data/amber/st/Helios-KeyBindings.st +337 -0
  101. data/amber/st/Helios-Layout.st +199 -0
  102. data/amber/st/Helios-Workspace.st +367 -0
  103. data/amber/st/IDE.st +75 -53
  104. data/amber/st/Importer-Exporter.st +386 -0
  105. data/amber/st/Kernel-Announcements.st +92 -0
  106. data/amber/st/Kernel-Classes.st +137 -15
  107. data/amber/st/Kernel-Collections.st +137 -47
  108. data/amber/st/Kernel-Exceptions.st +14 -0
  109. data/amber/st/Kernel-Methods.st +9 -1
  110. data/amber/st/Kernel-Objects.st +29 -5
  111. data/amber/st/Kernel-Tests.st +545 -199
  112. data/amber/st/SUnit.st +10 -0
  113. data/amber/st/Spaces.st +142 -0
  114. data/lib/resin/app.rb +1 -1
  115. metadata +86 -31
  116. data/amber/js/lib/jQuery/jquery-1.4.4.min.js +0 -167
  117. data/amber/js/lib/jQuery/jquery-1.6.4.min.js +0 -4
@@ -0,0 +1,240 @@
1
+ smalltalk.addPackage('Spaces', {});
2
+ smalltalk.addClass('ObjectSpace', smalltalk.Object, ['frame'], 'Spaces');
3
+ smalltalk.addMethod(
4
+ "_connectTo_",
5
+ smalltalk.method({
6
+ selector: "connectTo:",
7
+ fn: function (aFrame) {
8
+ var self = this;
9
+ smalltalk.send(self, "_release", []);
10
+ self['@frame'] = aFrame;
11
+ return self;
12
+ }
13
+ }),
14
+ smalltalk.ObjectSpace);
15
+
16
+ smalltalk.addMethod(
17
+ "_create",
18
+ smalltalk.method({
19
+ selector: "create",
20
+ fn: function () {
21
+ var self = this;
22
+ smalltalk.send(smalltalk.send(window, "_jQuery_", ["body"]), "_append_", ["<iframe style=\"display: none;\"></iframe>"]);
23
+ self['@frame'] = smalltalk.send(smalltalk.send(smalltalk.send(window, "_jQuery_", ["iframe"]), "_get", []), "_last", []);
24
+ smalltalk.send(smalltalk.send(self['@frame'], "_contentWindow", []), "_location_", [smalltalk.send(window, "_location", [])]);
25
+ return self;
26
+ }
27
+ }),
28
+ smalltalk.ObjectSpace);
29
+
30
+ smalltalk.addMethod(
31
+ "_destroy",
32
+ smalltalk.method({
33
+ selector: "destroy",
34
+ fn: function () {
35
+ var self = this;
36
+ if (($receiver = self['@frame']) == nil || $receiver == undefined) {
37
+ return self;
38
+ } else {
39
+ self['@frame'];
40
+ }
41
+ smalltalk.send(smalltalk.send(window, "_jQuery_", [self['@frame']]), "_remove", []);
42
+ smalltalk.send(self, "_release", []);
43
+ return self;
44
+ }
45
+ }),
46
+ smalltalk.ObjectSpace);
47
+
48
+ smalltalk.addMethod(
49
+ "_do_",
50
+ smalltalk.method({
51
+ selector: "do:",
52
+ fn: function (aBlock) {
53
+ var self = this;
54
+ var $1, $2, $3;
55
+ $1 = smalltalk.send(self, "_isConnected", []);
56
+ if (!smalltalk.assert($1)) {
57
+ $2 = smalltalk.send(smalltalk.ObjectSpaceConnectionError ||
58
+ ObjectSpaceConnectionError, "_signal", []);
59
+ return $2;
60
+ }
61
+ $3 = smalltalk.send(smalltalk.send(self['@frame'], "_contentWindow", []), "_eval_", [smalltalk.send(smalltalk.send("(", "__comma", [smalltalk.send(aBlock, "_compiledSource", [])]), "__comma", [")()"])]);
62
+ return $3;
63
+ }
64
+ }),
65
+ smalltalk.ObjectSpace);
66
+
67
+ smalltalk.addMethod(
68
+ "_frame",
69
+ smalltalk.method({
70
+ selector: "frame",
71
+ fn: function () {
72
+ var self = this;
73
+ return self['@frame'];
74
+ }
75
+ }),
76
+ smalltalk.ObjectSpace);
77
+
78
+ smalltalk.addMethod(
79
+ "_initialize",
80
+ smalltalk.method({
81
+ selector: "initialize",
82
+ fn: function () {
83
+ var self = this;
84
+ smalltalk.send(self, "_initialize", [], smalltalk.Object);
85
+ smalltalk.send(self, "_create", []);
86
+ return self;
87
+ }
88
+ }),
89
+ smalltalk.ObjectSpace);
90
+
91
+ smalltalk.addMethod(
92
+ "_isConnected",
93
+ smalltalk.method({
94
+ selector: "isConnected",
95
+ fn: function () {
96
+ var self = this;
97
+ var $1;
98
+ $1 = smalltalk.send(smalltalk.send(self, "_frame", []), "_notNil", []);
99
+ return $1;
100
+ }
101
+ }),
102
+ smalltalk.ObjectSpace);
103
+
104
+ smalltalk.addMethod(
105
+ "_release",
106
+ smalltalk.method({
107
+ selector: "release",
108
+ fn: function () {
109
+ var self = this;
110
+ self['@frame'] = nil;
111
+ return self;
112
+ }
113
+ }),
114
+ smalltalk.ObjectSpace);
115
+
116
+ smalltalk.addMethod(
117
+ "_whenReadyDo_",
118
+ smalltalk.method({
119
+ selector: "whenReadyDo:",
120
+ fn: function (aBlock) {
121
+ var self = this;
122
+ smalltalk.send(smalltalk.send(window, "_jQuery_", [self['@frame']]), "_bind_do_", ["load", aBlock]);
123
+ return self;
124
+ }
125
+ }),
126
+ smalltalk.ObjectSpace);
127
+
128
+
129
+ smalltalk.addMethod(
130
+ "_on_",
131
+ smalltalk.method({
132
+ selector: "on:",
133
+ fn: function (aFrame) {
134
+ var self = this;
135
+ var $2, $3, $1;
136
+ $2 = smalltalk.send(self, "_basicNew", []);
137
+ smalltalk.send($2, "_connectTo_", [aFrame]);
138
+ $3 = smalltalk.send($2, "_yourself", []);
139
+ $1 = $3;
140
+ return $1;
141
+ }
142
+ }),
143
+ smalltalk.ObjectSpace.klass);
144
+
145
+
146
+ smalltalk.addClass('ObjectSpaceConnectionError', smalltalk.Error, [], 'Spaces');
147
+ smalltalk.addMethod(
148
+ "_messageText",
149
+ smalltalk.method({
150
+ selector: "messageText",
151
+ fn: function () {
152
+ var self = this;
153
+ return "The ObjectSpace is not connected";
154
+ }
155
+ }),
156
+ smalltalk.ObjectSpaceConnectionError);
157
+
158
+
159
+
160
+ smalltalk.addClass('ObjectSpaceTest', smalltalk.TestCase, ['space'], 'Spaces');
161
+ smalltalk.addMethod(
162
+ "_setUp",
163
+ smalltalk.method({
164
+ selector: "setUp",
165
+ fn: function () {
166
+ var self = this;
167
+ self['@space'] = smalltalk.send(smalltalk.ObjectSpace || ObjectSpace, "_new", []);
168
+ return self;
169
+ }
170
+ }),
171
+ smalltalk.ObjectSpaceTest);
172
+
173
+ smalltalk.addMethod(
174
+ "_tearDown",
175
+ smalltalk.method({
176
+ selector: "tearDown",
177
+ fn: function () {
178
+ var self = this;
179
+ smalltalk.send(self['@space'], "_destroy", []);
180
+ return self;
181
+ }
182
+ }),
183
+ smalltalk.ObjectSpaceTest);
184
+
185
+ smalltalk.addMethod(
186
+ "_testConnection",
187
+ smalltalk.method({
188
+ selector: "testConnection",
189
+ fn: function () {
190
+ var self = this;
191
+ smalltalk.send(self['@space'], "_destroy", []);
192
+ smalltalk.send(self, "_deny_", [smalltalk.send(self['@space'], "_isConnected", [])]);
193
+ smalltalk.send(self, "_should_raise_", [function () {return smalltalk.send(self['@space'], "_do_", [function () {}]);}, smalltalk.ObjectSpaceConnectionError || ObjectSpaceConnectionError]);
194
+ return self;
195
+ }
196
+ }),
197
+ smalltalk.ObjectSpaceTest);
198
+
199
+ smalltalk.addMethod(
200
+ "_testCreate",
201
+ smalltalk.method({
202
+ selector: "testCreate",
203
+ fn: function () {
204
+ var self = this;
205
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(self['@space'], "_frame", []), "_notNil", [])]);
206
+ smalltalk.send(self, "_assert_", [smalltalk.send(self['@space'], "_isConnected", [])]);
207
+ return self;
208
+ }
209
+ }),
210
+ smalltalk.ObjectSpaceTest);
211
+
212
+ smalltalk.addMethod(
213
+ "_testEvaluation",
214
+ smalltalk.method({
215
+ selector: "testEvaluation",
216
+ fn: function () {
217
+ var self = this;
218
+ var result;
219
+ smalltalk.send(self['@space'], "_whenReadyDo_", [function () {result = smalltalk.send(self['@space'], "_do_", [function () {return smalltalk;}]);result;smalltalk.send(self, "_assert_equals_", [smalltalk.send(smalltalk.send(result, "_class", []), "_name", []), "Smalltalk"]);smalltalk.send(self, "_deny_", [smalltalk.send(smalltalk.send(result, "_class", []), "__eq", [smalltalk.Smalltalk || Smalltalk])]);return smalltalk.send(self, "_deny_", [smalltalk.send(result, "__eq_eq", [smalltalk])]);}]);
220
+ return self;
221
+ }
222
+ }),
223
+ smalltalk.ObjectSpaceTest);
224
+
225
+ smalltalk.addMethod(
226
+ "_testRelease",
227
+ smalltalk.method({
228
+ selector: "testRelease",
229
+ fn: function () {
230
+ var self = this;
231
+ smalltalk.send(self, "_deny_", [smalltalk.send(smalltalk.send(self['@space'], "_frame", []), "_isNil", [])]);
232
+ smalltalk.send(self['@space'], "_release", []);
233
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(self['@space'], "_frame", []), "_isNil", [])]);
234
+ return self;
235
+ }
236
+ }),
237
+ smalltalk.ObjectSpaceTest);
238
+
239
+
240
+
@@ -0,0 +1,326 @@
1
+ smalltalk.addPackage('Spaces', {});
2
+ smalltalk.addClass('ObjectSpace', smalltalk.Object, ['frame'], 'Spaces');
3
+ smalltalk.ObjectSpace.comment="I am a connection to another Smalltalk environment.\x0aThe implementation creates an iframe on the same location as the window, and connect to the Amber environment.\x0a\x0a\x0a\x0a## Usage example:\x0a\x0a | space |\x0a \x0a space := ObjectSpace new.\x0a space do: [ smalltalk ] \x22Answers aSmalltalk\x22\x0a (space do: [ smalltalk ]) == smalltalk \x22Answers false\x22\x0a \x0a space release \x22Remove the object space environment\x22"
4
+ smalltalk.addMethod(
5
+ "_connectTo_",
6
+ smalltalk.method({
7
+ selector: "connectTo:",
8
+ category: 'initialization',
9
+ fn: function (aFrame) {
10
+ var self = this;
11
+ smalltalk.send(self, "_release", []);
12
+ self['@frame'] = aFrame;
13
+ return self;
14
+ },
15
+ args: ["aFrame"],
16
+ source: "connectTo: aFrame\x0a\x09self release.\x0a\x09frame := aFrame",
17
+ messageSends: ["release"],
18
+ referencedClasses: []
19
+ }),
20
+ smalltalk.ObjectSpace);
21
+
22
+ smalltalk.addMethod(
23
+ "_create",
24
+ smalltalk.method({
25
+ selector: "create",
26
+ category: 'initialization',
27
+ fn: function () {
28
+ var self = this;
29
+ smalltalk.send(smalltalk.send(window, "_jQuery_", ["body"]), "_append_", ["<iframe style=\"display: none;\"></iframe>"]);
30
+ self['@frame'] = smalltalk.send(smalltalk.send(smalltalk.send(window, "_jQuery_", ["iframe"]), "_get", []), "_last", []);
31
+ smalltalk.send(smalltalk.send(self['@frame'], "_contentWindow", []), "_location_", [smalltalk.send(window, "_location", [])]);
32
+ return self;
33
+ },
34
+ args: [],
35
+ source: "create\x0a\x09(window jQuery: 'body') append: '<iframe style=\x22display: none;\x22></iframe>'.\x0a\x09frame := (window jQuery: 'iframe') get last.\x0a\x09frame contentWindow location: window location",
36
+ messageSends: ["append:", "jQuery:", "last", "get", "location:", "location", "contentWindow"],
37
+ referencedClasses: []
38
+ }),
39
+ smalltalk.ObjectSpace);
40
+
41
+ smalltalk.addMethod(
42
+ "_destroy",
43
+ smalltalk.method({
44
+ selector: "destroy",
45
+ category: 'releasing',
46
+ fn: function () {
47
+ var self = this;
48
+ if (($receiver = self['@frame']) == nil || $receiver == undefined) {
49
+ return self;
50
+ } else {
51
+ self['@frame'];
52
+ }
53
+ smalltalk.send(smalltalk.send(window, "_jQuery_", [self['@frame']]), "_remove", []);
54
+ smalltalk.send(self, "_release", []);
55
+ return self;
56
+ },
57
+ args: [],
58
+ source: "destroy\x0a\x09frame ifNil: [ ^ self ].\x0a\x09(window jQuery: frame) remove.\x0a\x0a\x09self release",
59
+ messageSends: ["ifNil:", "remove", "jQuery:", "release"],
60
+ referencedClasses: []
61
+ }),
62
+ smalltalk.ObjectSpace);
63
+
64
+ smalltalk.addMethod(
65
+ "_do_",
66
+ smalltalk.method({
67
+ selector: "do:",
68
+ category: 'evaluating',
69
+ fn: function (aBlock) {
70
+ var self = this;
71
+ var $1, $2, $3;
72
+ $1 = smalltalk.send(self, "_isConnected", []);
73
+ if (!smalltalk.assert($1)) {
74
+ $2 = smalltalk.send(smalltalk.ObjectSpaceConnectionError ||
75
+ ObjectSpaceConnectionError, "_signal", []);
76
+ return $2;
77
+ }
78
+ $3 = smalltalk.send(smalltalk.send(self['@frame'], "_contentWindow", []), "_eval_", [smalltalk.send(smalltalk.send("(", "__comma", [smalltalk.send(aBlock, "_compiledSource", [])]), "__comma", [")()"])]);
79
+ return $3;
80
+ },
81
+ args: ["aBlock"],
82
+ source: "do: aBlock\x0a\x09self isConnected ifFalse: [ ^ ObjectSpaceConnectionError signal ].\x0a\x09^ frame contentWindow eval: '(', aBlock compiledSource, ')()'",
83
+ messageSends: ["ifFalse:", "signal", "isConnected", "eval:", ",", "compiledSource", "contentWindow"],
84
+ referencedClasses: ["ObjectSpaceConnectionError"]
85
+ }),
86
+ smalltalk.ObjectSpace);
87
+
88
+ smalltalk.addMethod(
89
+ "_frame",
90
+ smalltalk.method({
91
+ selector: "frame",
92
+ category: 'accessing',
93
+ fn: function () {
94
+ var self = this;
95
+ return self['@frame'];
96
+ },
97
+ args: [],
98
+ source: "frame\x0a\x09^ frame",
99
+ messageSends: [],
100
+ referencedClasses: []
101
+ }),
102
+ smalltalk.ObjectSpace);
103
+
104
+ smalltalk.addMethod(
105
+ "_initialize",
106
+ smalltalk.method({
107
+ selector: "initialize",
108
+ category: 'initialization',
109
+ fn: function () {
110
+ var self = this;
111
+ smalltalk.send(self, "_initialize", [], smalltalk.Object);
112
+ smalltalk.send(self, "_create", []);
113
+ return self;
114
+ },
115
+ args: [],
116
+ source: "initialize\x0a\x09super initialize.\x0a\x09self create",
117
+ messageSends: ["initialize", "create"],
118
+ referencedClasses: []
119
+ }),
120
+ smalltalk.ObjectSpace);
121
+
122
+ smalltalk.addMethod(
123
+ "_isConnected",
124
+ smalltalk.method({
125
+ selector: "isConnected",
126
+ category: 'initialization',
127
+ fn: function () {
128
+ var self = this;
129
+ var $1;
130
+ $1 = smalltalk.send(smalltalk.send(self, "_frame", []), "_notNil", []);
131
+ return $1;
132
+ },
133
+ args: [],
134
+ source: "isConnected\x0a\x09^ self frame notNil",
135
+ messageSends: ["notNil", "frame"],
136
+ referencedClasses: []
137
+ }),
138
+ smalltalk.ObjectSpace);
139
+
140
+ smalltalk.addMethod(
141
+ "_release",
142
+ smalltalk.method({
143
+ selector: "release",
144
+ category: 'releasing',
145
+ fn: function () {
146
+ var self = this;
147
+ self['@frame'] = nil;
148
+ return self;
149
+ },
150
+ args: [],
151
+ source: "release\x0a\x09frame := nil",
152
+ messageSends: [],
153
+ referencedClasses: []
154
+ }),
155
+ smalltalk.ObjectSpace);
156
+
157
+ smalltalk.addMethod(
158
+ "_whenReadyDo_",
159
+ smalltalk.method({
160
+ selector: "whenReadyDo:",
161
+ category: 'events',
162
+ fn: function (aBlock) {
163
+ var self = this;
164
+ smalltalk.send(smalltalk.send(window, "_jQuery_", [self['@frame']]), "_bind_do_", ["load", aBlock]);
165
+ return self;
166
+ },
167
+ args: ["aBlock"],
168
+ source: "whenReadyDo: aBlock\x0a\x09(window jQuery: frame) \x0a\x09\x09bind: 'load'\x0a\x09\x09do: aBlock",
169
+ messageSends: ["bind:do:", "jQuery:"],
170
+ referencedClasses: []
171
+ }),
172
+ smalltalk.ObjectSpace);
173
+
174
+
175
+ smalltalk.addMethod(
176
+ "_on_",
177
+ smalltalk.method({
178
+ selector: "on:",
179
+ category: 'instance creation',
180
+ fn: function (aFrame) {
181
+ var self = this;
182
+ var $2, $3, $1;
183
+ $2 = smalltalk.send(self, "_basicNew", []);
184
+ smalltalk.send($2, "_connectTo_", [aFrame]);
185
+ $3 = smalltalk.send($2, "_yourself", []);
186
+ $1 = $3;
187
+ return $1;
188
+ },
189
+ args: ["aFrame"],
190
+ source: "on: aFrame\x0a\x09^ self basicNew\x0a\x09\x09connectTo: aFrame;\x0a\x09\x09yourself",
191
+ messageSends: ["connectTo:", "basicNew", "yourself"],
192
+ referencedClasses: []
193
+ }),
194
+ smalltalk.ObjectSpace.klass);
195
+
196
+
197
+ smalltalk.addClass('ObjectSpaceConnectionError', smalltalk.Error, [], 'Spaces');
198
+ smalltalk.addMethod(
199
+ "_messageText",
200
+ smalltalk.method({
201
+ selector: "messageText",
202
+ category: 'accessing',
203
+ fn: function () {
204
+ var self = this;
205
+ return "The ObjectSpace is not connected";
206
+ },
207
+ args: [],
208
+ source: "messageText\x0a\x09^ 'The ObjectSpace is not connected'",
209
+ messageSends: [],
210
+ referencedClasses: []
211
+ }),
212
+ smalltalk.ObjectSpaceConnectionError);
213
+
214
+
215
+
216
+ smalltalk.addClass('ObjectSpaceTest', smalltalk.TestCase, ['space'], 'Spaces');
217
+ smalltalk.addMethod(
218
+ "_setUp",
219
+ smalltalk.method({
220
+ selector: "setUp",
221
+ category: 'initialization',
222
+ fn: function () {
223
+ var self = this;
224
+ self['@space'] = smalltalk.send(smalltalk.ObjectSpace || ObjectSpace, "_new", []);
225
+ return self;
226
+ },
227
+ args: [],
228
+ source: "setUp\x0a\x09space := ObjectSpace new",
229
+ messageSends: ["new"],
230
+ referencedClasses: ["ObjectSpace"]
231
+ }),
232
+ smalltalk.ObjectSpaceTest);
233
+
234
+ smalltalk.addMethod(
235
+ "_tearDown",
236
+ smalltalk.method({
237
+ selector: "tearDown",
238
+ category: 'initialization',
239
+ fn: function () {
240
+ var self = this;
241
+ smalltalk.send(self['@space'], "_destroy", []);
242
+ return self;
243
+ },
244
+ args: [],
245
+ source: "tearDown\x0a\x09space destroy",
246
+ messageSends: ["destroy"],
247
+ referencedClasses: []
248
+ }),
249
+ smalltalk.ObjectSpaceTest);
250
+
251
+ smalltalk.addMethod(
252
+ "_testConnection",
253
+ smalltalk.method({
254
+ selector: "testConnection",
255
+ category: 'tests',
256
+ fn: function () {
257
+ var self = this;
258
+ smalltalk.send(self['@space'], "_destroy", []);
259
+ smalltalk.send(self, "_deny_", [smalltalk.send(self['@space'], "_isConnected", [])]);
260
+ smalltalk.send(self, "_should_raise_", [function () {return smalltalk.send(self['@space'], "_do_", [function () {}]);}, smalltalk.ObjectSpaceConnectionError || ObjectSpaceConnectionError]);
261
+ return self;
262
+ },
263
+ args: [],
264
+ source: "testConnection\x0a\x09space destroy.\x0a\x09self deny: space isConnected.\x0a\x09self should: [ space do: [] ] raise: ObjectSpaceConnectionError",
265
+ messageSends: ["destroy", "deny:", "isConnected", "should:raise:", "do:"],
266
+ referencedClasses: ["ObjectSpaceConnectionError"]
267
+ }),
268
+ smalltalk.ObjectSpaceTest);
269
+
270
+ smalltalk.addMethod(
271
+ "_testCreate",
272
+ smalltalk.method({
273
+ selector: "testCreate",
274
+ category: 'tests',
275
+ fn: function () {
276
+ var self = this;
277
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(self['@space'], "_frame", []), "_notNil", [])]);
278
+ smalltalk.send(self, "_assert_", [smalltalk.send(self['@space'], "_isConnected", [])]);
279
+ return self;
280
+ },
281
+ args: [],
282
+ source: "testCreate\x0a\x0a\x09self assert: space frame notNil.\x0a\x09self assert: space isConnected",
283
+ messageSends: ["assert:", "notNil", "frame", "isConnected"],
284
+ referencedClasses: []
285
+ }),
286
+ smalltalk.ObjectSpaceTest);
287
+
288
+ smalltalk.addMethod(
289
+ "_testEvaluation",
290
+ smalltalk.method({
291
+ selector: "testEvaluation",
292
+ category: 'tests',
293
+ fn: function () {
294
+ var self = this;
295
+ var result;
296
+ smalltalk.send(self['@space'], "_whenReadyDo_", [function () {result = smalltalk.send(self['@space'], "_do_", [function () {return smalltalk;}]);result;smalltalk.send(self, "_assert_equals_", [smalltalk.send(smalltalk.send(result, "_class", []), "_name", []), "Smalltalk"]);smalltalk.send(self, "_deny_", [smalltalk.send(smalltalk.send(result, "_class", []), "__eq", [smalltalk.Smalltalk || Smalltalk])]);return smalltalk.send(self, "_deny_", [smalltalk.send(result, "__eq_eq", [smalltalk])]);}]);
297
+ return self;
298
+ },
299
+ args: [],
300
+ source: "testEvaluation\x0a\x09| result |\x0a\x0a\x09space whenReadyDo: [\x0a\x09\x09result := space do: [ smalltalk ].\x0a\x0a\x09\x09self assert: result class name equals: 'Smalltalk'.\x0a\x09\x09self deny: result class = Smalltalk.\x0a\x09\x09self deny: result == smalltalk ]",
301
+ messageSends: ["whenReadyDo:", "do:", "assert:equals:", "name", "class", "deny:", "=", "=="],
302
+ referencedClasses: ["Smalltalk"]
303
+ }),
304
+ smalltalk.ObjectSpaceTest);
305
+
306
+ smalltalk.addMethod(
307
+ "_testRelease",
308
+ smalltalk.method({
309
+ selector: "testRelease",
310
+ category: 'tests',
311
+ fn: function () {
312
+ var self = this;
313
+ smalltalk.send(self, "_deny_", [smalltalk.send(smalltalk.send(self['@space'], "_frame", []), "_isNil", [])]);
314
+ smalltalk.send(self['@space'], "_release", []);
315
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(self['@space'], "_frame", []), "_isNil", [])]);
316
+ return self;
317
+ },
318
+ args: [],
319
+ source: "testRelease\x0a\x0a\x09self deny: space frame isNil.\x0a\x0a\x09space release.\x0a\x09\x0a\x09self assert: space frame isNil",
320
+ messageSends: ["deny:", "isNil", "frame", "release", "assert:"],
321
+ referencedClasses: []
322
+ }),
323
+ smalltalk.ObjectSpaceTest);
324
+
325
+
326
+