2
0

TrySmalltalk.js 71 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118
  1. smalltalk.addClass('TrySmalltalkWidget', smalltalk.Widget, ['workspace', 'contents', 'header'], 'TrySmalltalk');
  2. smalltalk.addMethod(
  3. '_renderOn_',
  4. smalltalk.method({
  5. selector: 'renderOn:',
  6. category: 'rendering',
  7. fn: function (html){
  8. var self=this;
  9. (function($rec){smalltalk.send($rec, "_class_", ["profStef"]);smalltalk.send($rec, "_with_", [(function(){return self['@header']=smalltalk.send(html, "_h2", []);})]);smalltalk.send($rec, "_with_", [(function(){return smalltalk.send(smalltalk.send(self, "_workspace", []), "_renderOn_", [html]);})]);return smalltalk.send($rec, "_with_", [(function(){return smalltalk.send(self, "_renderButtonsOn_", [html]);})]);})(smalltalk.send(html, "_div", []));
  10. (function($rec){smalltalk.send($rec, "_widget_", [self]);return smalltalk.send($rec, "_showCurrentLesson", []);})(smalltalk.send((smalltalk.ProfStef || ProfStef), "_default", []));
  11. return self;},
  12. source: unescape('renderOn%3A%20html%0A%09html%20div%20%0A%09%09class%3A%20%27profStef%27%3B%20%0A%09%09with%3A%20%5Bheader%20%3A%3D%20html%20h2%5D%3B%0A%09%09with%3A%20%5Bself%20workspace%20renderOn%3A%20html%5D%3B%0A%09%09with%3A%20%5Bself%20renderButtonsOn%3A%20html%5D.%0A%20%20%20%20%20%20%20%20%20%20ProfStef%20default%20%0A%09%09widget%3A%20self%3B%0A%09%09showCurrentLesson'),
  13. messageSends: ["class:", "with:", "h2", "renderOn:", "workspace", "renderButtonsOn:", "div", "widget:", "showCurrentLesson", "default"],
  14. referencedClasses: [smalltalk.nil]
  15. }),
  16. smalltalk.TrySmalltalkWidget);
  17. smalltalk.addMethod(
  18. '_workspace',
  19. smalltalk.method({
  20. selector: 'workspace',
  21. category: 'accessing',
  22. fn: function (){
  23. var self=this;
  24. return (($receiver = self['@workspace']) == nil || $receiver == undefined) ? (function(){return self['@workspace']=smalltalk.send((smalltalk.SourceArea || SourceArea), "_new", []);})() : $receiver;
  25. return self;},
  26. source: unescape('workspace%0A%09%5E%20workspace%20ifNil%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%09workspace%20%3A%3D%20SourceArea%20new%5D'),
  27. messageSends: ["ifNil:", "new"],
  28. referencedClasses: [smalltalk.SourceArea]
  29. }),
  30. smalltalk.TrySmalltalkWidget);
  31. smalltalk.addMethod(
  32. '_contents_',
  33. smalltalk.method({
  34. selector: 'contents:',
  35. category: 'accessing',
  36. fn: function (aString){
  37. var self=this;
  38. smalltalk.send(smalltalk.send(self, "_workspace", []), "_val_", [aString]);
  39. return self;},
  40. source: unescape('contents%3A%20aString%0A%09self%20workspace%20val%3A%20aString'),
  41. messageSends: ["val:", "workspace"],
  42. referencedClasses: []
  43. }),
  44. smalltalk.TrySmalltalkWidget);
  45. smalltalk.addMethod(
  46. '_contents',
  47. smalltalk.method({
  48. selector: 'contents',
  49. category: 'accessing',
  50. fn: function (){
  51. var self=this;
  52. return smalltalk.send(smalltalk.send(self, "_workspace", []), "_val", []);
  53. return self;},
  54. source: unescape('contents%0A%09%5Eself%20workspace%20val'),
  55. messageSends: ["val", "workspace"],
  56. referencedClasses: []
  57. }),
  58. smalltalk.TrySmalltalkWidget);
  59. smalltalk.addMethod(
  60. '_renderButtonsOn_',
  61. smalltalk.method({
  62. selector: 'renderButtonsOn:',
  63. category: 'rendering',
  64. fn: function (html){
  65. var self=this;
  66. (function($rec){smalltalk.send($rec, "_with_", ["DoIt"]);smalltalk.send($rec, "_title_", [unescape("ctrl+d")]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(smalltalk.send(self, "_workspace", []), "_doIt", []);})]);})(smalltalk.send(html, "_button", []));
  67. (function($rec){smalltalk.send($rec, "_with_", ["PrintIt"]);smalltalk.send($rec, "_title_", [unescape("ctrl+p")]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(smalltalk.send(self, "_workspace", []), "_printIt", []);})]);})(smalltalk.send(html, "_button", []));
  68. (function($rec){smalltalk.send($rec, "_with_", ["InspectIt"]);smalltalk.send($rec, "_title_", [unescape("ctrl+i")]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(smalltalk.send(self, "_workspace", []), "_inspectIt", []);})]);})(smalltalk.send(html, "_button", []));
  69. return self;},
  70. source: unescape('renderButtonsOn%3A%20html%0A%20%20%20%20html%20button%0A%09with%3A%20%27DoIt%27%3B%0A%09title%3A%20%27ctrl+d%27%3B%0A%09onClick%3A%20%5Bself%20workspace%20doIt%5D.%0A%20%20%20%20html%20button%0A%09with%3A%20%27PrintIt%27%3B%0A%09title%3A%20%27ctrl+p%27%3B%0A%09onClick%3A%20%5Bself%20workspace%20printIt%5D.%0A%20%20%20%20html%20button%0A%09with%3A%20%27InspectIt%27%3B%0A%09title%3A%20%27ctrl+i%27%3B%0A%09onClick%3A%20%5Bself%20workspace%20inspectIt%5D'),
  71. messageSends: ["with:", "title:", "onClick:", "doIt", "workspace", "button", "printIt", "inspectIt"],
  72. referencedClasses: []
  73. }),
  74. smalltalk.TrySmalltalkWidget);
  75. smalltalk.addMethod(
  76. '_setTitle_',
  77. smalltalk.method({
  78. selector: 'setTitle:',
  79. category: 'accessing',
  80. fn: function (aString){
  81. var self=this;
  82. smalltalk.send(self['@header'], "_contents_", [(function(html){return smalltalk.send(html, "_with_", [aString]);})]);
  83. return self;},
  84. source: unescape('setTitle%3A%20aString%0A%09header%20contents%3A%20%5B%3Ahtml%20%7C%20html%20with%3A%20aString%5D'),
  85. messageSends: ["contents:", "with:"],
  86. referencedClasses: []
  87. }),
  88. smalltalk.TrySmalltalkWidget);
  89. smalltalk.addClass('AbstractTutorial', smalltalk.Object, [], 'TrySmalltalk');
  90. smalltalk.AbstractTutorial.comment=unescape('Parent%20class%20of%20all%20ProfStef%20tutorials.%0A%0ATo%20create%20your%20own%20tutorial%3A%0A-%20subclass%20AbstractTutorial%0A-%20implement%20a%20few%20methods%20which%20returns%20a%20Lesson%20instance%0A-%20implement%20tutorial%20which%20returns%20a%20Collection%20of%20selectors%20to%20the%20methods%20you%27ve%20created.')
  91. smalltalk.addMethod(
  92. '_indexOfLesson_',
  93. smalltalk.method({
  94. selector: 'indexOfLesson:',
  95. category: 'accessing',
  96. fn: function (aSelector){
  97. var self=this;
  98. return smalltalk.send(smalltalk.send(self, "_tableOfContents", []), "_indexOf_", [aSelector]);
  99. return self;},
  100. source: unescape('indexOfLesson%3A%20aSelector%0A%09%5Eself%20tableOfContents%20indexOf%3A%20aSelector.'),
  101. messageSends: ["indexOf:", "tableOfContents"],
  102. referencedClasses: []
  103. }),
  104. smalltalk.AbstractTutorial);
  105. smalltalk.addMethod(
  106. '_tableOfContents',
  107. smalltalk.method({
  108. selector: 'tableOfContents',
  109. category: 'accessing',
  110. fn: function (){
  111. var self=this;
  112. return ["welcome", "testLesson", "theEnd"];
  113. return self;},
  114. source: unescape('tableOfContents%0A%5E%20%23%28%0A%20%20%27welcome%27%0A%20%20%27testLesson%27%0A%20%20%27theEnd%27%0A%29'),
  115. messageSends: [],
  116. referencedClasses: []
  117. }),
  118. smalltalk.AbstractTutorial);
  119. smalltalk.addMethod(
  120. '_welcome',
  121. smalltalk.method({
  122. selector: 'welcome',
  123. category: 'pages',
  124. fn: function (){
  125. var self=this;
  126. return smalltalk.send((smalltalk.Lesson || Lesson), "_title_contents_", ["Welcome", unescape("%22Hi%2C%20this%20is%20a%20test%20tutorial.%22")]);
  127. return self;},
  128. source: unescape('welcome%0A%09%5E%20Lesson%0A%09%09title%3A%20%27Welcome%27%20%0A%09%09contents%3A%20%27%22Hi%2C%20this%20is%20a%20test%20tutorial.%22%27'),
  129. messageSends: ["title:contents:"],
  130. referencedClasses: []
  131. }),
  132. smalltalk.AbstractTutorial);
  133. smalltalk.addMethod(
  134. '_testLesson',
  135. smalltalk.method({
  136. selector: 'testLesson',
  137. category: 'pages',
  138. fn: function (){
  139. var self=this;
  140. return smalltalk.send((smalltalk.Lesson || Lesson), "_title_contents_", ["Test Lesson", unescape("%22This%20lesson%20is%20a%20test%22")]);
  141. return self;},
  142. source: unescape('testLesson%0A%09%5E%20Lesson%0A%09%09title%3A%20%27Test%20Lesson%27%20%0A%09%09contents%3A%20%27%22This%20lesson%20is%20a%20test%22%27'),
  143. messageSends: ["title:contents:"],
  144. referencedClasses: []
  145. }),
  146. smalltalk.AbstractTutorial);
  147. smalltalk.addMethod(
  148. '_theEnd',
  149. smalltalk.method({
  150. selector: 'theEnd',
  151. category: 'pages',
  152. fn: function (){
  153. var self=this;
  154. return smalltalk.send((smalltalk.Lesson || Lesson), "_title_contents_", ["The End", unescape("%22And%20that%27d%20be%20pretty%20much%20it%20%3A%29%22")]);
  155. return self;},
  156. source: unescape('theEnd%0A%09%5E%20Lesson%0A%09%09title%3A%20%27The%20End%27%20%0A%09%09contents%3A%20%27%22And%20that%27%27d%20be%20pretty%20much%20it%20%3A%29%22%27'),
  157. messageSends: ["title:contents:"],
  158. referencedClasses: []
  159. }),
  160. smalltalk.AbstractTutorial);
  161. smalltalk.addMethod(
  162. '_lessonAt_',
  163. smalltalk.method({
  164. selector: 'lessonAt:',
  165. category: 'accessing',
  166. fn: function (anInteger){
  167. var self=this;
  168. var lessonSelector=nil;
  169. lessonSelector=smalltalk.send(smalltalk.send(self, "_tableOfContents", []), "_at_", [anInteger]);
  170. return smalltalk.send(self, "_perform_", [lessonSelector]);
  171. return self;},
  172. source: unescape('lessonAt%3A%20anInteger%0A%09%7C%20lessonSelector%20%7C%0A%09lessonSelector%20%3A%3D%20self%20tableOfContents%20at%3A%20anInteger.%0A%09%5E%20self%20perform%3A%20lessonSelector.'),
  173. messageSends: ["at:", "tableOfContents", "perform:"],
  174. referencedClasses: []
  175. }),
  176. smalltalk.AbstractTutorial);
  177. smalltalk.addMethod(
  178. '_size',
  179. smalltalk.method({
  180. selector: 'size',
  181. category: 'accessing',
  182. fn: function (){
  183. var self=this;
  184. return smalltalk.send(smalltalk.send(self, "_tableOfContents", []), "_size", []);
  185. return self;},
  186. source: unescape('size%0A%09%5E%20self%20tableOfContents%20size'),
  187. messageSends: ["size", "tableOfContents"],
  188. referencedClasses: []
  189. }),
  190. smalltalk.AbstractTutorial);
  191. smalltalk.addClass('Lesson', smalltalk.Object, ['title', 'contents'], 'TrySmalltalk');
  192. smalltalk.addMethod(
  193. '_contents',
  194. smalltalk.method({
  195. selector: 'contents',
  196. category: 'accessing',
  197. fn: function (){
  198. var self=this;
  199. return (($receiver = self['@contents']) == nil || $receiver == undefined) ? (function(){return self['@contents']="";})() : $receiver;
  200. return self;},
  201. source: unescape('contents%0A%09%5E%20contents%20ifNil%3A%20%5Bcontents%20%3A%3D%20%27%27%5D'),
  202. messageSends: ["ifNil:"],
  203. referencedClasses: []
  204. }),
  205. smalltalk.Lesson);
  206. smalltalk.addMethod(
  207. '_contents_',
  208. smalltalk.method({
  209. selector: 'contents:',
  210. category: 'accessing',
  211. fn: function (aString){
  212. var self=this;
  213. self['@contents']=aString;
  214. return self;},
  215. source: unescape('contents%3A%20aString%0A%09contents%20%3A%3D%20aString'),
  216. messageSends: [],
  217. referencedClasses: []
  218. }),
  219. smalltalk.Lesson);
  220. smalltalk.addMethod(
  221. '_title_',
  222. smalltalk.method({
  223. selector: 'title:',
  224. category: 'accessing',
  225. fn: function (aString){
  226. var self=this;
  227. self['@title']=aString;
  228. return self;},
  229. source: unescape('title%3A%20aString%0A%09title%20%3A%3D%20aString'),
  230. messageSends: [],
  231. referencedClasses: []
  232. }),
  233. smalltalk.Lesson);
  234. smalltalk.addMethod(
  235. '_title',
  236. smalltalk.method({
  237. selector: 'title',
  238. category: 'accessing',
  239. fn: function (){
  240. var self=this;
  241. return (($receiver = self['@title']) == nil || $receiver == undefined) ? (function(){return self['@title']="";})() : $receiver;
  242. return self;},
  243. source: unescape('title%0A%09%5E%20title%20ifNil%3A%20%5Btitle%20%3A%3D%20%27%27%5D'),
  244. messageSends: ["ifNil:"],
  245. referencedClasses: []
  246. }),
  247. smalltalk.Lesson);
  248. smalltalk.addMethod(
  249. '_title_contents_',
  250. smalltalk.method({
  251. selector: 'title:contents:',
  252. category: 'instance creation',
  253. fn: function (aTitle, someContents){
  254. var self=this;
  255. return (function($rec){smalltalk.send($rec, "_title_", [aTitle]);return smalltalk.send($rec, "_contents_", [someContents]);})(smalltalk.send(self, "_new", []));
  256. return self;},
  257. source: unescape('title%3A%20aTitle%20contents%3A%20someContents%0A%09%5E%20%28self%20new%29%0A%09%09title%3A%20aTitle%3B%0A%09%09contents%3A%20someContents'),
  258. messageSends: ["title:", "contents:", "new"],
  259. referencedClasses: []
  260. }),
  261. smalltalk.Lesson.klass);
  262. smalltalk.addClass('TutorialPlayer', smalltalk.Object, ['tutorialPosition', 'tutorial'], 'TrySmalltalk');
  263. smalltalk.TutorialPlayer.comment=unescape('I%20can%20navigate%20through%20an%20AbstractTutorial%20subclass.%20With%20%23next%20and%20%23previous%20you%20can%20go%20forward%20and%20backward%20through%20the%20tutorial.%20')
  264. smalltalk.addMethod(
  265. '_currentLesson',
  266. smalltalk.method({
  267. selector: 'currentLesson',
  268. category: 'accessing',
  269. fn: function (){
  270. var self=this;
  271. return smalltalk.send(smalltalk.send(self, "_tutorial", []), "_lessonAt_", [smalltalk.send(self, "_tutorialPosition", [])]);
  272. return self;},
  273. source: unescape('currentLesson%0A%09%5E%20self%20tutorial%20lessonAt%3A%20self%20tutorialPosition.'),
  274. messageSends: ["lessonAt:", "tutorial", "tutorialPosition"],
  275. referencedClasses: []
  276. }),
  277. smalltalk.TutorialPlayer);
  278. smalltalk.addMethod(
  279. '_first',
  280. smalltalk.method({
  281. selector: 'first',
  282. category: 'navigation',
  283. fn: function (){
  284. var self=this;
  285. smalltalk.send(self, "_rewind", []);
  286. return smalltalk.send(self, "_currentLesson", []);
  287. return self;},
  288. source: unescape('first%0A%09self%20rewind.%0A%09%5E%20self%20currentLesson'),
  289. messageSends: ["rewind", "currentLesson"],
  290. referencedClasses: []
  291. }),
  292. smalltalk.TutorialPlayer);
  293. smalltalk.addMethod(
  294. '_last',
  295. smalltalk.method({
  296. selector: 'last',
  297. category: 'navigation',
  298. fn: function (){
  299. var self=this;
  300. self['@tutorialPosition']=smalltalk.send(self, "_size", []);
  301. return smalltalk.send(self, "_currentLesson", []);
  302. return self;},
  303. source: unescape('last%0A%09tutorialPosition%20%3A%3D%20self%20size.%0A%09%5E%20self%20currentLesson'),
  304. messageSends: ["size", "currentLesson"],
  305. referencedClasses: []
  306. }),
  307. smalltalk.TutorialPlayer);
  308. smalltalk.addMethod(
  309. '_next',
  310. smalltalk.method({
  311. selector: 'next',
  312. category: 'navigation',
  313. fn: function (){
  314. var self=this;
  315. (($receiver = (($receiver = smalltalk.send(self, "_tutorialPosition", [])).klass === smalltalk.Number) ? $receiver <smalltalk.send(self, "_size", []) : smalltalk.send($receiver, "__lt", [smalltalk.send(self, "_size", [])])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return self['@tutorialPosition']=(($receiver = self['@tutorialPosition']).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return self['@tutorialPosition']=(($receiver = self['@tutorialPosition']).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]);})]);
  316. return smalltalk.send(self, "_currentLesson", []);
  317. return self;},
  318. source: unescape('next%0A%09self%20tutorialPosition%20%3C%20self%20size%0A%09%09ifTrue%3A%20%5BtutorialPosition%20%3A%3D%20tutorialPosition%20+%201%5D.%0A%09%5E%20self%20currentLesson'),
  319. messageSends: ["ifTrue:", unescape("%3C"), "tutorialPosition", "size", unescape("+"), "currentLesson"],
  320. referencedClasses: []
  321. }),
  322. smalltalk.TutorialPlayer);
  323. smalltalk.addMethod(
  324. '_previous',
  325. smalltalk.method({
  326. selector: 'previous',
  327. category: 'navigation',
  328. fn: function (){
  329. var self=this;
  330. (($receiver = (($receiver = self['@tutorialPosition']).klass === smalltalk.Number) ? $receiver >(1) : smalltalk.send($receiver, "__gt", [(1)])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return self['@tutorialPosition']=(($receiver = self['@tutorialPosition']).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return self['@tutorialPosition']=(($receiver = self['@tutorialPosition']).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)]);})]);
  331. return smalltalk.send(self, "_currentLesson", []);
  332. return self;},
  333. source: unescape('previous%0A%09tutorialPosition%20%3E%20%201%20ifTrue%3A%20%5BtutorialPosition%20%3A%3D%20tutorialPosition%20%20-%201%5D.%0A%09%5E%20self%20currentLesson'),
  334. messageSends: ["ifTrue:", unescape("%3E"), unescape("-"), "currentLesson"],
  335. referencedClasses: []
  336. }),
  337. smalltalk.TutorialPlayer);
  338. smalltalk.addMethod(
  339. '_rewind',
  340. smalltalk.method({
  341. selector: 'rewind',
  342. category: 'navigation',
  343. fn: function (){
  344. var self=this;
  345. self['@tutorialPosition']=(1);
  346. return self;},
  347. source: unescape('rewind%0A%09tutorialPosition%20%3A%3D%201.'),
  348. messageSends: [],
  349. referencedClasses: []
  350. }),
  351. smalltalk.TutorialPlayer);
  352. smalltalk.addMethod(
  353. '_size',
  354. smalltalk.method({
  355. selector: 'size',
  356. category: 'accessing',
  357. fn: function (){
  358. var self=this;
  359. return smalltalk.send(smalltalk.send(self, "_tutorial", []), "_size", []);
  360. return self;},
  361. source: unescape('size%0A%09%5E%20self%20tutorial%20size'),
  362. messageSends: ["size", "tutorial"],
  363. referencedClasses: []
  364. }),
  365. smalltalk.TutorialPlayer);
  366. smalltalk.addMethod(
  367. '_tutorial',
  368. smalltalk.method({
  369. selector: 'tutorial',
  370. category: 'accessing',
  371. fn: function (){
  372. var self=this;
  373. return (($receiver = self['@tutorial']) == nil || $receiver == undefined) ? (function(){return self['@tutorial']=smalltalk.send((smalltalk.SmalltalkSyntaxTutorial || SmalltalkSyntaxTutorial), "_new", []);})() : $receiver;
  374. return self;},
  375. source: unescape('tutorial%0A%09%5E%20tutorial%20%20ifNil%3A%20%5Btutorial%20%3A%3D%20SmalltalkSyntaxTutorial%20new%5D'),
  376. messageSends: ["ifNil:", "new"],
  377. referencedClasses: []
  378. }),
  379. smalltalk.TutorialPlayer);
  380. smalltalk.addMethod(
  381. '_tutorial_',
  382. smalltalk.method({
  383. selector: 'tutorial:',
  384. category: 'accessing',
  385. fn: function (aTutorial){
  386. var self=this;
  387. self['@tutorial']=aTutorial;
  388. return self;},
  389. source: unescape('tutorial%3A%20aTutorial%0A%09tutorial%20%3A%3D%20aTutorial'),
  390. messageSends: [],
  391. referencedClasses: []
  392. }),
  393. smalltalk.TutorialPlayer);
  394. smalltalk.addMethod(
  395. '_tutorialPosition',
  396. smalltalk.method({
  397. selector: 'tutorialPosition',
  398. category: 'accessing',
  399. fn: function (){
  400. var self=this;
  401. return (($receiver = self['@tutorialPosition']) == nil || $receiver == undefined) ? (function(){smalltalk.send(self, "_rewind", []);return self['@tutorialPosition'];})() : $receiver;
  402. return self;},
  403. source: unescape('tutorialPosition%20%0A%09%5E%20tutorialPosition%20%20ifNil%3A%20%5B%0A%09%09self%20rewind.%0A%09%09tutorialPosition.%0A%09%5D.'),
  404. messageSends: ["ifNil:", "rewind"],
  405. referencedClasses: []
  406. }),
  407. smalltalk.TutorialPlayer);
  408. smalltalk.addMethod(
  409. '_tutorialPosition_',
  410. smalltalk.method({
  411. selector: 'tutorialPosition:',
  412. category: 'accessing',
  413. fn: function (aTutorialPosition){
  414. var self=this;
  415. self['@tutorialPosition']=aTutorialPosition;
  416. return self;},
  417. source: unescape('tutorialPosition%3A%20aTutorialPosition%20%0A%09tutorialPosition%20%3A%3D%20aTutorialPosition'),
  418. messageSends: [],
  419. referencedClasses: []
  420. }),
  421. smalltalk.TutorialPlayer);
  422. smalltalk.addClass('ProfStef', smalltalk.Object, ['tutorialPlayer', 'widget'], 'TrySmalltalk');
  423. smalltalk.ProfStef.comment=unescape('A%20ProfStef%20is%20the%20Smalltalk%20teacher.%20To%20start%20the%20tutorial%2C%20evaluate%3A%0AProfStef%20go.%0A%0ATo%20go%20to%20the%20next%20lesson%20evaluate%3A%0AProfStef%20next.%0A%0ATo%20execute%20your%20own%20tutorial%3A%0AProfStef%20goOn%3A%20MyOwnTutorial%0A%0ATo%20see%20a%20table%20of%20contents%20with%20all%20defined%20tutorials%3A%0AProfStef%20contents%20')
  424. smalltalk.addMethod(
  425. '_tutorialPlayer',
  426. smalltalk.method({
  427. selector: 'tutorialPlayer',
  428. category: 'accessing',
  429. fn: function (){
  430. var self=this;
  431. return (($receiver = self['@tutorialPlayer']) == nil || $receiver == undefined) ? (function(){return self['@tutorialPlayer']=smalltalk.send((smalltalk.TutorialPlayer || TutorialPlayer), "_new", []);})() : $receiver;
  432. return self;},
  433. source: unescape('tutorialPlayer%0A%09%5E%20tutorialPlayer%20ifNil%3A%20%5BtutorialPlayer%20%3A%3D%20TutorialPlayer%20new%5D'),
  434. messageSends: ["ifNil:", "new"],
  435. referencedClasses: [smalltalk.TutorialPlayer]
  436. }),
  437. smalltalk.ProfStef);
  438. smalltalk.addMethod(
  439. '_first',
  440. smalltalk.method({
  441. selector: 'first',
  442. category: 'navigation',
  443. fn: function (){
  444. var self=this;
  445. smalltalk.send(smalltalk.send(self, "_tutorialPlayer", []), "_first", []);
  446. return smalltalk.send(self, "_showCurrentLesson", []);
  447. return self;},
  448. source: unescape('first%0A%09self%20tutorialPlayer%20first.%0A%09%5E%20self%20showCurrentLesson.'),
  449. messageSends: ["first", "tutorialPlayer", "showCurrentLesson"],
  450. referencedClasses: []
  451. }),
  452. smalltalk.ProfStef);
  453. smalltalk.addMethod(
  454. '_progress',
  455. smalltalk.method({
  456. selector: 'progress',
  457. category: 'accessing',
  458. fn: function (){
  459. var self=this;
  460. return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(unescape("%28"), "__comma", [smalltalk.send(self, "_tutorialPositionString", [])]), "__comma", [unescape("/")]), "__comma", [smalltalk.send(self, "_tutorialSizeString", [])]), "__comma", [unescape("%29")]);
  461. return self;},
  462. source: unescape('progress%0A%09%5E%20%27%28%27%2C%20self%20tutorialPositionString%2C%20%27/%27%2C%20self%20tutorialSizeString%2C%20%27%29%27.'),
  463. messageSends: [unescape("%2C"), "tutorialPositionString", "tutorialSizeString"],
  464. referencedClasses: []
  465. }),
  466. smalltalk.ProfStef);
  467. smalltalk.addMethod(
  468. '_tutorialPositionString',
  469. smalltalk.method({
  470. selector: 'tutorialPositionString',
  471. category: 'accessing',
  472. fn: function (){
  473. var self=this;
  474. return smalltalk.send(smalltalk.send(smalltalk.send(self, "_tutorialPlayer", []), "_tutorialPosition", []), "_asString", []);
  475. return self;},
  476. source: unescape('tutorialPositionString%0A%09%5E%20self%20tutorialPlayer%20tutorialPosition%20asString.'),
  477. messageSends: ["asString", "tutorialPosition", "tutorialPlayer"],
  478. referencedClasses: []
  479. }),
  480. smalltalk.ProfStef);
  481. smalltalk.addMethod(
  482. '_tutorialSizeString',
  483. smalltalk.method({
  484. selector: 'tutorialSizeString',
  485. category: 'accessing',
  486. fn: function (){
  487. var self=this;
  488. return smalltalk.send(smalltalk.send(smalltalk.send(self, "_tutorialPlayer", []), "_size", []), "_asString", []);
  489. return self;},
  490. source: unescape('tutorialSizeString%0A%09%5E%20self%20tutorialPlayer%20size%20asString'),
  491. messageSends: ["asString", "size", "tutorialPlayer"],
  492. referencedClasses: []
  493. }),
  494. smalltalk.ProfStef);
  495. smalltalk.addMethod(
  496. '_next',
  497. smalltalk.method({
  498. selector: 'next',
  499. category: 'navigation',
  500. fn: function (){
  501. var self=this;
  502. smalltalk.send(smalltalk.send(self, "_tutorialPlayer", []), "_next", []);
  503. return smalltalk.send(self, "_showCurrentLesson", []);
  504. return self;},
  505. source: unescape('next%0A%09self%20tutorialPlayer%20next.%0A%09%5E%20self%20showCurrentLesson.'),
  506. messageSends: ["next", "tutorialPlayer", "showCurrentLesson"],
  507. referencedClasses: []
  508. }),
  509. smalltalk.ProfStef);
  510. smalltalk.addMethod(
  511. '_previous',
  512. smalltalk.method({
  513. selector: 'previous',
  514. category: 'navigation',
  515. fn: function (){
  516. var self=this;
  517. smalltalk.send(smalltalk.send(self, "_tutorialPlayer", []), "_previous", []);
  518. return smalltalk.send(self, "_showCurrentLesson", []);
  519. return self;},
  520. source: unescape('previous%0A%09self%20tutorialPlayer%20previous.%0A%09%5E%20self%20showCurrentLesson.'),
  521. messageSends: ["previous", "tutorialPlayer", "showCurrentLesson"],
  522. referencedClasses: []
  523. }),
  524. smalltalk.ProfStef);
  525. smalltalk.addMethod(
  526. '_widget_',
  527. smalltalk.method({
  528. selector: 'widget:',
  529. category: 'accessing',
  530. fn: function (aWidget){
  531. var self=this;
  532. self['@widget']=aWidget;
  533. return self;},
  534. source: unescape('widget%3A%20aWidget%0A%09widget%20%3A%3D%20aWidget'),
  535. messageSends: [],
  536. referencedClasses: []
  537. }),
  538. smalltalk.ProfStef);
  539. smalltalk.addMethod(
  540. '_showCurrentLesson',
  541. smalltalk.method({
  542. selector: 'showCurrentLesson',
  543. category: 'accessing',
  544. fn: function (){
  545. var self=this;
  546. var lesson=nil;
  547. lesson=smalltalk.send(smalltalk.send(self, "_tutorialPlayer", []), "_currentLesson", []);
  548. smalltalk.send(self['@widget'], "_contents_", [smalltalk.send(lesson, "_contents", [])]);
  549. smalltalk.send(self['@widget'], "_setTitle_", [smalltalk.send(smalltalk.send(smalltalk.send(lesson, "_title", []), "__comma", [" "]), "__comma", [smalltalk.send(self, "_progress", [])])]);
  550. return self;},
  551. source: unescape('showCurrentLesson%0A%09%7C%20lesson%20%7C%0A%09lesson%20%3A%3D%20self%20tutorialPlayer%20currentLesson.%0A%09widget%20contents%3A%20lesson%20contents.%0A%09widget%20setTitle%3A%20lesson%20title%20%2C%20%27%20%27%20%2C%20self%20progress.'),
  552. messageSends: ["currentLesson", "tutorialPlayer", "contents:", "contents", "setTitle:", unescape("%2C"), "title", "progress"],
  553. referencedClasses: []
  554. }),
  555. smalltalk.ProfStef);
  556. smalltalk.ProfStef.klass.iVarNames = ['instance'];
  557. smalltalk.addMethod(
  558. '_first',
  559. smalltalk.method({
  560. selector: 'first',
  561. category: 'navigation',
  562. fn: function (){
  563. var self=this;
  564. return smalltalk.send(smalltalk.send(self, "_default", []), "_first", []);
  565. return self;},
  566. source: unescape('first%0A%09%5E%20self%20default%20first.'),
  567. messageSends: ["first", "default"],
  568. referencedClasses: []
  569. }),
  570. smalltalk.ProfStef.klass);
  571. smalltalk.addMethod(
  572. '_default',
  573. smalltalk.method({
  574. selector: 'default',
  575. category: 'initialize',
  576. fn: function (){
  577. var self=this;
  578. return (($receiver = self['@instance']) == nil || $receiver == undefined) ? (function(){return self['@instance']=smalltalk.send(self, "_new", []);})() : $receiver;
  579. return self;},
  580. source: unescape('default%20%0A%09%5E%20instance%20ifNil%3A%20%5Binstance%20%3A%3D%20self%20new%5D'),
  581. messageSends: ["ifNil:", "new"],
  582. referencedClasses: []
  583. }),
  584. smalltalk.ProfStef.klass);
  585. smalltalk.addMethod(
  586. '_previous',
  587. smalltalk.method({
  588. selector: 'previous',
  589. category: 'navigation',
  590. fn: function (){
  591. var self=this;
  592. return smalltalk.send(smalltalk.send(self, "_default", []), "_previous", []);
  593. return self;},
  594. source: unescape('previous%0A%09%5E%20self%20default%20previous.'),
  595. messageSends: ["previous", "default"],
  596. referencedClasses: []
  597. }),
  598. smalltalk.ProfStef.klass);
  599. smalltalk.addMethod(
  600. '_next',
  601. smalltalk.method({
  602. selector: 'next',
  603. category: 'navigation',
  604. fn: function (){
  605. var self=this;
  606. return smalltalk.send(smalltalk.send(self, "_default", []), "_next", []);
  607. return self;},
  608. source: unescape('next%0A%09%5E%20self%20default%20next.'),
  609. messageSends: ["next", "default"],
  610. referencedClasses: []
  611. }),
  612. smalltalk.ProfStef.klass);
  613. smalltalk.addMethod(
  614. '_go',
  615. smalltalk.method({
  616. selector: 'go',
  617. category: 'navigation',
  618. fn: function (){
  619. var self=this;
  620. smalltalk.send(self, "_first", []);
  621. return self;},
  622. source: unescape('go%0A%09self%20first.'),
  623. messageSends: ["first"],
  624. referencedClasses: []
  625. }),
  626. smalltalk.ProfStef.klass);
  627. smalltalk.addClass('SmalltalkSyntaxTutorial', smalltalk.AbstractTutorial, [], 'TrySmalltalk');
  628. smalltalk.SmalltalkSyntaxTutorial.comment=unescape('The%20default%20ProfStef%20tutorial%20to%20learn%20Smalltalk%20syntax')
  629. smalltalk.addMethod(
  630. '_tableOfContents',
  631. smalltalk.method({
  632. selector: 'tableOfContents',
  633. category: 'contents',
  634. fn: function (){
  635. var self=this;
  636. return ["welcome", "doingVSPrinting", "printing", "basicTypesNumbers", "basicTypesString", "basicTypesArray", "basicTypesDynamicArray", "messageSyntaxUnary", "messageSyntaxBinary", "messageSyntaxKeyword", "messageSyntaxExecutionOrder", "messageSyntaxExecutionOrderParentheses", "mathematicalPrecedence", "messageSyntaxCascade", "messageSyntaxCascadeShouldNotBeHere", "blocks", "blocksAssignation", "conditionals", "loops", "iterators", "instanciation", "reflection", "reflectionContinued", "theEnd"];
  637. return self;},
  638. source: unescape('tableOfContents%0A%5E%20%23%28%09%27welcome%27%0A%09%27doingVSPrinting%27%0A%09%27printing%27%0A%0A%09%27basicTypesNumbers%27%0A%09%22%27basicTypesCharacters%27%22%0A%09%27basicTypesString%27%0A%09%22%27basicTypesSymbol%27%22%0A%09%27basicTypesArray%27%0A%09%27basicTypesDynamicArray%27%0A%0A%09%27messageSyntaxUnary%27%0A%09%27messageSyntaxBinary%27%0A%09%27messageSyntaxKeyword%27%0A%09%27messageSyntaxExecutionOrder%27%0A%09%27messageSyntaxExecutionOrderParentheses%27%0A%09%27mathematicalPrecedence%27%0A%09%27messageSyntaxCascade%27%0A%09%27messageSyntaxCascadeShouldNotBeHere%27%0A%0A%09%27blocks%27%0A%09%27blocksAssignation%27%0A%09%27conditionals%27%0A%09%27loops%27%0A%09%27iterators%27%0A%0A%09%27instanciation%27%0A%0A%09%27reflection%27%0A%09%27reflectionContinued%27%0A%09%22%27pharoEnvironment%27%22%0A%0A%09%22%27debugger%27%22%0A%09%27theEnd%27%20%29'),
  639. messageSends: [],
  640. referencedClasses: []
  641. }),
  642. smalltalk.SmalltalkSyntaxTutorial);
  643. smalltalk.addMethod(
  644. '_basicTypesArray',
  645. smalltalk.method({
  646. selector: 'basicTypesArray',
  647. category: 'pages',
  648. fn: function (){
  649. var self=this;
  650. return smalltalk.send((smalltalk.Lesson || Lesson), "_title_contents_", ["Basic types: Array", unescape("%22Literal%20arrays%20are%20created%20at%20parse%20time%3A%22%0A%0A%23%281%202%203%29.%0A%0A%23%28%201%202%203%20%23%284%205%206%29%29%20size.%0A%0A%23%281%202%204%29%20isEmpty.%0A%0A%23%281%202%203%29%20first.%0A%0A%23%28%27hello%27%20%27Javascript%27%29%20at%3A%202%20put%3A%20%27Smalltalk%27%3B%20yourself.%0A%0AProfStef%20next.")]);
  651. return self;},
  652. source: unescape('basicTypesArray%0A%09%5E%20Lesson%0Atitle%3A%20%27Basic%20types%3A%20Array%27%20%0Acontents%3A%20%0A%27%22Literal%20arrays%20are%20created%20at%20parse%20time%3A%22%0A%0A%23%281%202%203%29.%0A%0A%23%28%201%202%203%20%23%284%205%206%29%29%20size.%0A%0A%23%281%202%204%29%20isEmpty.%0A%0A%23%281%202%203%29%20first.%0A%0A%23%28%27%27hello%27%27%20%27%27Javascript%27%27%29%20at%3A%202%20put%3A%20%27%27Smalltalk%27%27%3B%20yourself.%0A%0AProfStef%20next.%27'),
  653. messageSends: ["title:contents:"],
  654. referencedClasses: [smalltalk.Lesson]
  655. }),
  656. smalltalk.SmalltalkSyntaxTutorial);
  657. smalltalk.addMethod(
  658. '_basicTypesCharacters',
  659. smalltalk.method({
  660. selector: 'basicTypesCharacters',
  661. category: 'pages',
  662. fn: function (){
  663. var self=this;
  664. return smalltalk.send((smalltalk.Lesson || Lesson), "_title_contents_", ["Basic types: Characters", unescape("%22A%20Character%20can%20be%20instantiated%20using%20%24%20operator%3A%22%0A%0A%24A.%0A%0A%24A%20class.%0A%0A%24B%20charCode.%0A%0ACharacter%20cr.%0A%0ACharacter%20space.%0A%0A%22You%20can%20print%20all%20256%20characters%20of%20the%20ASCII%20extended%20set%3A%22%0A%0ACharacter%20allByteCharacters.%0A%0AProfStef%20next.")]);
  665. return self;},
  666. source: unescape('basicTypesCharacters%0A%09%5E%20Lesson%0Atitle%3A%20%27Basic%20types%3A%20Characters%27%20%0Acontents%3A%20%0A%27%22A%20Character%20can%20be%20instantiated%20using%20%24%20operator%3A%22%0A%0A%24A.%0A%0A%24A%20class.%0A%0A%24B%20charCode.%0A%0ACharacter%20cr.%0A%0ACharacter%20space.%0A%0A%22You%20can%20print%20all%20256%20characters%20of%20the%20ASCII%20extended%20set%3A%22%0A%0ACharacter%20allByteCharacters.%0A%0AProfStef%20next.%27'),
  667. messageSends: ["title:contents:"],
  668. referencedClasses: [smalltalk.Lesson]
  669. }),
  670. smalltalk.SmalltalkSyntaxTutorial);
  671. smalltalk.addMethod(
  672. '_basicTypesDynamicArray',
  673. smalltalk.method({
  674. selector: 'basicTypesDynamicArray',
  675. category: 'pages',
  676. fn: function (){
  677. var self=this;
  678. return smalltalk.send((smalltalk.Lesson || Lesson), "_title_contents_", ["Basic types: Dynamic Array", unescape("%22Dynamic%20Arrays%20are%20created%20at%20execution%20time%3A%22%0A%0A%7B%20%282+3%29%20.%20%286*6%29%20%7D.%0A%0A%7B%20%282+3%29%20.%20%286*6%29%20.%20%27hello%27%2C%20%27%20Stef%27%7D%20size.%0A%0A%0A%7B%20ProfStef%20%7D%20first%20next.")]);
  679. return self;},
  680. source: unescape('basicTypesDynamicArray%0A%09%5E%20Lesson%0Atitle%3A%20%27Basic%20types%3A%20Dynamic%20Array%27%20%0Acontents%3A%20%0A%27%22Dynamic%20Arrays%20are%20created%20at%20execution%20time%3A%22%0A%0A%7B%20%282+3%29%20.%20%286*6%29%20%7D.%0A%0A%7B%20%282+3%29%20.%20%286*6%29%20.%20%27%27hello%27%27%2C%20%27%27%20Stef%27%27%7D%20size.%0A%0A%0A%7B%20ProfStef%20%7D%20first%20next.%27'),
  681. messageSends: ["title:contents:"],
  682. referencedClasses: [smalltalk.Lesson]
  683. }),
  684. smalltalk.SmalltalkSyntaxTutorial);
  685. smalltalk.addMethod(
  686. '_basicTypesNumbers',
  687. smalltalk.method({
  688. selector: 'basicTypesNumbers',
  689. category: 'pages',
  690. fn: function (){
  691. var self=this;
  692. return smalltalk.send((smalltalk.Lesson || Lesson), "_title_contents_", ["Basic types: Numbers", unescape("%22You%20now%20know%20how%20to%20execute%20Smalltalk%20code.%20%0A%0ANow%20let%27s%20talk%20about%20basic%20objects.%0A%0A1%2C%202%2C%20100%2C%202/3%20...%20are%20Numbers%2C%20and%20respond%20to%20many%20messages%20evaluating%20mathematical%20expressions.%0AEvaluate%20these%20ones%3A%22%0A%0A2.%0A%0A%281/3%29.%0A%0A%281/3%29%20+%20%284/5%29.%0A%0A%2818/5%29%20rounded.%0A%0A1%20class.%0A%0A1%20negated.%0A%0A1%20negated%20negated.%0A%0A%281%20+%203%29%20odd.%0A%0AProfStef%20next.")]);
  693. return self;},
  694. source: unescape('basicTypesNumbers%0A%09%5E%20Lesson%0Atitle%3A%20%27Basic%20types%3A%20Numbers%27%20%0Acontents%3A%20%0A%27%22You%20now%20know%20how%20to%20execute%20Smalltalk%20code.%20%0A%0ANow%20let%27%27s%20talk%20about%20basic%20objects.%0A%0A1%2C%202%2C%20100%2C%202/3%20...%20are%20Numbers%2C%20and%20respond%20to%20many%20messages%20evaluating%20mathematical%20expressions.%0AEvaluate%20these%20ones%3A%22%0A%0A2.%0A%0A%281/3%29.%0A%0A%281/3%29%20+%20%284/5%29.%0A%0A%2818/5%29%20rounded.%0A%0A1%20class.%0A%0A1%20negated.%0A%0A1%20negated%20negated.%0A%0A%281%20+%203%29%20odd.%0A%0AProfStef%20next.%27'),
  695. messageSends: ["title:contents:"],
  696. referencedClasses: [smalltalk.Lesson]
  697. }),
  698. smalltalk.SmalltalkSyntaxTutorial);
  699. smalltalk.addMethod(
  700. '_basicTypesString',
  701. smalltalk.method({
  702. selector: 'basicTypesString',
  703. category: 'pages',
  704. fn: function (){
  705. var self=this;
  706. return smalltalk.send((smalltalk.Lesson || Lesson), "_title_contents_", ["Basic types: Strings", unescape("%22A%20String%20is%20a%20collection%20of%20characters.%20Use%20single%20quotes%20to%20create%20a%20String%20object.%20Print%20these%20expressions%3A%22%0A%0A%27ProfStef%27.%0A%0A%27ProfStef%27%20size.%0A%0A%27abc%27%20asUppercase.%0A%0A%27Hello%20World%27%20reversed.%20%0A%0A%22You%20can%20access%20each%20character%20using%20at%3A%20message%22%0A%0A%27ProfStef%27%20at%3A%201.%0A%0A%22String%20concatenation%20uses%20the%20comma%20operator%3A%22%0A%0A%27ProfStef%27%2C%20%27%20is%20cool%27.%0A%0AProfStef%20next.")]);
  707. return self;},
  708. source: unescape('basicTypesString%0A%09%5E%20Lesson%0Atitle%3A%20%27Basic%20types%3A%20Strings%27%20%0Acontents%3A%20%0A%27%22A%20String%20is%20a%20collection%20of%20characters.%20Use%20single%20quotes%20to%20create%20a%20String%20object.%20Print%20these%20expressions%3A%22%0A%0A%27%27ProfStef%27%27.%0A%0A%27%27ProfStef%27%27%20size.%0A%0A%27%27abc%27%27%20asUppercase.%0A%0A%27%27Hello%20World%27%27%20reversed.%20%0A%0A%22You%20can%20access%20each%20character%20using%20at%3A%20message%22%0A%0A%27%27ProfStef%27%27%20at%3A%201.%0A%0A%22String%20concatenation%20uses%20the%20comma%20operator%3A%22%0A%0A%27%27ProfStef%27%27%2C%20%27%27%20is%20cool%27%27.%0A%0AProfStef%20next.%27'),
  709. messageSends: ["title:contents:"],
  710. referencedClasses: [smalltalk.Lesson]
  711. }),
  712. smalltalk.SmalltalkSyntaxTutorial);
  713. smalltalk.addMethod(
  714. '_basicTypesSymbol',
  715. smalltalk.method({
  716. selector: 'basicTypesSymbol',
  717. category: 'pages',
  718. fn: function (){
  719. var self=this;
  720. return smalltalk.send((smalltalk.Lesson || Lesson), "_title_contents_", ["Basic types: Symbols", unescape("%22A%20Symbol%20is%20a%20String%20which%20is%20guaranteed%20to%20be%20globally%20unique.%20%0A%0AThere%20is%20one%20and%20only%20one%20Symbol%20%23ProfStef.%20There%20may%20be%20several%20%27ProfStef%27%20String%20objects.%0A%0A%28Message%20%3D%3D%20returns%20true%20if%20the%20two%20objects%20are%20the%20SAME%29%22%0A%0A%27ProfStef%27%20asSymbol.%0A%0A%23ProfStef%20asString.%0A%0A%282%20asString%29%20%3D%3D%20%282%20asString%29.%0A%0A%282%20asString%29%20asSymbol%20%3D%3D%20%282%20asString%29%20asSymbol.%0A%0A%0A%28Smalltalk%20at%3A%20%23ProfStef%29%20next.")]);
  721. return self;},
  722. source: unescape('basicTypesSymbol%0A%09%5E%20Lesson%0Atitle%3A%20%27Basic%20types%3A%20Symbols%27%20%0Acontents%3A%20%0A%27%22A%20Symbol%20is%20a%20String%20which%20is%20guaranteed%20to%20be%20globally%20unique.%20%0A%0AThere%20is%20one%20and%20only%20one%20Symbol%20%23ProfStef.%20There%20may%20be%20several%20%27%27ProfStef%27%27%20String%20objects.%0A%0A%28Message%20%3D%3D%20returns%20true%20if%20the%20two%20objects%20are%20the%20SAME%29%22%0A%0A%27%27ProfStef%27%27%20asSymbol.%0A%0A%23ProfStef%20asString.%0A%0A%282%20asString%29%20%3D%3D%20%282%20asString%29.%0A%0A%282%20asString%29%20asSymbol%20%3D%3D%20%282%20asString%29%20asSymbol.%0A%0A%0A%28Smalltalk%20at%3A%20%23ProfStef%29%20next.%27'),
  723. messageSends: ["title:contents:"],
  724. referencedClasses: [smalltalk.Lesson]
  725. }),
  726. smalltalk.SmalltalkSyntaxTutorial);
  727. smalltalk.addMethod(
  728. '_blocks',
  729. smalltalk.method({
  730. selector: 'blocks',
  731. category: 'pages',
  732. fn: function (){
  733. var self=this;
  734. return smalltalk.send((smalltalk.Lesson || Lesson), "_title_contents_", ["Blocks", unescape("%22Cascade%20is%20cool%20%21%20Let%27s%20talk%20about%20blocks.%0A%0ABlocks%20are%20anonymous%20methods%20that%20can%20be%20stored%20into%20variables%20and%20executed%20on%20demand.%0A%0ABlocks%20are%20delimited%20by%20square%20brackets%3A%20%5B%5D%22%0A%0A%5BTranscript%20open%5D.%0A%0A%22does%20not%20open%20a%20Transcript%20because%20the%20block%20is%20not%20executed.%0A%0AHere%20is%20a%20block%20that%20adds%202%20to%20its%20argument%20%28its%20argument%20is%20named%20x%29%3A%22%0A%0A%5B%3Ax%20%7C%20x+2%5D.%0A%0A%22We%20can%20execute%20a%20block%20by%20sending%20it%20value%20messages.%22%0A%0A%5B%3Ax%20%7C%20x+2%5D%20value%3A%205.%0A%0A%5BTranscript%20open%5D%20value.%0A%0A%5B%3Ax%20%7C%20x+2%5D%20value%3A%2010.%0A%0A%5B%3Ax%20%3Ay%7C%20x%20+%20y%5D%20value%3A3%20value%3A5.%0A%0A%5BProfStef%20next%5D%20value.")]);
  735. return self;},
  736. source: unescape('blocks%0A%09%5E%20Lesson%0Atitle%3A%20%27Blocks%27%20%0Acontents%3A%20%0A%27%22Cascade%20is%20cool%20%21%20Let%27%27s%20talk%20about%20blocks.%0A%0ABlocks%20are%20anonymous%20methods%20that%20can%20be%20stored%20into%20variables%20and%20executed%20on%20demand.%0A%0ABlocks%20are%20delimited%20by%20square%20brackets%3A%20%5B%5D%22%0A%0A%5BTranscript%20open%5D.%0A%0A%22does%20not%20open%20a%20Transcript%20because%20the%20block%20is%20not%20executed.%0A%0AHere%20is%20a%20block%20that%20adds%202%20to%20its%20argument%20%28its%20argument%20is%20named%20x%29%3A%22%0A%0A%5B%3Ax%20%7C%20x+2%5D.%0A%0A%22We%20can%20execute%20a%20block%20by%20sending%20it%20value%20messages.%22%0A%0A%5B%3Ax%20%7C%20x+2%5D%20value%3A%205.%0A%0A%5BTranscript%20open%5D%20value.%0A%0A%5B%3Ax%20%7C%20x+2%5D%20value%3A%2010.%0A%0A%5B%3Ax%20%3Ay%7C%20x%20+%20y%5D%20value%3A3%20value%3A5.%0A%0A%5BProfStef%20next%5D%20value.%27'),
  737. messageSends: ["title:contents:"],
  738. referencedClasses: [smalltalk.Lesson]
  739. }),
  740. smalltalk.SmalltalkSyntaxTutorial);
  741. smalltalk.addMethod(
  742. '_blocksAssignation',
  743. smalltalk.method({
  744. selector: 'blocksAssignation',
  745. category: 'pages',
  746. fn: function (){
  747. var self=this;
  748. return smalltalk.send((smalltalk.Lesson || Lesson), "_title_contents_", ["Block assignation", unescape("%22Blocks%20can%20be%20assigned%20to%20a%20variable%20then%20executed%20later.%0A%0ANote%20that%20%7Cb%7C%20is%20the%20declaration%20of%20a%20variable%20named%20%27b%27%20and%20that%20%27%3A%3D%27%20assigns%20a%20value%20to%20a%20variable.%0A%0ASelect%20the%20three%20lines%20then%20Print%20It%3A%22%0A%0A%7Cb%7C%0Ab%20%3A%3D%20%5B%3Ax%20%7C%20x+2%5D.%0Ab%20value%3A%2012.%0A%0A%0AProfStef%20next.")]);
  749. return self;},
  750. source: unescape('blocksAssignation%0A%09%5E%20Lesson%0Atitle%3A%20%27Block%20assignation%27%20%0Acontents%3A%20%0A%27%22Blocks%20can%20be%20assigned%20to%20a%20variable%20then%20executed%20later.%0A%0ANote%20that%20%7Cb%7C%20is%20the%20declaration%20of%20a%20variable%20named%20%27%27b%27%27%20and%20that%20%27%27%3A%3D%27%27%20assigns%20a%20value%20to%20a%20variable.%0A%0ASelect%20the%20three%20lines%20then%20Print%20It%3A%22%0A%0A%7Cb%7C%0Ab%20%3A%3D%20%5B%3Ax%20%7C%20x+2%5D.%0Ab%20value%3A%2012.%0A%0A%0AProfStef%20next.%27'),
  751. messageSends: ["title:contents:"],
  752. referencedClasses: [smalltalk.Lesson]
  753. }),
  754. smalltalk.SmalltalkSyntaxTutorial);
  755. smalltalk.addMethod(
  756. '_conditionals',
  757. smalltalk.method({
  758. selector: 'conditionals',
  759. category: 'pages',
  760. fn: function (){
  761. var self=this;
  762. return smalltalk.send((smalltalk.Lesson || Lesson), "_title_contents_", ["Conditionals", unescape("%22Conditionals%20are%20just%20messages%20sent%20to%20Boolean%20objects%22%0A%0A1%20%3C%202%0A%20%20ifTrue%3A%20%5B100%5D%0A%20%20ifFalse%3A%20%5B42%5D.%0A%0A%22Here%20the%20message%20is%20ifTrue%3AifFalse%0A%0ATry%20this%3A%22%0A%0ATranscript%20open.%0A%0A3%20%3E%2010%20%0A%09ifTrue%3A%20%5BTranscript%20show%3A%20%27maybe%20there%27%27s%20a%20bug%20....%27%5D%0A%09ifFalse%3A%20%5BTranscript%20show%3A%20%27No%20%3A%203%20is%20less%20than%2010%27%5D.%0A%0A3%20%3D%203%20ifTrue%3A%20%5BProfStef%20next%5D.")]);
  763. return self;},
  764. source: unescape('conditionals%0A%09%5E%20Lesson%0Atitle%3A%20%27Conditionals%27%20%0Acontents%3A%20%0A%27%22Conditionals%20are%20just%20messages%20sent%20to%20Boolean%20objects%22%0A%0A1%20%3C%202%0A%20%20ifTrue%3A%20%5B100%5D%0A%20%20ifFalse%3A%20%5B42%5D.%0A%0A%22Here%20the%20message%20is%20ifTrue%3AifFalse%0A%0ATry%20this%3A%22%0A%0ATranscript%20open.%0A%0A3%20%3E%2010%20%0A%09ifTrue%3A%20%5BTranscript%20show%3A%20%27%27maybe%20there%27%27%27%27s%20a%20bug%20....%27%27%5D%0A%09ifFalse%3A%20%5BTranscript%20show%3A%20%27%27No%20%3A%203%20is%20less%20than%2010%27%27%5D.%0A%0A3%20%3D%203%20ifTrue%3A%20%5BProfStef%20next%5D.%27.'),
  765. messageSends: ["title:contents:"],
  766. referencedClasses: [smalltalk.Lesson]
  767. }),
  768. smalltalk.SmalltalkSyntaxTutorial);
  769. smalltalk.addMethod(
  770. '_debugger',
  771. smalltalk.method({
  772. selector: 'debugger',
  773. category: 'pages',
  774. fn: function (){
  775. var self=this;
  776. return smalltalk.send((smalltalk.Lesson || Lesson), "_title_contents_", ["Debugger", unescape("%22The%20Debugger%20may%20be%20the%20most%20famous%20tool%20of%20Smalltalk%20environments.%20It%20will%20open%20as%20soon%20as%20an%20unmanaged%20Exception%20occurs.%20%0A%0AThe%20following%20code%20will%20open%20the%20debugger.%0A%0A***This%20should%20be%20rethought%20completely***%22%0A%0A%0A%20")]);
  777. return self;},
  778. source: unescape('debugger%0A%09%5E%20Lesson%0Atitle%3A%20%27Debugger%27%20%0Acontents%3A%20%27%22The%20Debugger%20may%20be%20the%20most%20famous%20tool%20of%20Smalltalk%20environments.%20It%20will%20open%20as%20soon%20as%20an%20unmanaged%20Exception%20occurs.%20%0A%0AThe%20following%20code%20will%20open%20the%20debugger.%0A%0A***This%20should%20be%20rethought%20completely***%22%0A%0A%0A%20%27'),
  779. messageSends: ["title:contents:"],
  780. referencedClasses: [smalltalk.Lesson]
  781. }),
  782. smalltalk.SmalltalkSyntaxTutorial);
  783. smalltalk.addMethod(
  784. '_doingVSPrinting',
  785. smalltalk.method({
  786. selector: 'doingVSPrinting',
  787. category: 'pages',
  788. fn: function (){
  789. var self=this;
  790. return smalltalk.send((smalltalk.Lesson || Lesson), "_title_contents_", ["Doing VS Printing: Doing", unescape("%22Cool%20%21%20%28I%20like%20to%20say%20Cooool%20%3A%29%20%29.%20You%27ve%20just%20executed%20a%20Smalltalk%20expression.%20More%20precisely%2C%20you%20sent%20the%20message%20%27next%27%20to%0AProfStef%20class%20%28it%27s%20me%20%21%29.%0A%0ANote%20you%20can%20run%20this%20tutorial%20again%20by%20evaluating%3A%20%27ProfStef%20go%27.%20%0A%27ProfStef%20previous%27%20returns%20to%20the%20previous%20lesson.%0A%0AYou%20can%20also%20Do%20It%20using%20the%20keyboard%20shortcut%20%27CTRL%20d%27%0A%0ATry%20to%20evaluate%20this%20expression%3A%22%0A%0Awindow%20alert%3A%20%27hello%20world%21%27.%0A%0A%22Then%20go%20to%20the%20next%20lesson%3A%22%0A%0AProfStef%20next.")]);
  791. return self;},
  792. source: unescape('doingVSPrinting%20%0A%09%5E%20Lesson%0Atitle%3A%20%27Doing%20VS%20Printing%3A%20Doing%27%20%0Acontents%3A%20%0A%27%22Cool%20%21%20%28I%20like%20to%20say%20Cooool%20%3A%29%20%29.%20You%27%27ve%20just%20executed%20a%20Smalltalk%20expression.%20More%20precisely%2C%20you%20sent%20the%20message%20%27%27next%27%27%20to%0AProfStef%20class%20%28it%27%27s%20me%20%21%29.%0A%0ANote%20you%20can%20run%20this%20tutorial%20again%20by%20evaluating%3A%20%27%27ProfStef%20go%27%27.%20%0A%27%27ProfStef%20previous%27%27%20returns%20to%20the%20previous%20lesson.%0A%0AYou%20can%20also%20Do%20It%20using%20the%20keyboard%20shortcut%20%27%27CTRL%20d%27%27%0A%0ATry%20to%20evaluate%20this%20expression%3A%22%0A%0Awindow%20alert%3A%20%27%27hello%20world%21%27%27.%0A%0A%22Then%20go%20to%20the%20next%20lesson%3A%22%0A%0AProfStef%20next.%27'),
  793. messageSends: ["title:contents:"],
  794. referencedClasses: [smalltalk.Lesson]
  795. }),
  796. smalltalk.SmalltalkSyntaxTutorial);
  797. smalltalk.addMethod(
  798. '_instanciation',
  799. smalltalk.method({
  800. selector: 'instanciation',
  801. category: 'pages',
  802. fn: function (){
  803. var self=this;
  804. return smalltalk.send((smalltalk.Lesson || Lesson), "_title_contents_", ["Instanciation", unescape("%22Objects%20are%20instances%20of%20their%20class.%20Usually%2C%20we%20send%20the%20message%20%23new%20to%20a%20class%20for%20creating%20an%20instance%20of%20this%20class.%0A%0AFor%20example%2C%20let%27s%20create%20an%20instance%20of%20the%20class%20Array%3A%22%0A%0AArray%20new%0A%09add%3A%20%27Some%20text%27%3B%0A%09add%3A%203.%3B%0A%09yourself.%0A%0A%22See%20the%20array%20we%27ve%20created%3F%20Actually%2C%20%23%28%27Some%20text%27%203%29%20is%20just%20a%20shorthand%20for%20instantiating%20arrays.%22%0A%0A%22If%20we%20use%20a%20variable%20to%20keep%20track%20of%20this%20object%2C%20we%27ll%20be%20able%20to%20do%20stuff%20with%20it.%22%0A%0A%22The%20following%20code%20must%20be%20ran%20all%20at%20one%2C%20as%20the%20%27anArray%27%20variable%20will%20cease%20to%20exist%20once%20the%20execution%20finishes%3A%22%0A%0A%7CanArray%7C%0A%0AanArray%20%3A%3D%20Array%20new%0A%09add%3A%20%27Some%20text%27%3B%0A%09add%3A%203%3B%0A%09yourself%3B%0A%0ATranscript%20show%3A%20anArray%3B%20cr.%0A%0AanArray%20remove%3A%203.%0A%0ATranscript%20show%3A%20anArray%3B%20cr.%0A%0AanArray%20add%3A%20%27Some%20more%20text%21%27.%0A%0ATranscript%20show%3A%20anArray%3B%20cr.%0A%09%0A%22I%27ll%20put%20myself%20in%20an%20instance%20of%20a%20class%20named%20Dictionary%20and%20go%20to%20the%20next%20lesson%3A%22%0A%0A%28%28Dictionary%20new%20add%3A%20%28%27move%20on%21%27%20-%3E%20ProfStef%29%29%20at%3A%20%27move%20on%21%27%29%20next")]);
  805. return self;},
  806. source: unescape('instanciation%0A%09%5E%20Lesson%0Atitle%3A%20%27Instanciation%27%20%0Acontents%3A%20%0A%27%22Objects%20are%20instances%20of%20their%20class.%20Usually%2C%20we%20send%20the%20message%20%23new%20to%20a%20class%20for%20creating%20an%20instance%20of%20this%20class.%0A%0AFor%20example%2C%20let%27%27s%20create%20an%20instance%20of%20the%20class%20Array%3A%22%0A%0AArray%20new%0A%09add%3A%20%27%27Some%20text%27%27%3B%0A%09add%3A%203.%3B%0A%09yourself.%0A%0A%22See%20the%20array%20we%27%27ve%20created%3F%20Actually%2C%20%23%28%27%27Some%20text%27%27%203%29%20is%20just%20a%20shorthand%20for%20instantiating%20arrays.%22%0A%0A%22If%20we%20use%20a%20variable%20to%20keep%20track%20of%20this%20object%2C%20we%27%27ll%20be%20able%20to%20do%20stuff%20with%20it.%22%0A%0A%22The%20following%20code%20must%20be%20ran%20all%20at%20one%2C%20as%20the%20%27%27anArray%27%27%20variable%20will%20cease%20to%20exist%20once%20the%20execution%20finishes%3A%22%0A%0A%7CanArray%7C%0A%0AanArray%20%3A%3D%20Array%20new%0A%09add%3A%20%27%27Some%20text%27%27%3B%0A%09add%3A%203%3B%0A%09yourself%3B%0A%0ATranscript%20show%3A%20anArray%3B%20cr.%0A%0AanArray%20remove%3A%203.%0A%0ATranscript%20show%3A%20anArray%3B%20cr.%0A%0AanArray%20add%3A%20%27%27Some%20more%20text%21%27%27.%0A%0ATranscript%20show%3A%20anArray%3B%20cr.%0A%09%0A%22I%27%27ll%20put%20myself%20in%20an%20instance%20of%20a%20class%20named%20Dictionary%20and%20go%20to%20the%20next%20lesson%3A%22%0A%0A%28%28Dictionary%20new%20add%3A%20%28%27%27move%20on%21%27%27%20-%3E%20ProfStef%29%29%20at%3A%20%27%27move%20on%21%27%27%29%20next%27'),
  807. messageSends: ["title:contents:"],
  808. referencedClasses: [smalltalk.Lesson]
  809. }),
  810. smalltalk.SmalltalkSyntaxTutorial);
  811. smalltalk.addMethod(
  812. '_iterators',
  813. smalltalk.method({
  814. selector: 'iterators',
  815. category: 'pages',
  816. fn: function (){
  817. var self=this;
  818. return smalltalk.send((smalltalk.Lesson || Lesson), "_title_contents_", ["Iterators", unescape("%22The%20message%20do%3A%20is%20sent%20to%20a%20collection%20of%20objects%20%28Array%2C%20Dictionary%2C%20String%2C%20etc%29%2C%20evaluating%20the%20block%20for%20each%20element.%0A%0AHere%20we%20want%20to%20print%20all%20the%20numbers%20on%20the%20Transcript%20%28a%20console%29%22%0A%0A%23%2811%2038%203%20-2%2010%29%20do%3A%20%5B%3Aeach%20%7C%0A%20%20%20%20%20Transcript%20show%3A%20each%20printString%3B%20cr%5D.%0A%0A%22Some%20other%20really%20nice%20iterators%22%0A%0A%23%2811%2038%203%20-2%2010%29%20collect%3A%20%5B%3Aeach%20%7C%20each%20negated%5D.%0A%0A%23%2811%2038%203%20-2%2010%29%20collect%3A%20%5B%3Aeach%20%7C%20each%20odd%5D.%0A%0A%23%2811%2038%203%20-2%2010%29%20select%3A%20%5B%3Aeach%20%7C%20each%20odd%5D.%0A%0A%23%2811%2038%203%20-2%2010%29%20select%3A%20%5B%3Aeach%20%7C%20each%20%3E%2010%5D.%0A%0A%23%2811%2038%203%20-2%2010%29%20reject%3A%20%5B%3Aeach%20%7C%20each%20%3E%2010%5D.%0A%0A%23%2811%2038%203%20-2%2010%29%20%0A%20%20%20%20%20do%3A%20%5B%3Aeach%20%7C%20Transcript%20show%3A%20each%20printString%5D%0A%20%20%20%20%20separatedBy%3A%20%5BTranscript%20show%3A%20%27.%27%5D.%0A%0A%0A%28Smalltalk%20current%20classes%20select%3A%20%5B%3AeachClass%20%7C%20eachClass%20name%20%3D%20%27ProfStef%27%5D%29%20do%3A%20%5B%3AeachProfstef%20%7C%20eachProfstef%20next%5D.")]);
  819. return self;},
  820. source: unescape('iterators%0A%09%5E%20Lesson%0Atitle%3A%20%27Iterators%27%20%0Acontents%3A%20%0A%27%22The%20message%20do%3A%20is%20sent%20to%20a%20collection%20of%20objects%20%28Array%2C%20Dictionary%2C%20String%2C%20etc%29%2C%20evaluating%20the%20block%20for%20each%20element.%0A%0AHere%20we%20want%20to%20print%20all%20the%20numbers%20on%20the%20Transcript%20%28a%20console%29%22%0A%0A%23%2811%2038%203%20-2%2010%29%20do%3A%20%5B%3Aeach%20%7C%0A%20%20%20%20%20Transcript%20show%3A%20each%20printString%3B%20cr%5D.%0A%0A%22Some%20other%20really%20nice%20iterators%22%0A%0A%23%2811%2038%203%20-2%2010%29%20collect%3A%20%5B%3Aeach%20%7C%20each%20negated%5D.%0A%0A%23%2811%2038%203%20-2%2010%29%20collect%3A%20%5B%3Aeach%20%7C%20each%20odd%5D.%0A%0A%23%2811%2038%203%20-2%2010%29%20select%3A%20%5B%3Aeach%20%7C%20each%20odd%5D.%0A%0A%23%2811%2038%203%20-2%2010%29%20select%3A%20%5B%3Aeach%20%7C%20each%20%3E%2010%5D.%0A%0A%23%2811%2038%203%20-2%2010%29%20reject%3A%20%5B%3Aeach%20%7C%20each%20%3E%2010%5D.%0A%0A%23%2811%2038%203%20-2%2010%29%20%0A%20%20%20%20%20do%3A%20%5B%3Aeach%20%7C%20Transcript%20show%3A%20each%20printString%5D%0A%20%20%20%20%20separatedBy%3A%20%5BTranscript%20show%3A%20%27%27.%27%27%5D.%0A%0A%0A%28Smalltalk%20current%20classes%20select%3A%20%5B%3AeachClass%20%7C%20eachClass%20name%20%3D%20%27%27ProfStef%27%27%5D%29%20do%3A%20%5B%3AeachProfstef%20%7C%20eachProfstef%20next%5D.%27'),
  821. messageSends: ["title:contents:"],
  822. referencedClasses: [smalltalk.Lesson]
  823. }),
  824. smalltalk.SmalltalkSyntaxTutorial);
  825. smalltalk.addMethod(
  826. '_loops',
  827. smalltalk.method({
  828. selector: 'loops',
  829. category: 'pages',
  830. fn: function (){
  831. var self=this;
  832. return smalltalk.send((smalltalk.Lesson || Lesson), "_title_contents_", ["Loops", unescape("%22Loops%20are%20high-level%20collection%20iterators%2C%20implemented%20as%20regular%20methods.%22%0A%0A%22Basic%20loops%3A%0A%20%20to%3Ado%3A%0A%20%20to%3Aby%3Ado%22%0A%0A1%20to%3A%20100%20do%3A%0A%20%20%5B%3Ai%20%7C%20Transcript%20show%3A%20i%20asString%3B%20cr%20%5D.%0A%0A1%20to%3A%20100%20by%3A%203%20do%3A%20%5B%3Ai%20%7C%20Transcript%20show%3A%20i%20asString%3B%20cr%5D.%0A%0A100%20to%3A%200%20by%3A%20-2%20do%3A%20%0A%20%20%20%20%5B%3Ai%20%7C%20Transcript%20show%3A%20i%20asString%3B%20cr%5D.%0A%0A1%20to%3A%201%20do%3A%20%5B%3Ai%20%7C%20ProfStef%20next%5D.")]);
  833. return self;},
  834. source: unescape('loops%0A%09%5E%20Lesson%0Atitle%3A%20%27Loops%27%20%0Acontents%3A%20%0A%27%22Loops%20are%20high-level%20collection%20iterators%2C%20implemented%20as%20regular%20methods.%22%0A%0A%22Basic%20loops%3A%0A%20%20to%3Ado%3A%0A%20%20to%3Aby%3Ado%22%0A%0A1%20to%3A%20100%20do%3A%0A%20%20%5B%3Ai%20%7C%20Transcript%20show%3A%20i%20asString%3B%20cr%20%5D.%0A%0A1%20to%3A%20100%20by%3A%203%20do%3A%20%5B%3Ai%20%7C%20Transcript%20show%3A%20i%20asString%3B%20cr%5D.%0A%0A100%20to%3A%200%20by%3A%20-2%20do%3A%20%0A%20%20%20%20%5B%3Ai%20%7C%20Transcript%20show%3A%20i%20asString%3B%20cr%5D.%0A%0A1%20to%3A%201%20do%3A%20%5B%3Ai%20%7C%20ProfStef%20next%5D.%27'),
  835. messageSends: ["title:contents:"],
  836. referencedClasses: [smalltalk.Lesson]
  837. }),
  838. smalltalk.SmalltalkSyntaxTutorial);
  839. smalltalk.addMethod(
  840. '_mathematicalPrecedence',
  841. smalltalk.method({
  842. selector: 'mathematicalPrecedence',
  843. category: 'pages',
  844. fn: function (){
  845. var self=this;
  846. return smalltalk.send((smalltalk.Lesson || Lesson), "_title_contents_", ["Mathematical precedence", unescape("%22Traditional%20precedence%20rules%20from%20mathematics%20do%20not%20follow%20in%20Smalltalk.%22%0A%0A2%20*%2010%20+%202.%0A%0A%22Here%20the%20message%20*%20is%20sent%20to%202%2C%20which%20answers%2020%2C%20then%2020%20receive%20the%20message%20+%0A%0ARemember%20that%20all%20messages%20always%20follow%20a%20simple%20left-to-right%20precedence%20rule%2C%20*%20without%20exceptions%20*.%22%0A%0A2%20+%202%20*%2010.%0A%0A2%20+%20%282%20*%2010%29.%0A%0A8%20-%205%20/%202.%0A%0A%288%20-%205%29%20/%202.%0A%0A8%20-%20%285%20/%202%29.%0A%0AProfStef%20next.")]);
  847. return self;},
  848. source: unescape('mathematicalPrecedence%0A%09%5E%20Lesson%0Atitle%3A%20%27Mathematical%20precedence%27%0Acontents%3A%20%0A%27%22Traditional%20precedence%20rules%20from%20mathematics%20do%20not%20follow%20in%20Smalltalk.%22%0A%0A2%20*%2010%20+%202.%0A%0A%22Here%20the%20message%20*%20is%20sent%20to%202%2C%20which%20answers%2020%2C%20then%2020%20receive%20the%20message%20+%0A%0ARemember%20that%20all%20messages%20always%20follow%20a%20simple%20left-to-right%20precedence%20rule%2C%20*%20without%20exceptions%20*.%22%0A%0A2%20+%202%20*%2010.%0A%0A2%20+%20%282%20*%2010%29.%0A%0A8%20-%205%20/%202.%0A%0A%288%20-%205%29%20/%202.%0A%0A8%20-%20%285%20/%202%29.%0A%0AProfStef%20next.%27'),
  849. messageSends: ["title:contents:"],
  850. referencedClasses: [smalltalk.Lesson]
  851. }),
  852. smalltalk.SmalltalkSyntaxTutorial);
  853. smalltalk.addMethod(
  854. '_messageSyntaxBinary',
  855. smalltalk.method({
  856. selector: 'messageSyntaxBinary',
  857. category: 'pages',
  858. fn: function (){
  859. var self=this;
  860. return smalltalk.send((smalltalk.Lesson || Lesson), "_title_contents_", ["Message syntax: Binary messages", unescape("%22Binary%20messages%20have%20the%20following%20form%3A%0A%20%20%20%20anObject%20+%20anotherObject%22%0A%0A3%20*%202.%0A%0ADate%20today%20year%20%3D%202011.%0A%0Afalse%20%7C%20false.%0A%0Atrue%20%26%20true.%0A%0Atrue%20%26%20false.%0A%0A10%20@%20100.%0A%0A10%20%3C%3D%2012.%0A%0A%27ab%27%2C%20%27cd%27.%0A%0AProfStef%20next.")]);
  861. return self;},
  862. source: unescape('messageSyntaxBinary%0A%09%5E%20Lesson%0Atitle%3A%20%27Message%20syntax%3A%20Binary%20messages%27%20%0Acontents%3A%20%0A%27%22Binary%20messages%20have%20the%20following%20form%3A%0A%20%20%20%20anObject%20+%20anotherObject%22%0A%0A3%20*%202.%0A%0ADate%20today%20year%20%3D%202011.%0A%0Afalse%20%7C%20false.%0A%0Atrue%20%26%20true.%0A%0Atrue%20%26%20false.%0A%0A10%20@%20100.%0A%0A10%20%3C%3D%2012.%0A%0A%27%27ab%27%27%2C%20%27%27cd%27%27.%0A%0AProfStef%20next.%27'),
  863. messageSends: ["title:contents:"],
  864. referencedClasses: [smalltalk.Lesson]
  865. }),
  866. smalltalk.SmalltalkSyntaxTutorial);
  867. smalltalk.addMethod(
  868. '_messageSyntaxCascade',
  869. smalltalk.method({
  870. selector: 'messageSyntaxCascade',
  871. category: 'pages',
  872. fn: function (){
  873. var self=this;
  874. return smalltalk.send((smalltalk.Lesson || Lesson), "_title_contents_", ["Message syntax: Cascade", unescape("%22%3B%20is%20the%20cascade%20operator.%20It%27s%20useful%20to%20send%20message%20to%20the%20SAME%20receiver%0AOpen%20a%20Transcript%20%28console%29%3A%22%0A%0ATranscript%20open.%0A%0A%22Then%3A%22%0A%0ATranscript%20show%3A%20%27hello%27.%0ATranscript%20show%3A%20%27Smalltalk%27.%0ATranscript%20cr.%0A%0A%22is%20equivalent%20to%3A%22%0A%0ATranscript%20%0A%09%20%20%20show%3A%20%27hello%27%3B%0A%09%20%20%20show%3A%20%27Smalltalk%27%20%3B%0A%09%20%20%20cr.%0A%0A%22You%20can%20close%20the%20development%20tools%20by%20clicking%20on%20the%20red%20circle%20with%20a%20cross%20at%20the%20bottom%20left%20of%20the%20website.%0ATry%20to%20go%20to%20the%20next%20lesson%20with%20a%20cascade%20of%20two%20%27next%27%20messages%3A%22%0A%0AProfStef")]);
  875. return self;},
  876. source: unescape('messageSyntaxCascade%0A%09%5E%20Lesson%0Atitle%3A%20%27Message%20syntax%3A%20Cascade%27%20%0Acontents%3A%20%0A%27%22%3B%20is%20the%20cascade%20operator.%20It%27%27s%20useful%20to%20send%20message%20to%20the%20SAME%20receiver%0AOpen%20a%20Transcript%20%28console%29%3A%22%0A%0ATranscript%20open.%0A%0A%22Then%3A%22%0A%0ATranscript%20show%3A%20%27%27hello%27%27.%0ATranscript%20show%3A%20%27%27Smalltalk%27%27.%0ATranscript%20cr.%0A%0A%22is%20equivalent%20to%3A%22%0A%0ATranscript%20%0A%09%20%20%20show%3A%20%27%27hello%27%27%3B%0A%09%20%20%20show%3A%20%27%27Smalltalk%27%27%20%3B%0A%09%20%20%20cr.%0A%0A%22You%20can%20close%20the%20development%20tools%20by%20clicking%20on%20the%20red%20circle%20with%20a%20cross%20at%20the%20bottom%20left%20of%20the%20website.%0ATry%20to%20go%20to%20the%20next%20lesson%20with%20a%20cascade%20of%20two%20%27%27next%27%27%20messages%3A%22%0A%0AProfStef%27.'),
  877. messageSends: ["title:contents:"],
  878. referencedClasses: [smalltalk.Lesson]
  879. }),
  880. smalltalk.SmalltalkSyntaxTutorial);
  881. smalltalk.addMethod(
  882. '_messageSyntaxCascadeShouldNotBeHere',
  883. smalltalk.method({
  884. selector: 'messageSyntaxCascadeShouldNotBeHere',
  885. category: 'pages',
  886. fn: function (){
  887. var self=this;
  888. return smalltalk.send((smalltalk.Lesson || Lesson), "_title_contents_", [unescape("Lost%20%3F"), unescape("%22Hey%2C%20you%20should%20not%20be%20here%20%21%21%20%0A%0AGo%20back%20and%20use%20a%20cascade%20%21%22%0A%0AProfStef%20previous.")]);
  889. return self;},
  890. source: unescape('messageSyntaxCascadeShouldNotBeHere%0A%09%5E%20Lesson%0Atitle%3A%20%27Lost%20%3F%27%20%0Acontents%3A%20%0A%27%22Hey%2C%20you%20should%20not%20be%20here%20%21%21%20%0A%0AGo%20back%20and%20use%20a%20cascade%20%21%22%0A%0AProfStef%20previous.%27.'),
  891. messageSends: ["title:contents:"],
  892. referencedClasses: [smalltalk.Lesson]
  893. }),
  894. smalltalk.SmalltalkSyntaxTutorial);
  895. smalltalk.addMethod(
  896. '_messageSyntaxExecutionOrder',
  897. smalltalk.method({
  898. selector: 'messageSyntaxExecutionOrder',
  899. category: 'pages',
  900. fn: function (){
  901. var self=this;
  902. return smalltalk.send((smalltalk.Lesson || Lesson), "_title_contents_", ["Message syntax: Execution order", unescape("%22Unary%20messages%20are%20executed%20first%2C%20then%20binary%20messages%20and%20finally%20keyword%20messages%3A%0A%20%20%20%20Unary%20%3E%20Binary%20%3E%20Keywords%22%0A%0A2.5%20+%203.8%20rounded.%0A%0A3%20max%3A%202%20+%202.%0A%20%20%0A%280@0%29%20class.%0A%0A0@0%20x%3A%20100.%0A%0A%280@0%20x%3A%20100%29%20class.%0A%0A%22Between%20messages%20of%20similar%20precedence%2C%20expressions%20are%20executed%20from%20left%20to%20right%22%0A%0A-12345%20negated%20asString%20reversed.%0A%0AProfStef%20next.")]);
  903. return self;},
  904. source: unescape('messageSyntaxExecutionOrder%0A%09%5E%20Lesson%0Atitle%3A%20%27Message%20syntax%3A%20Execution%20order%27%20%0Acontents%3A%20%0A%27%22Unary%20messages%20are%20executed%20first%2C%20then%20binary%20messages%20and%20finally%20keyword%20messages%3A%0A%20%20%20%20Unary%20%3E%20Binary%20%3E%20Keywords%22%0A%0A2.5%20+%203.8%20rounded.%0A%0A3%20max%3A%202%20+%202.%0A%20%20%0A%280@0%29%20class.%0A%0A0@0%20x%3A%20100.%0A%0A%280@0%20x%3A%20100%29%20class.%0A%0A%22Between%20messages%20of%20similar%20precedence%2C%20expressions%20are%20executed%20from%20left%20to%20right%22%0A%0A-12345%20negated%20asString%20reversed.%0A%0AProfStef%20next.%27'),
  905. messageSends: ["title:contents:"],
  906. referencedClasses: [smalltalk.Lesson]
  907. }),
  908. smalltalk.SmalltalkSyntaxTutorial);
  909. smalltalk.addMethod(
  910. '_messageSyntaxExecutionOrderParentheses',
  911. smalltalk.method({
  912. selector: 'messageSyntaxExecutionOrderParentheses',
  913. category: 'pages',
  914. fn: function (){
  915. var self=this;
  916. return smalltalk.send((smalltalk.Lesson || Lesson), "_title_contents_", ["Message syntax: Parentheses", unescape("%22Use%20parentheses%20to%20change%20order%20of%20evaluation%22%0A%0A%282.5%20+%203.8%29%20rounded.%0A%0A%283%20max%3A%202%29%20+%202.%0A%0AProfStef%20next.")]);
  917. return self;},
  918. source: unescape('messageSyntaxExecutionOrderParentheses%0A%09%5E%20Lesson%0Atitle%3A%20%27Message%20syntax%3A%20Parentheses%27%0Acontents%3A%20%0A%27%22Use%20parentheses%20to%20change%20order%20of%20evaluation%22%0A%0A%282.5%20+%203.8%29%20rounded.%0A%0A%283%20max%3A%202%29%20+%202.%0A%0AProfStef%20next.%27'),
  919. messageSends: ["title:contents:"],
  920. referencedClasses: [smalltalk.Lesson]
  921. }),
  922. smalltalk.SmalltalkSyntaxTutorial);
  923. smalltalk.addMethod(
  924. '_messageSyntaxKeyword',
  925. smalltalk.method({
  926. selector: 'messageSyntaxKeyword',
  927. category: 'pages',
  928. fn: function (){
  929. var self=this;
  930. return smalltalk.send((smalltalk.Lesson || Lesson), "_title_contents_", ["Message syntax: Keyword messages", unescape("%22Keyword%20Messages%20are%20messages%20with%20arguments.%20They%20have%20the%20following%20form%3A%0A%20%20%20%20anObject%20akey%3A%20anotherObject%20akey2%3A%20anotherObject2%22%0A%0A%27Web%20development%20is%20a%20good%20deal%20of%20pain%27%20copyFrom%3A%201%20to%3A%2030%0A%0A%22The%20message%20is%20copyFrom%3Ato%3A%20sent%20to%20the%20String%20%27Web%20development%20is%20a%20good%20deal%20of%20pain%27%22%0A%0A1%20max%3A%203.%0A%0AArray%20with%3A%20%27hello%27%20with%3A%202%20with%3A%20Smalltalk.%0A%0A%22The%20message%20is%20with%3Awith%3Awith%3A%20implemented%20on%20class%20Array.%20Note%20you%20can%20also%20write%22%0A%0AArray%0A%09with%3A%20%27Hi%20there%21%27%0A%09with%3A%202%0A%09with%3A%20Smalltalk.%0A%09%0AProfStef%20perform%3A%20%27next%27.")]);
  931. return self;},
  932. source: unescape('messageSyntaxKeyword%0A%09%5E%20Lesson%0Atitle%3A%20%27Message%20syntax%3A%20Keyword%20messages%27%20%0Acontents%3A%20%0A%27%22Keyword%20Messages%20are%20messages%20with%20arguments.%20They%20have%20the%20following%20form%3A%0A%20%20%20%20anObject%20akey%3A%20anotherObject%20akey2%3A%20anotherObject2%22%0A%0A%27%27Web%20development%20is%20a%20good%20deal%20of%20pain%27%27%20copyFrom%3A%201%20to%3A%2030%0A%0A%22The%20message%20is%20copyFrom%3Ato%3A%20sent%20to%20the%20String%20%27%27Web%20development%20is%20a%20good%20deal%20of%20pain%27%27%22%0A%0A1%20max%3A%203.%0A%0AArray%20with%3A%20%27%27hello%27%27%20with%3A%202%20with%3A%20Smalltalk.%0A%0A%22The%20message%20is%20with%3Awith%3Awith%3A%20implemented%20on%20class%20Array.%20Note%20you%20can%20also%20write%22%0A%0AArray%0A%09with%3A%20%27%27Hi%20there%21%27%27%0A%09with%3A%202%0A%09with%3A%20Smalltalk.%0A%09%0AProfStef%20perform%3A%20%27%27next%27%27.%27'),
  933. messageSends: ["title:contents:"],
  934. referencedClasses: [smalltalk.Lesson]
  935. }),
  936. smalltalk.SmalltalkSyntaxTutorial);
  937. smalltalk.addMethod(
  938. '_messageSyntaxUnary',
  939. smalltalk.method({
  940. selector: 'messageSyntaxUnary',
  941. category: 'pages',
  942. fn: function (){
  943. var self=this;
  944. return smalltalk.send((smalltalk.Lesson || Lesson), "_title_contents_", ["Message syntax: Unary messages", unescape("%22Messages%20are%20sent%20to%20objects.%20There%20are%20three%20types%20of%20message%3A%20Unary%2C%20Binary%20and%20Keyword.%0A%0AUnary%20messages%20have%20the%20following%20form%3A%0A%20%20%20%20anObject%20aMessage%20%0A%0AYou%27ve%20already%20sent%20unary%20messages.%20For%20example%3A%22%0A%0A1%20class.%0A%0Afalse%20not.%0A%0ADate%20today.%0A%0ANumber%20pi.%0A%0A%22And%20of%20course%3A%20%22%0A%0AProfStef%20next.")]);
  945. return self;},
  946. source: unescape('messageSyntaxUnary%0A%09%5E%20Lesson%0Atitle%3A%20%27Message%20syntax%3A%20Unary%20messages%27%20%0Acontents%3A%20%0A%27%22Messages%20are%20sent%20to%20objects.%20There%20are%20three%20types%20of%20message%3A%20Unary%2C%20Binary%20and%20Keyword.%0A%0AUnary%20messages%20have%20the%20following%20form%3A%0A%20%20%20%20anObject%20aMessage%20%0A%0AYou%27%27ve%20already%20sent%20unary%20messages.%20For%20example%3A%22%0A%0A1%20class.%0A%0Afalse%20not.%0A%0ADate%20today.%0A%0ANumber%20pi.%0A%0A%22And%20of%20course%3A%20%22%0A%0AProfStef%20next.%27'),
  947. messageSends: ["title:contents:"],
  948. referencedClasses: [smalltalk.Lesson]
  949. }),
  950. smalltalk.SmalltalkSyntaxTutorial);
  951. smalltalk.addMethod(
  952. '_pharoEnvironment',
  953. smalltalk.method({
  954. selector: 'pharoEnvironment',
  955. category: 'pages',
  956. fn: function (){
  957. var self=this;
  958. return smalltalk.send((smalltalk.Lesson || Lesson), "_title_contents_", ["Pharo environment", unescape("%22Every%20Smalltalk%20system%20is%20full%20of%20objects.%20There%20are%20windows%2C%20text%2C%20numbers%2C%20dates%2C%20colors%2C%20points%20and%20much%20more.%20You%20can%20interact%20with%20objects%20in%20a%20much%20more%20direct%20way%20than%20is%20possible%20with%20other%20programming%20languages.%0A%0AEvery%20object%20understands%20the%20message%20%27explore%27.%20As%20a%20result%2C%20you%20get%20an%20Explorer%20window%20that%20shows%20details%20about%20the%20object.%22%0A%0ADate%20today%20explore.%0A%0A%22This%20shows%20that%20the%20date%20object%20consists%20of%20a%20point%20in%20time%20%28start%29%20and%20a%20duration%20%28one%20day%20long%29.%22%0A%0AProfStef%20explore.%0A%0A%22You%20see%2C%20ProfStef%20class%20has%20a%20lot%20of%20objects.%20Let%27s%20take%20a%20look%20at%20my%20code%3A%22%0A%0AProfStef%20browse.%0A%0AProfStef%20next.")]);
  959. return self;},
  960. source: unescape('pharoEnvironment%0A%09%5E%20Lesson%0Atitle%3A%20%27Pharo%20environment%27%20%0Acontents%3A%20%0A%27%22Every%20Smalltalk%20system%20is%20full%20of%20objects.%20There%20are%20windows%2C%20text%2C%20numbers%2C%20dates%2C%20colors%2C%20points%20and%20much%20more.%20You%20can%20interact%20with%20objects%20in%20a%20much%20more%20direct%20way%20than%20is%20possible%20with%20other%20programming%20languages.%0A%0AEvery%20object%20understands%20the%20message%20%27%27explore%27%27.%20As%20a%20result%2C%20you%20get%20an%20Explorer%20window%20that%20shows%20details%20about%20the%20object.%22%0A%0ADate%20today%20explore.%0A%0A%22This%20shows%20that%20the%20date%20object%20consists%20of%20a%20point%20in%20time%20%28start%29%20and%20a%20duration%20%28one%20day%20long%29.%22%0A%0AProfStef%20explore.%0A%0A%22You%20see%2C%20ProfStef%20class%20has%20a%20lot%20of%20objects.%20Let%27%27s%20take%20a%20look%20at%20my%20code%3A%22%0A%0AProfStef%20browse.%0A%0AProfStef%20next.%27'),
  961. messageSends: ["title:contents:"],
  962. referencedClasses: [smalltalk.Lesson]
  963. }),
  964. smalltalk.SmalltalkSyntaxTutorial);
  965. smalltalk.addMethod(
  966. '_printing',
  967. smalltalk.method({
  968. selector: 'printing',
  969. category: 'pages',
  970. fn: function (){
  971. var self=this;
  972. return smalltalk.send((smalltalk.Lesson || Lesson), "_title_contents_", ["Doing VS Printing: Printing", unescape("%22Now%20you%27re%20a%20Do%20It%20master%20%21%20Let%27s%20talk%20about%20printing.%20It%27s%20a%20Do%20It%20which%20prints%20the%20result%20next%20to%20the%20expression%20you%27ve%20selected.%0AFor%20example%2C%20select%20the%20text%20below%2C%20and%20click%20on%20%27PrintIt%27%3A%22%0A%0A1%20+%202.%0A%0A%22As%20with%20%27DoIt%27%2C%20there%20is%20also%20a%20shortcut%20to%20execute%20this%20command.%0A%0ATry%20CTRL-p%20on%20the%20following%20expressions%3A%22%0A%0ADate%20today.%0A%0A%22The%20result%20is%20selected%2C%20so%20you%20can%20erase%20it%20using%20the%20backspace%20key.%20Try%20it%20%21%22%0A%0ADate%20today%20asDateString.%0A%0ADate%20today%20asTimeString.%0A%0AProfStef%20next.")]);
  973. return self;},
  974. source: unescape('printing%20%0A%09%5E%20Lesson%0Atitle%3A%20%27Doing%20VS%20Printing%3A%20Printing%27%20%0Acontents%3A%20%0A%27%22Now%20you%27%27re%20a%20Do%20It%20master%20%21%20Let%27%27s%20talk%20about%20printing.%20It%27%27s%20a%20Do%20It%20which%20prints%20the%20result%20next%20to%20the%20expression%20you%27%27ve%20selected.%0AFor%20example%2C%20select%20the%20text%20below%2C%20and%20click%20on%20%27%27PrintIt%27%27%3A%22%0A%0A1%20+%202.%0A%0A%22As%20with%20%27%27DoIt%27%27%2C%20there%20is%20also%20a%20shortcut%20to%20execute%20this%20command.%0A%0ATry%20CTRL-p%20on%20the%20following%20expressions%3A%22%0A%0ADate%20today.%0A%0A%22The%20result%20is%20selected%2C%20so%20you%20can%20erase%20it%20using%20the%20backspace%20key.%20Try%20it%20%21%22%0A%0ADate%20today%20asDateString.%0A%0ADate%20today%20asTimeString.%0A%0AProfStef%20next.%27'),
  975. messageSends: ["title:contents:"],
  976. referencedClasses: [smalltalk.Lesson]
  977. }),
  978. smalltalk.SmalltalkSyntaxTutorial);
  979. smalltalk.addMethod(
  980. '_reflection',
  981. smalltalk.method({
  982. selector: 'reflection',
  983. category: 'pages',
  984. fn: function (){
  985. var self=this;
  986. return smalltalk.send((smalltalk.Lesson || Lesson), "_title_contents_", ["Reflection", unescape("%22You%20can%20inspect%20and%20change%20the%20system%20at%20runtime.%0A%0ATake%20a%20look%20at%20the%20source%20code%20of%20the%20method%20%23and%3A%20of%20the%20class%20Boolean%3A%22%0A%0A%28Boolean%20methodDictionary%20at%3A%20%27and%3A%27%29%20source.%0A%0A%22Or%20all%20the%20methods%20it%20sends%3A%22%0A%0A%28Boolean%20methodDictionary%20at%3A%20%27and%3A%27%29%20messageSends.%0A%0A%22Here%27s%20all%20the%20methods%20I%20implement%3A%22%0A%0AProfStef%20methodDictionary.%0A%0A%22Let%27s%20create%20a%20new%20method%20to%20go%20to%20the%20next%20lesson%3A%22%0A%0A%7CnewMethod%7C%0AnewMethod%20%3A%3D%20Compiler%20new%20load%3A%20%27goToNextLesson%20ProfStef%20next.%27%20forClass%3A%20ProfStef.%0AProfStef%20class%20addCompiledMethod%3A%20newMethod%0A%0A%22Wow%21%20I%20can%27t%20wait%20to%20use%20my%20new%20method%21%22%0A%0AProfStef%20goToNextLesson.")]);
  987. return self;},
  988. source: unescape('reflection%0A%09%5E%20Lesson%0Atitle%3A%20%27Reflection%27%20%0Acontents%3A%20%0A%27%22You%20can%20inspect%20and%20change%20the%20system%20at%20runtime.%0A%0ATake%20a%20look%20at%20the%20source%20code%20of%20the%20method%20%23and%3A%20of%20the%20class%20Boolean%3A%22%0A%0A%28Boolean%20methodDictionary%20at%3A%20%27%27and%3A%27%27%29%20source.%0A%0A%22Or%20all%20the%20methods%20it%20sends%3A%22%0A%0A%28Boolean%20methodDictionary%20at%3A%20%27%27and%3A%27%27%29%20messageSends.%0A%0A%22Here%27%27s%20all%20the%20methods%20I%20implement%3A%22%0A%0AProfStef%20methodDictionary.%0A%0A%22Let%27%27s%20create%20a%20new%20method%20to%20go%20to%20the%20next%20lesson%3A%22%0A%0A%7CnewMethod%7C%0AnewMethod%20%3A%3D%20Compiler%20new%20load%3A%20%27%27goToNextLesson%20ProfStef%20next.%27%27%20forClass%3A%20ProfStef.%0AProfStef%20class%20addCompiledMethod%3A%20newMethod%0A%0A%22Wow%21%20I%20can%27%27t%20wait%20to%20use%20my%20new%20method%21%22%0A%0AProfStef%20goToNextLesson.%27'),
  989. messageSends: ["title:contents:"],
  990. referencedClasses: [smalltalk.Lesson]
  991. }),
  992. smalltalk.SmalltalkSyntaxTutorial);
  993. smalltalk.addMethod(
  994. '_reflectionContinued',
  995. smalltalk.method({
  996. selector: 'reflectionContinued',
  997. category: 'pages',
  998. fn: function (){
  999. var self=this;
  1000. return smalltalk.send((smalltalk.Lesson || Lesson), "_title_contents_", ["Reflection continued", unescape("%22So%20cool%2C%20isn%27t%20it%20%3F%20%20Before%20going%20further%2C%20let%27s%20remove%20this%20method%3A%22%0A%0AProfStef%20class%20methodAt%3A%20%23goToNextLesson.%0A%0AProfStef%20class%20removeCompiledMethod%3A%20%28ProfStef%20class%20methodAt%3A%20%23goToNextLesson%29.%0A%0AProfStef%20class%20methodAt%3A%20%23goToNextLesson.%0A%0A%0A%22Then%20move%20forward%3A%22%0A%0AProfStef%20perform%3A%23next")]);
  1001. return self;},
  1002. source: unescape('reflectionContinued%0A%09%5E%20Lesson%0Atitle%3A%20%27Reflection%20continued%27%20%0Acontents%3A%20%0A%27%22So%20cool%2C%20isn%27%27t%20it%20%3F%20%20Before%20going%20further%2C%20let%27%27s%20remove%20this%20method%3A%22%0A%0AProfStef%20class%20methodAt%3A%20%23goToNextLesson.%0A%0AProfStef%20class%20removeCompiledMethod%3A%20%28ProfStef%20class%20methodAt%3A%20%23goToNextLesson%29.%0A%0AProfStef%20class%20methodAt%3A%20%23goToNextLesson.%0A%0A%0A%22Then%20move%20forward%3A%22%0A%0AProfStef%20perform%3A%23next%27'),
  1003. messageSends: ["title:contents:"],
  1004. referencedClasses: [smalltalk.Lesson]
  1005. }),
  1006. smalltalk.SmalltalkSyntaxTutorial);
  1007. smalltalk.addMethod(
  1008. '_theEnd',
  1009. smalltalk.method({
  1010. selector: 'theEnd',
  1011. category: 'pages',
  1012. fn: function (){
  1013. var self=this;
  1014. return smalltalk.send((smalltalk.Lesson || Lesson), "_title_contents_", [unescape("Tutorial%20done%20%21"), unescape("%22This%20tutorial%20is%20done.%20Enjoy%20programming%20Smalltalk%20with%20JTalk.%20%0A%0AYou%20can%20run%20this%20tutorial%20again%20by%20evaluating%3A%20ProfStef%20go.%0A%0ASee%20you%20soon%20%21%22%0A")]);
  1015. return self;},
  1016. source: unescape('theEnd%0A%09%5E%20Lesson%0Atitle%3A%20%27Tutorial%20done%20%21%27%20%0Acontents%3A%20%0A%27%22This%20tutorial%20is%20done.%20Enjoy%20programming%20Smalltalk%20with%20JTalk.%20%0A%0AYou%20can%20run%20this%20tutorial%20again%20by%20evaluating%3A%20ProfStef%20go.%0A%0ASee%20you%20soon%20%21%22%0A%27'),
  1017. messageSends: ["title:contents:"],
  1018. referencedClasses: [smalltalk.Lesson]
  1019. }),
  1020. smalltalk.SmalltalkSyntaxTutorial);
  1021. smalltalk.addMethod(
  1022. '_welcome',
  1023. smalltalk.method({
  1024. selector: 'welcome',
  1025. category: 'pages',
  1026. fn: function (){
  1027. var self=this;
  1028. return smalltalk.send((smalltalk.Lesson || Lesson), "_title_contents_", ["Welcome", unescape("%20%22Hello%21%20I%27m%20Professor%20Stef.%20%0A%0AYou%20must%20want%20me%20to%20help%20you%20learn%20Smalltalk.%0A%0ASo%20let%27s%20go%20to%20the%20first%20lesson.%20%20Select%20the%20text%20below%20and%20click%20on%20the%20%27DoIt%27%20button%22%0A%0AProfStef%20next.")]);
  1029. return self;},
  1030. source: unescape('welcome%0A%09%5E%20Lesson%0Atitle%3A%20%27Welcome%27%20%0Acontents%3A%20%0A%27%20%22Hello%21%20I%27%27m%20Professor%20Stef.%20%0A%0AYou%20must%20want%20me%20to%20help%20you%20learn%20Smalltalk.%0A%0ASo%20let%27%27s%20go%20to%20the%20first%20lesson.%20%20Select%20the%20text%20below%20and%20click%20on%20the%20%27%27DoIt%27%27%20button%22%0A%0AProfStef%20next.%27'),
  1031. messageSends: ["title:contents:"],
  1032. referencedClasses: [smalltalk.Lesson]
  1033. }),
  1034. smalltalk.SmalltalkSyntaxTutorial);