1
0

TrySmalltalk.js 72 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206
  1. smalltalk.addClass('TrySmalltalkWidget', smalltalk.Widget, ['workspace', 'contents', 'header'], 'TrySmalltalk');
  2. smalltalk.addMethod(
  3. '_workspace',
  4. smalltalk.method({
  5. selector: 'workspace',
  6. category: 'accessing',
  7. fn: function (){
  8. var self=this;
  9. return (($receiver = self['@workspace']) == nil || $receiver == undefined) ? (function(){return self['@workspace']=smalltalk.send((smalltalk.SourceArea || SourceArea), "_new", []);})() : $receiver;
  10. return self;},
  11. args: [],
  12. 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'),
  13. messageSends: ["ifNil:", "new"],
  14. referencedClasses: []
  15. }),
  16. smalltalk.TrySmalltalkWidget);
  17. smalltalk.addMethod(
  18. '_contents_',
  19. smalltalk.method({
  20. selector: 'contents:',
  21. category: 'accessing',
  22. fn: function (aString){
  23. var self=this;
  24. smalltalk.send(smalltalk.send(self, "_workspace", []), "_val_", [aString]);
  25. return self;},
  26. args: ["aString"],
  27. source: unescape('contents%3A%20aString%0A%09self%20workspace%20val%3A%20aString'),
  28. messageSends: ["val:", "workspace"],
  29. referencedClasses: []
  30. }),
  31. smalltalk.TrySmalltalkWidget);
  32. smalltalk.addMethod(
  33. '_contents',
  34. smalltalk.method({
  35. selector: 'contents',
  36. category: 'accessing',
  37. fn: function (){
  38. var self=this;
  39. return smalltalk.send(smalltalk.send(self, "_workspace", []), "_val", []);
  40. return self;},
  41. args: [],
  42. source: unescape('contents%0A%09%5Eself%20workspace%20val'),
  43. messageSends: ["val", "workspace"],
  44. referencedClasses: []
  45. }),
  46. smalltalk.TrySmalltalkWidget);
  47. smalltalk.addMethod(
  48. '_setTitle_',
  49. smalltalk.method({
  50. selector: 'setTitle:',
  51. category: 'accessing',
  52. fn: function (aString){
  53. var self=this;
  54. smalltalk.send(self['@header'], "_contents_", [(function(html){return smalltalk.send(html, "_with_", [aString]);})]);
  55. return self;},
  56. args: ["aString"],
  57. source: unescape('setTitle%3A%20aString%0A%09header%20contents%3A%20%5B%3Ahtml%20%7C%20html%20with%3A%20aString%5D'),
  58. messageSends: ["contents:", "with:"],
  59. referencedClasses: []
  60. }),
  61. smalltalk.TrySmalltalkWidget);
  62. smalltalk.addMethod(
  63. '_renderOn_',
  64. smalltalk.method({
  65. selector: 'renderOn:',
  66. category: 'rendering',
  67. fn: function (html){
  68. var self=this;
  69. (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", []));
  70. (function($rec){smalltalk.send($rec, "_widget_", [self]);return smalltalk.send($rec, "_showCurrentLesson", []);})(smalltalk.send((smalltalk.ProfStef || ProfStef), "_default", []));
  71. return self;},
  72. args: ["html"],
  73. 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'),
  74. messageSends: ["class:", "with:", "h2", "renderOn:", "workspace", "renderButtonsOn:", "div", "widget:", "showCurrentLesson", "default"],
  75. referencedClasses: []
  76. }),
  77. smalltalk.TrySmalltalkWidget);
  78. smalltalk.addMethod(
  79. '_renderButtonsOn_',
  80. smalltalk.method({
  81. selector: 'renderButtonsOn:',
  82. category: 'rendering',
  83. fn: function (html){
  84. var self=this;
  85. (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", []));
  86. (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", []));
  87. (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", []));
  88. return self;},
  89. args: ["html"],
  90. 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'),
  91. messageSends: ["with:", "title:", "onClick:", "doIt", "workspace", "button", "printIt", "inspectIt"],
  92. referencedClasses: []
  93. }),
  94. smalltalk.TrySmalltalkWidget);
  95. smalltalk.addMethod(
  96. '_open',
  97. smalltalk.method({
  98. selector: 'open',
  99. category: 'initialize',
  100. fn: function (){
  101. var self=this;
  102. smalltalk.send(smalltalk.send(self, "_new", []), "_appendToJQuery_", [smalltalk.send("body", "_asJQuery", [])]);
  103. return self;},
  104. args: [],
  105. source: unescape('open%0A%09self%20new%20appendToJQuery%3A%20%27body%27%20asJQuery.'),
  106. messageSends: ["appendToJQuery:", "new", "asJQuery"],
  107. referencedClasses: []
  108. }),
  109. smalltalk.TrySmalltalkWidget.klass);
  110. smalltalk.addClass('AbstractTutorial', smalltalk.Object, [], 'TrySmalltalk');
  111. 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.')
  112. smalltalk.addMethod(
  113. '_indexOfLesson_',
  114. smalltalk.method({
  115. selector: 'indexOfLesson:',
  116. category: 'accessing',
  117. fn: function (aSelector){
  118. var self=this;
  119. return smalltalk.send(smalltalk.send(self, "_tableOfContents", []), "_indexOf_", [aSelector]);
  120. return self;},
  121. args: ["aSelector"],
  122. source: unescape('indexOfLesson%3A%20aSelector%0A%09%5Eself%20tableOfContents%20indexOf%3A%20aSelector.'),
  123. messageSends: ["indexOf:", "tableOfContents"],
  124. referencedClasses: []
  125. }),
  126. smalltalk.AbstractTutorial);
  127. smalltalk.addMethod(
  128. '_tableOfContents',
  129. smalltalk.method({
  130. selector: 'tableOfContents',
  131. category: 'accessing',
  132. fn: function (){
  133. var self=this;
  134. return ["welcome", "testLesson", "theEnd"];
  135. return self;},
  136. args: [],
  137. 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'),
  138. messageSends: [],
  139. referencedClasses: []
  140. }),
  141. smalltalk.AbstractTutorial);
  142. smalltalk.addMethod(
  143. '_lessonAt_',
  144. smalltalk.method({
  145. selector: 'lessonAt:',
  146. category: 'accessing',
  147. fn: function (anInteger){
  148. var self=this;
  149. var lessonSelector=nil;
  150. lessonSelector=smalltalk.send(smalltalk.send(self, "_tableOfContents", []), "_at_", [anInteger]);
  151. return smalltalk.send(self, "_perform_", [lessonSelector]);
  152. return self;},
  153. args: ["anInteger"],
  154. 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.'),
  155. messageSends: ["at:", "tableOfContents", "perform:"],
  156. referencedClasses: []
  157. }),
  158. smalltalk.AbstractTutorial);
  159. smalltalk.addMethod(
  160. '_size',
  161. smalltalk.method({
  162. selector: 'size',
  163. category: 'accessing',
  164. fn: function (){
  165. var self=this;
  166. return smalltalk.send(smalltalk.send(self, "_tableOfContents", []), "_size", []);
  167. return self;},
  168. args: [],
  169. source: unescape('size%0A%09%5E%20self%20tableOfContents%20size'),
  170. messageSends: ["size", "tableOfContents"],
  171. referencedClasses: []
  172. }),
  173. smalltalk.AbstractTutorial);
  174. smalltalk.addMethod(
  175. '_welcome',
  176. smalltalk.method({
  177. selector: 'welcome',
  178. category: 'pages',
  179. fn: function (){
  180. var self=this;
  181. return smalltalk.send((smalltalk.Lesson || Lesson), "_title_contents_", ["Welcome", unescape("%22Hi%2C%20this%20is%20a%20test%20tutorial.%22")]);
  182. return self;},
  183. args: [],
  184. 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'),
  185. messageSends: ["title:contents:"],
  186. referencedClasses: []
  187. }),
  188. smalltalk.AbstractTutorial);
  189. smalltalk.addMethod(
  190. '_testLesson',
  191. smalltalk.method({
  192. selector: 'testLesson',
  193. category: 'pages',
  194. fn: function (){
  195. var self=this;
  196. return smalltalk.send((smalltalk.Lesson || Lesson), "_title_contents_", ["Test Lesson", unescape("%22This%20lesson%20is%20a%20test%22")]);
  197. return self;},
  198. args: [],
  199. 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'),
  200. messageSends: ["title:contents:"],
  201. referencedClasses: []
  202. }),
  203. smalltalk.AbstractTutorial);
  204. smalltalk.addMethod(
  205. '_theEnd',
  206. smalltalk.method({
  207. selector: 'theEnd',
  208. category: 'pages',
  209. fn: function (){
  210. var self=this;
  211. return smalltalk.send((smalltalk.Lesson || Lesson), "_title_contents_", ["The End", unescape("%22And%20that%27d%20be%20pretty%20much%20it%20%3A%29%22")]);
  212. return self;},
  213. args: [],
  214. 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'),
  215. messageSends: ["title:contents:"],
  216. referencedClasses: []
  217. }),
  218. smalltalk.AbstractTutorial);
  219. smalltalk.addClass('Lesson', smalltalk.Object, ['title', 'contents'], 'TrySmalltalk');
  220. smalltalk.addMethod(
  221. '_contents',
  222. smalltalk.method({
  223. selector: 'contents',
  224. category: 'accessing',
  225. fn: function (){
  226. var self=this;
  227. return (($receiver = self['@contents']) == nil || $receiver == undefined) ? (function(){return self['@contents']="";})() : $receiver;
  228. return self;},
  229. args: [],
  230. source: unescape('contents%0A%09%5E%20contents%20ifNil%3A%20%5Bcontents%20%3A%3D%20%27%27%5D'),
  231. messageSends: ["ifNil:"],
  232. referencedClasses: []
  233. }),
  234. smalltalk.Lesson);
  235. smalltalk.addMethod(
  236. '_contents_',
  237. smalltalk.method({
  238. selector: 'contents:',
  239. category: 'accessing',
  240. fn: function (aString){
  241. var self=this;
  242. self['@contents']=aString;
  243. return self;},
  244. args: ["aString"],
  245. source: unescape('contents%3A%20aString%0A%09contents%20%3A%3D%20aString'),
  246. messageSends: [],
  247. referencedClasses: []
  248. }),
  249. smalltalk.Lesson);
  250. smalltalk.addMethod(
  251. '_title_',
  252. smalltalk.method({
  253. selector: 'title:',
  254. category: 'accessing',
  255. fn: function (aString){
  256. var self=this;
  257. self['@title']=aString;
  258. return self;},
  259. args: ["aString"],
  260. source: unescape('title%3A%20aString%0A%09title%20%3A%3D%20aString'),
  261. messageSends: [],
  262. referencedClasses: []
  263. }),
  264. smalltalk.Lesson);
  265. smalltalk.addMethod(
  266. '_title',
  267. smalltalk.method({
  268. selector: 'title',
  269. category: 'accessing',
  270. fn: function (){
  271. var self=this;
  272. return (($receiver = self['@title']) == nil || $receiver == undefined) ? (function(){return self['@title']="";})() : $receiver;
  273. return self;},
  274. args: [],
  275. source: unescape('title%0A%09%5E%20title%20ifNil%3A%20%5Btitle%20%3A%3D%20%27%27%5D'),
  276. messageSends: ["ifNil:"],
  277. referencedClasses: []
  278. }),
  279. smalltalk.Lesson);
  280. smalltalk.addMethod(
  281. '_title_contents_',
  282. smalltalk.method({
  283. selector: 'title:contents:',
  284. category: 'instance creation',
  285. fn: function (aTitle, someContents){
  286. var self=this;
  287. return (function($rec){smalltalk.send($rec, "_title_", [aTitle]);return smalltalk.send($rec, "_contents_", [someContents]);})(smalltalk.send(self, "_new", []));
  288. return self;},
  289. args: ["aTitle", "someContents"],
  290. 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'),
  291. messageSends: ["title:", "contents:", "new"],
  292. referencedClasses: []
  293. }),
  294. smalltalk.Lesson.klass);
  295. smalltalk.addClass('TutorialPlayer', smalltalk.Object, ['tutorialPosition', 'tutorial'], 'TrySmalltalk');
  296. 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.')
  297. smalltalk.addMethod(
  298. '_currentLesson',
  299. smalltalk.method({
  300. selector: 'currentLesson',
  301. category: 'accessing',
  302. fn: function (){
  303. var self=this;
  304. return smalltalk.send(smalltalk.send(self, "_tutorial", []), "_lessonAt_", [smalltalk.send(self, "_tutorialPosition", [])]);
  305. return self;},
  306. args: [],
  307. source: unescape('currentLesson%0A%09%5E%20self%20tutorial%20lessonAt%3A%20self%20tutorialPosition.'),
  308. messageSends: ["lessonAt:", "tutorial", "tutorialPosition"],
  309. referencedClasses: []
  310. }),
  311. smalltalk.TutorialPlayer);
  312. smalltalk.addMethod(
  313. '_size',
  314. smalltalk.method({
  315. selector: 'size',
  316. category: 'accessing',
  317. fn: function (){
  318. var self=this;
  319. return smalltalk.send(smalltalk.send(self, "_tutorial", []), "_size", []);
  320. return self;},
  321. args: [],
  322. source: unescape('size%0A%09%5E%20self%20tutorial%20size'),
  323. messageSends: ["size", "tutorial"],
  324. referencedClasses: []
  325. }),
  326. smalltalk.TutorialPlayer);
  327. smalltalk.addMethod(
  328. '_tutorial',
  329. smalltalk.method({
  330. selector: 'tutorial',
  331. category: 'accessing',
  332. fn: function (){
  333. var self=this;
  334. return (($receiver = self['@tutorial']) == nil || $receiver == undefined) ? (function(){return self['@tutorial']=smalltalk.send((smalltalk.SmalltalkSyntaxTutorial || SmalltalkSyntaxTutorial), "_new", []);})() : $receiver;
  335. return self;},
  336. args: [],
  337. source: unescape('tutorial%0A%09%5E%20tutorial%20%20ifNil%3A%20%5Btutorial%20%3A%3D%20SmalltalkSyntaxTutorial%20new%5D'),
  338. messageSends: ["ifNil:", "new"],
  339. referencedClasses: []
  340. }),
  341. smalltalk.TutorialPlayer);
  342. smalltalk.addMethod(
  343. '_tutorial_',
  344. smalltalk.method({
  345. selector: 'tutorial:',
  346. category: 'accessing',
  347. fn: function (aTutorial){
  348. var self=this;
  349. self['@tutorial']=aTutorial;
  350. return self;},
  351. args: ["aTutorial"],
  352. source: unescape('tutorial%3A%20aTutorial%0A%09tutorial%20%3A%3D%20aTutorial'),
  353. messageSends: [],
  354. referencedClasses: []
  355. }),
  356. smalltalk.TutorialPlayer);
  357. smalltalk.addMethod(
  358. '_tutorialPosition',
  359. smalltalk.method({
  360. selector: 'tutorialPosition',
  361. category: 'accessing',
  362. fn: function (){
  363. var self=this;
  364. return (($receiver = self['@tutorialPosition']) == nil || $receiver == undefined) ? (function(){smalltalk.send(self, "_rewind", []);return self['@tutorialPosition'];})() : $receiver;
  365. return self;},
  366. args: [],
  367. source: unescape('tutorialPosition%20%0A%09%5E%20tutorialPosition%20%20ifNil%3A%20%5B%0A%09%09self%20rewind.%0A%09%09tutorialPosition.%0A%09%5D.'),
  368. messageSends: ["ifNil:", "rewind"],
  369. referencedClasses: []
  370. }),
  371. smalltalk.TutorialPlayer);
  372. smalltalk.addMethod(
  373. '_tutorialPosition_',
  374. smalltalk.method({
  375. selector: 'tutorialPosition:',
  376. category: 'accessing',
  377. fn: function (aTutorialPosition){
  378. var self=this;
  379. self['@tutorialPosition']=aTutorialPosition;
  380. return self;},
  381. args: ["aTutorialPosition"],
  382. source: unescape('tutorialPosition%3A%20aTutorialPosition%20%0A%09tutorialPosition%20%3A%3D%20aTutorialPosition'),
  383. messageSends: [],
  384. referencedClasses: []
  385. }),
  386. smalltalk.TutorialPlayer);
  387. smalltalk.addMethod(
  388. '_first',
  389. smalltalk.method({
  390. selector: 'first',
  391. category: 'navigation',
  392. fn: function (){
  393. var self=this;
  394. smalltalk.send(self, "_rewind", []);
  395. return smalltalk.send(self, "_currentLesson", []);
  396. return self;},
  397. args: [],
  398. source: unescape('first%0A%09self%20rewind.%0A%09%5E%20self%20currentLesson'),
  399. messageSends: ["rewind", "currentLesson"],
  400. referencedClasses: []
  401. }),
  402. smalltalk.TutorialPlayer);
  403. smalltalk.addMethod(
  404. '_last',
  405. smalltalk.method({
  406. selector: 'last',
  407. category: 'navigation',
  408. fn: function (){
  409. var self=this;
  410. self['@tutorialPosition']=smalltalk.send(self, "_size", []);
  411. return smalltalk.send(self, "_currentLesson", []);
  412. return self;},
  413. args: [],
  414. source: unescape('last%0A%09tutorialPosition%20%3A%3D%20self%20size.%0A%09%5E%20self%20currentLesson'),
  415. messageSends: ["size", "currentLesson"],
  416. referencedClasses: []
  417. }),
  418. smalltalk.TutorialPlayer);
  419. smalltalk.addMethod(
  420. '_next',
  421. smalltalk.method({
  422. selector: 'next',
  423. category: 'navigation',
  424. fn: function (){
  425. var self=this;
  426. (($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)]);})]);
  427. return smalltalk.send(self, "_currentLesson", []);
  428. return self;},
  429. args: [],
  430. 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'),
  431. messageSends: ["ifTrue:", unescape("%3C"), "tutorialPosition", "size", unescape("+"), "currentLesson"],
  432. referencedClasses: []
  433. }),
  434. smalltalk.TutorialPlayer);
  435. smalltalk.addMethod(
  436. '_previous',
  437. smalltalk.method({
  438. selector: 'previous',
  439. category: 'navigation',
  440. fn: function (){
  441. var self=this;
  442. (($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)]);})]);
  443. return smalltalk.send(self, "_currentLesson", []);
  444. return self;},
  445. args: [],
  446. 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'),
  447. messageSends: ["ifTrue:", unescape("%3E"), unescape("-"), "currentLesson"],
  448. referencedClasses: []
  449. }),
  450. smalltalk.TutorialPlayer);
  451. smalltalk.addMethod(
  452. '_rewind',
  453. smalltalk.method({
  454. selector: 'rewind',
  455. category: 'navigation',
  456. fn: function (){
  457. var self=this;
  458. self['@tutorialPosition']=(1);
  459. return self;},
  460. args: [],
  461. source: unescape('rewind%0A%09tutorialPosition%20%3A%3D%201.'),
  462. messageSends: [],
  463. referencedClasses: []
  464. }),
  465. smalltalk.TutorialPlayer);
  466. smalltalk.addClass('ProfStef', smalltalk.Object, ['tutorialPlayer', 'widget'], 'TrySmalltalk');
  467. 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')
  468. smalltalk.addMethod(
  469. '_tutorialPlayer',
  470. smalltalk.method({
  471. selector: 'tutorialPlayer',
  472. category: 'accessing',
  473. fn: function (){
  474. var self=this;
  475. return (($receiver = self['@tutorialPlayer']) == nil || $receiver == undefined) ? (function(){return self['@tutorialPlayer']=smalltalk.send((smalltalk.TutorialPlayer || TutorialPlayer), "_new", []);})() : $receiver;
  476. return self;},
  477. args: [],
  478. source: unescape('tutorialPlayer%0A%09%5E%20tutorialPlayer%20ifNil%3A%20%5BtutorialPlayer%20%3A%3D%20TutorialPlayer%20new%5D'),
  479. messageSends: ["ifNil:", "new"],
  480. referencedClasses: [smalltalk.TutorialPlayer]
  481. }),
  482. smalltalk.ProfStef);
  483. smalltalk.addMethod(
  484. '_progress',
  485. smalltalk.method({
  486. selector: 'progress',
  487. category: 'accessing',
  488. fn: function (){
  489. var self=this;
  490. 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")]);
  491. return self;},
  492. args: [],
  493. 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.'),
  494. messageSends: [unescape("%2C"), "tutorialPositionString", "tutorialSizeString"],
  495. referencedClasses: []
  496. }),
  497. smalltalk.ProfStef);
  498. smalltalk.addMethod(
  499. '_tutorialPositionString',
  500. smalltalk.method({
  501. selector: 'tutorialPositionString',
  502. category: 'accessing',
  503. fn: function (){
  504. var self=this;
  505. return smalltalk.send(smalltalk.send(smalltalk.send(self, "_tutorialPlayer", []), "_tutorialPosition", []), "_asString", []);
  506. return self;},
  507. args: [],
  508. source: unescape('tutorialPositionString%0A%09%5E%20self%20tutorialPlayer%20tutorialPosition%20asString.'),
  509. messageSends: ["asString", "tutorialPosition", "tutorialPlayer"],
  510. referencedClasses: []
  511. }),
  512. smalltalk.ProfStef);
  513. smalltalk.addMethod(
  514. '_tutorialSizeString',
  515. smalltalk.method({
  516. selector: 'tutorialSizeString',
  517. category: 'accessing',
  518. fn: function (){
  519. var self=this;
  520. return smalltalk.send(smalltalk.send(smalltalk.send(self, "_tutorialPlayer", []), "_size", []), "_asString", []);
  521. return self;},
  522. args: [],
  523. source: unescape('tutorialSizeString%0A%09%5E%20self%20tutorialPlayer%20size%20asString'),
  524. messageSends: ["asString", "size", "tutorialPlayer"],
  525. referencedClasses: []
  526. }),
  527. smalltalk.ProfStef);
  528. smalltalk.addMethod(
  529. '_widget_',
  530. smalltalk.method({
  531. selector: 'widget:',
  532. category: 'accessing',
  533. fn: function (aWidget){
  534. var self=this;
  535. self['@widget']=aWidget;
  536. return self;},
  537. args: ["aWidget"],
  538. source: unescape('widget%3A%20aWidget%0A%09widget%20%3A%3D%20aWidget'),
  539. messageSends: [],
  540. referencedClasses: []
  541. }),
  542. smalltalk.ProfStef);
  543. smalltalk.addMethod(
  544. '_showCurrentLesson',
  545. smalltalk.method({
  546. selector: 'showCurrentLesson',
  547. category: 'accessing',
  548. fn: function (){
  549. var self=this;
  550. var lesson=nil;
  551. lesson=smalltalk.send(smalltalk.send(self, "_tutorialPlayer", []), "_currentLesson", []);
  552. smalltalk.send(self['@widget'], "_contents_", [smalltalk.send(lesson, "_contents", [])]);
  553. smalltalk.send(self['@widget'], "_setTitle_", [smalltalk.send(smalltalk.send(smalltalk.send(lesson, "_title", []), "__comma", [" "]), "__comma", [smalltalk.send(self, "_progress", [])])]);
  554. return self;},
  555. args: [],
  556. 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.'),
  557. messageSends: ["currentLesson", "tutorialPlayer", "contents:", "contents", "setTitle:", unescape("%2C"), "title", "progress"],
  558. referencedClasses: []
  559. }),
  560. smalltalk.ProfStef);
  561. smalltalk.addMethod(
  562. '_first',
  563. smalltalk.method({
  564. selector: 'first',
  565. category: 'navigation',
  566. fn: function (){
  567. var self=this;
  568. smalltalk.send(smalltalk.send(self, "_tutorialPlayer", []), "_first", []);
  569. return smalltalk.send(self, "_showCurrentLesson", []);
  570. return self;},
  571. args: [],
  572. source: unescape('first%0A%09self%20tutorialPlayer%20first.%0A%09%5E%20self%20showCurrentLesson.'),
  573. messageSends: ["first", "tutorialPlayer", "showCurrentLesson"],
  574. referencedClasses: []
  575. }),
  576. smalltalk.ProfStef);
  577. smalltalk.addMethod(
  578. '_next',
  579. smalltalk.method({
  580. selector: 'next',
  581. category: 'navigation',
  582. fn: function (){
  583. var self=this;
  584. smalltalk.send(smalltalk.send(self, "_tutorialPlayer", []), "_next", []);
  585. return smalltalk.send(self, "_showCurrentLesson", []);
  586. return self;},
  587. args: [],
  588. source: unescape('next%0A%09self%20tutorialPlayer%20next.%0A%09%5E%20self%20showCurrentLesson.'),
  589. messageSends: ["next", "tutorialPlayer", "showCurrentLesson"],
  590. referencedClasses: []
  591. }),
  592. smalltalk.ProfStef);
  593. smalltalk.addMethod(
  594. '_previous',
  595. smalltalk.method({
  596. selector: 'previous',
  597. category: 'navigation',
  598. fn: function (){
  599. var self=this;
  600. smalltalk.send(smalltalk.send(self, "_tutorialPlayer", []), "_previous", []);
  601. return smalltalk.send(self, "_showCurrentLesson", []);
  602. return self;},
  603. args: [],
  604. source: unescape('previous%0A%09self%20tutorialPlayer%20previous.%0A%09%5E%20self%20showCurrentLesson.'),
  605. messageSends: ["previous", "tutorialPlayer", "showCurrentLesson"],
  606. referencedClasses: []
  607. }),
  608. smalltalk.ProfStef);
  609. smalltalk.ProfStef.klass.iVarNames = ['instance'];
  610. smalltalk.addMethod(
  611. '_default',
  612. smalltalk.method({
  613. selector: 'default',
  614. category: 'initialize',
  615. fn: function (){
  616. var self=this;
  617. return (($receiver = self['@instance']) == nil || $receiver == undefined) ? (function(){return self['@instance']=smalltalk.send(self, "_new", []);})() : $receiver;
  618. return self;},
  619. args: [],
  620. source: unescape('default%20%0A%09%5E%20instance%20ifNil%3A%20%5Binstance%20%3A%3D%20self%20new%5D'),
  621. messageSends: ["ifNil:", "new"],
  622. referencedClasses: []
  623. }),
  624. smalltalk.ProfStef.klass);
  625. smalltalk.addMethod(
  626. '_first',
  627. smalltalk.method({
  628. selector: 'first',
  629. category: 'navigation',
  630. fn: function (){
  631. var self=this;
  632. return smalltalk.send(smalltalk.send(self, "_default", []), "_first", []);
  633. return self;},
  634. args: [],
  635. source: unescape('first%0A%09%5E%20self%20default%20first.'),
  636. messageSends: ["first", "default"],
  637. referencedClasses: []
  638. }),
  639. smalltalk.ProfStef.klass);
  640. smalltalk.addMethod(
  641. '_previous',
  642. smalltalk.method({
  643. selector: 'previous',
  644. category: 'navigation',
  645. fn: function (){
  646. var self=this;
  647. return smalltalk.send(smalltalk.send(self, "_default", []), "_previous", []);
  648. return self;},
  649. args: [],
  650. source: unescape('previous%0A%09%5E%20self%20default%20previous.'),
  651. messageSends: ["previous", "default"],
  652. referencedClasses: []
  653. }),
  654. smalltalk.ProfStef.klass);
  655. smalltalk.addMethod(
  656. '_next',
  657. smalltalk.method({
  658. selector: 'next',
  659. category: 'navigation',
  660. fn: function (){
  661. var self=this;
  662. return smalltalk.send(smalltalk.send(self, "_default", []), "_next", []);
  663. return self;},
  664. args: [],
  665. source: unescape('next%0A%09%5E%20self%20default%20next.'),
  666. messageSends: ["next", "default"],
  667. referencedClasses: []
  668. }),
  669. smalltalk.ProfStef.klass);
  670. smalltalk.addMethod(
  671. '_go',
  672. smalltalk.method({
  673. selector: 'go',
  674. category: 'navigation',
  675. fn: function (){
  676. var self=this;
  677. smalltalk.send(self, "_first", []);
  678. return self;},
  679. args: [],
  680. source: unescape('go%0A%09self%20first.'),
  681. messageSends: ["first"],
  682. referencedClasses: []
  683. }),
  684. smalltalk.ProfStef.klass);
  685. smalltalk.addClass('SmalltalkSyntaxTutorial', smalltalk.AbstractTutorial, [], 'TrySmalltalk');
  686. smalltalk.SmalltalkSyntaxTutorial.comment=unescape('The%20default%20ProfStef%20tutorial%20to%20learn%20Smalltalk%20syntax')
  687. smalltalk.addMethod(
  688. '_tableOfContents',
  689. smalltalk.method({
  690. selector: 'tableOfContents',
  691. category: 'contents',
  692. fn: function (){
  693. var self=this;
  694. 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"];
  695. return self;},
  696. args: [],
  697. 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'),
  698. messageSends: [],
  699. referencedClasses: []
  700. }),
  701. smalltalk.SmalltalkSyntaxTutorial);
  702. smalltalk.addMethod(
  703. '_basicTypesArray',
  704. smalltalk.method({
  705. selector: 'basicTypesArray',
  706. category: 'pages',
  707. fn: function (){
  708. var self=this;
  709. 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.")]);
  710. return self;},
  711. args: [],
  712. 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'),
  713. messageSends: ["title:contents:"],
  714. referencedClasses: [smalltalk.Lesson]
  715. }),
  716. smalltalk.SmalltalkSyntaxTutorial);
  717. smalltalk.addMethod(
  718. '_basicTypesCharacters',
  719. smalltalk.method({
  720. selector: 'basicTypesCharacters',
  721. category: 'pages',
  722. fn: function (){
  723. var self=this;
  724. 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.")]);
  725. return self;},
  726. args: [],
  727. 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'),
  728. messageSends: ["title:contents:"],
  729. referencedClasses: [smalltalk.Lesson]
  730. }),
  731. smalltalk.SmalltalkSyntaxTutorial);
  732. smalltalk.addMethod(
  733. '_basicTypesDynamicArray',
  734. smalltalk.method({
  735. selector: 'basicTypesDynamicArray',
  736. category: 'pages',
  737. fn: function (){
  738. var self=this;
  739. 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.")]);
  740. return self;},
  741. args: [],
  742. 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'),
  743. messageSends: ["title:contents:"],
  744. referencedClasses: [smalltalk.Lesson]
  745. }),
  746. smalltalk.SmalltalkSyntaxTutorial);
  747. smalltalk.addMethod(
  748. '_basicTypesNumbers',
  749. smalltalk.method({
  750. selector: 'basicTypesNumbers',
  751. category: 'pages',
  752. fn: function (){
  753. var self=this;
  754. 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.")]);
  755. return self;},
  756. args: [],
  757. 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'),
  758. messageSends: ["title:contents:"],
  759. referencedClasses: [smalltalk.Lesson]
  760. }),
  761. smalltalk.SmalltalkSyntaxTutorial);
  762. smalltalk.addMethod(
  763. '_basicTypesString',
  764. smalltalk.method({
  765. selector: 'basicTypesString',
  766. category: 'pages',
  767. fn: function (){
  768. var self=this;
  769. 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.")]);
  770. return self;},
  771. args: [],
  772. 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'),
  773. messageSends: ["title:contents:"],
  774. referencedClasses: [smalltalk.Lesson]
  775. }),
  776. smalltalk.SmalltalkSyntaxTutorial);
  777. smalltalk.addMethod(
  778. '_basicTypesSymbol',
  779. smalltalk.method({
  780. selector: 'basicTypesSymbol',
  781. category: 'pages',
  782. fn: function (){
  783. var self=this;
  784. 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.")]);
  785. return self;},
  786. args: [],
  787. 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'),
  788. messageSends: ["title:contents:"],
  789. referencedClasses: [smalltalk.Lesson]
  790. }),
  791. smalltalk.SmalltalkSyntaxTutorial);
  792. smalltalk.addMethod(
  793. '_blocks',
  794. smalltalk.method({
  795. selector: 'blocks',
  796. category: 'pages',
  797. fn: function (){
  798. var self=this;
  799. 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.")]);
  800. return self;},
  801. args: [],
  802. 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'),
  803. messageSends: ["title:contents:"],
  804. referencedClasses: [smalltalk.Lesson]
  805. }),
  806. smalltalk.SmalltalkSyntaxTutorial);
  807. smalltalk.addMethod(
  808. '_blocksAssignation',
  809. smalltalk.method({
  810. selector: 'blocksAssignation',
  811. category: 'pages',
  812. fn: function (){
  813. var self=this;
  814. 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.")]);
  815. return self;},
  816. args: [],
  817. 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'),
  818. messageSends: ["title:contents:"],
  819. referencedClasses: [smalltalk.Lesson]
  820. }),
  821. smalltalk.SmalltalkSyntaxTutorial);
  822. smalltalk.addMethod(
  823. '_conditionals',
  824. smalltalk.method({
  825. selector: 'conditionals',
  826. category: 'pages',
  827. fn: function (){
  828. var self=this;
  829. 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.")]);
  830. return self;},
  831. args: [],
  832. 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.'),
  833. messageSends: ["title:contents:"],
  834. referencedClasses: [smalltalk.Lesson]
  835. }),
  836. smalltalk.SmalltalkSyntaxTutorial);
  837. smalltalk.addMethod(
  838. '_debugger',
  839. smalltalk.method({
  840. selector: 'debugger',
  841. category: 'pages',
  842. fn: function (){
  843. var self=this;
  844. 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")]);
  845. return self;},
  846. args: [],
  847. 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'),
  848. messageSends: ["title:contents:"],
  849. referencedClasses: [smalltalk.Lesson]
  850. }),
  851. smalltalk.SmalltalkSyntaxTutorial);
  852. smalltalk.addMethod(
  853. '_doingVSPrinting',
  854. smalltalk.method({
  855. selector: 'doingVSPrinting',
  856. category: 'pages',
  857. fn: function (){
  858. var self=this;
  859. 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.")]);
  860. return self;},
  861. args: [],
  862. 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'),
  863. messageSends: ["title:contents:"],
  864. referencedClasses: [smalltalk.Lesson]
  865. }),
  866. smalltalk.SmalltalkSyntaxTutorial);
  867. smalltalk.addMethod(
  868. '_instanciation',
  869. smalltalk.method({
  870. selector: 'instanciation',
  871. category: 'pages',
  872. fn: function (){
  873. var self=this;
  874. 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")]);
  875. return self;},
  876. args: [],
  877. 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'),
  878. messageSends: ["title:contents:"],
  879. referencedClasses: [smalltalk.Lesson]
  880. }),
  881. smalltalk.SmalltalkSyntaxTutorial);
  882. smalltalk.addMethod(
  883. '_iterators',
  884. smalltalk.method({
  885. selector: 'iterators',
  886. category: 'pages',
  887. fn: function (){
  888. var self=this;
  889. 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.")]);
  890. return self;},
  891. args: [],
  892. 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'),
  893. messageSends: ["title:contents:"],
  894. referencedClasses: [smalltalk.Lesson]
  895. }),
  896. smalltalk.SmalltalkSyntaxTutorial);
  897. smalltalk.addMethod(
  898. '_loops',
  899. smalltalk.method({
  900. selector: 'loops',
  901. category: 'pages',
  902. fn: function (){
  903. var self=this;
  904. 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.")]);
  905. return self;},
  906. args: [],
  907. 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'),
  908. messageSends: ["title:contents:"],
  909. referencedClasses: [smalltalk.Lesson]
  910. }),
  911. smalltalk.SmalltalkSyntaxTutorial);
  912. smalltalk.addMethod(
  913. '_mathematicalPrecedence',
  914. smalltalk.method({
  915. selector: 'mathematicalPrecedence',
  916. category: 'pages',
  917. fn: function (){
  918. var self=this;
  919. 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.")]);
  920. return self;},
  921. args: [],
  922. 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'),
  923. messageSends: ["title:contents:"],
  924. referencedClasses: [smalltalk.Lesson]
  925. }),
  926. smalltalk.SmalltalkSyntaxTutorial);
  927. smalltalk.addMethod(
  928. '_messageSyntaxBinary',
  929. smalltalk.method({
  930. selector: 'messageSyntaxBinary',
  931. category: 'pages',
  932. fn: function (){
  933. var self=this;
  934. 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.")]);
  935. return self;},
  936. args: [],
  937. 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'),
  938. messageSends: ["title:contents:"],
  939. referencedClasses: [smalltalk.Lesson]
  940. }),
  941. smalltalk.SmalltalkSyntaxTutorial);
  942. smalltalk.addMethod(
  943. '_messageSyntaxCascade',
  944. smalltalk.method({
  945. selector: 'messageSyntaxCascade',
  946. category: 'pages',
  947. fn: function (){
  948. var self=this;
  949. 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")]);
  950. return self;},
  951. args: [],
  952. 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.'),
  953. messageSends: ["title:contents:"],
  954. referencedClasses: [smalltalk.Lesson]
  955. }),
  956. smalltalk.SmalltalkSyntaxTutorial);
  957. smalltalk.addMethod(
  958. '_messageSyntaxCascadeShouldNotBeHere',
  959. smalltalk.method({
  960. selector: 'messageSyntaxCascadeShouldNotBeHere',
  961. category: 'pages',
  962. fn: function (){
  963. var self=this;
  964. 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.")]);
  965. return self;},
  966. args: [],
  967. 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.'),
  968. messageSends: ["title:contents:"],
  969. referencedClasses: [smalltalk.Lesson]
  970. }),
  971. smalltalk.SmalltalkSyntaxTutorial);
  972. smalltalk.addMethod(
  973. '_messageSyntaxExecutionOrder',
  974. smalltalk.method({
  975. selector: 'messageSyntaxExecutionOrder',
  976. category: 'pages',
  977. fn: function (){
  978. var self=this;
  979. 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.")]);
  980. return self;},
  981. args: [],
  982. 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'),
  983. messageSends: ["title:contents:"],
  984. referencedClasses: [smalltalk.Lesson]
  985. }),
  986. smalltalk.SmalltalkSyntaxTutorial);
  987. smalltalk.addMethod(
  988. '_messageSyntaxExecutionOrderParentheses',
  989. smalltalk.method({
  990. selector: 'messageSyntaxExecutionOrderParentheses',
  991. category: 'pages',
  992. fn: function (){
  993. var self=this;
  994. 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.")]);
  995. return self;},
  996. args: [],
  997. 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'),
  998. messageSends: ["title:contents:"],
  999. referencedClasses: [smalltalk.Lesson]
  1000. }),
  1001. smalltalk.SmalltalkSyntaxTutorial);
  1002. smalltalk.addMethod(
  1003. '_messageSyntaxKeyword',
  1004. smalltalk.method({
  1005. selector: 'messageSyntaxKeyword',
  1006. category: 'pages',
  1007. fn: function (){
  1008. var self=this;
  1009. 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.")]);
  1010. return self;},
  1011. args: [],
  1012. 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'),
  1013. messageSends: ["title:contents:"],
  1014. referencedClasses: [smalltalk.Lesson]
  1015. }),
  1016. smalltalk.SmalltalkSyntaxTutorial);
  1017. smalltalk.addMethod(
  1018. '_messageSyntaxUnary',
  1019. smalltalk.method({
  1020. selector: 'messageSyntaxUnary',
  1021. category: 'pages',
  1022. fn: function (){
  1023. var self=this;
  1024. 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.")]);
  1025. return self;},
  1026. args: [],
  1027. 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'),
  1028. messageSends: ["title:contents:"],
  1029. referencedClasses: [smalltalk.Lesson]
  1030. }),
  1031. smalltalk.SmalltalkSyntaxTutorial);
  1032. smalltalk.addMethod(
  1033. '_pharoEnvironment',
  1034. smalltalk.method({
  1035. selector: 'pharoEnvironment',
  1036. category: 'pages',
  1037. fn: function (){
  1038. var self=this;
  1039. 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.")]);
  1040. return self;},
  1041. args: [],
  1042. 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'),
  1043. messageSends: ["title:contents:"],
  1044. referencedClasses: [smalltalk.Lesson]
  1045. }),
  1046. smalltalk.SmalltalkSyntaxTutorial);
  1047. smalltalk.addMethod(
  1048. '_printing',
  1049. smalltalk.method({
  1050. selector: 'printing',
  1051. category: 'pages',
  1052. fn: function (){
  1053. var self=this;
  1054. 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.")]);
  1055. return self;},
  1056. args: [],
  1057. 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'),
  1058. messageSends: ["title:contents:"],
  1059. referencedClasses: [smalltalk.Lesson]
  1060. }),
  1061. smalltalk.SmalltalkSyntaxTutorial);
  1062. smalltalk.addMethod(
  1063. '_reflection',
  1064. smalltalk.method({
  1065. selector: 'reflection',
  1066. category: 'pages',
  1067. fn: function (){
  1068. var self=this;
  1069. 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.")]);
  1070. return self;},
  1071. args: [],
  1072. 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'),
  1073. messageSends: ["title:contents:"],
  1074. referencedClasses: [smalltalk.Lesson]
  1075. }),
  1076. smalltalk.SmalltalkSyntaxTutorial);
  1077. smalltalk.addMethod(
  1078. '_reflectionContinued',
  1079. smalltalk.method({
  1080. selector: 'reflectionContinued',
  1081. category: 'pages',
  1082. fn: function (){
  1083. var self=this;
  1084. 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")]);
  1085. return self;},
  1086. args: [],
  1087. 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'),
  1088. messageSends: ["title:contents:"],
  1089. referencedClasses: [smalltalk.Lesson]
  1090. }),
  1091. smalltalk.SmalltalkSyntaxTutorial);
  1092. smalltalk.addMethod(
  1093. '_theEnd',
  1094. smalltalk.method({
  1095. selector: 'theEnd',
  1096. category: 'pages',
  1097. fn: function (){
  1098. var self=this;
  1099. 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")]);
  1100. return self;},
  1101. args: [],
  1102. 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'),
  1103. messageSends: ["title:contents:"],
  1104. referencedClasses: [smalltalk.Lesson]
  1105. }),
  1106. smalltalk.SmalltalkSyntaxTutorial);
  1107. smalltalk.addMethod(
  1108. '_welcome',
  1109. smalltalk.method({
  1110. selector: 'welcome',
  1111. category: 'pages',
  1112. fn: function (){
  1113. var self=this;
  1114. 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.")]);
  1115. return self;},
  1116. args: [],
  1117. 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'),
  1118. messageSends: ["title:contents:"],
  1119. referencedClasses: [smalltalk.Lesson]
  1120. }),
  1121. smalltalk.SmalltalkSyntaxTutorial);