2
0

Documentation.js 92 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376
  1. smalltalk.addPackage('Documentation', {});
  2. smalltalk.addClass('DocumentationBuilder', smalltalk.Object, ['chapters', 'announcer', 'widget'], 'Documentation');
  3. smalltalk.addMethod(
  4. unescape('_chapters'),
  5. smalltalk.method({
  6. selector: unescape('chapters'),
  7. category: 'accessing',
  8. fn: function (){
  9. var self=this;
  10. return (($receiver = self['@chapters']) == nil || $receiver == undefined) ? (function(){return (self['@chapters']=smalltalk.send(self, "_buildChapters", []));})() : $receiver;
  11. return self;},
  12. args: [],
  13. source: unescape('chapters%0A%09%5Echapters%20ifNil%3A%20%5Bchapters%20%3A%3D%20self%20buildChapters%5D'),
  14. messageSends: ["ifNil:", "buildChapters"],
  15. referencedClasses: []
  16. }),
  17. smalltalk.DocumentationBuilder);
  18. smalltalk.addMethod(
  19. unescape('_announcer'),
  20. smalltalk.method({
  21. selector: unescape('announcer'),
  22. category: 'accessing',
  23. fn: function (){
  24. var self=this;
  25. return (($receiver = self['@announcer']) == nil || $receiver == undefined) ? (function(){return (self['@announcer']=smalltalk.send((smalltalk.Announcer || Announcer), "_new", []));})() : $receiver;
  26. return self;},
  27. args: [],
  28. source: unescape('announcer%0A%09%5Eannouncer%20ifNil%3A%20%5Bannouncer%20%3A%3D%20Announcer%20new%5D'),
  29. messageSends: ["ifNil:", "new"],
  30. referencedClasses: ["Announcer"]
  31. }),
  32. smalltalk.DocumentationBuilder);
  33. smalltalk.addMethod(
  34. unescape('_widget'),
  35. smalltalk.method({
  36. selector: unescape('widget'),
  37. category: 'accessing',
  38. fn: function (){
  39. var self=this;
  40. return (($receiver = self['@widget']) == nil || $receiver == undefined) ? (function(){return (self['@widget']=smalltalk.send((smalltalk.DocumentationWidget || DocumentationWidget), "_on_", [self]));})() : $receiver;
  41. return self;},
  42. args: [],
  43. source: unescape('widget%0A%09%5Ewidget%20ifNil%3A%20%5Bwidget%20%3A%3D%20DocumentationWidget%20on%3A%20self%5D'),
  44. messageSends: ["ifNil:", "on:"],
  45. referencedClasses: ["DocumentationWidget"]
  46. }),
  47. smalltalk.DocumentationBuilder);
  48. smalltalk.addMethod(
  49. unescape('_buildChapters'),
  50. smalltalk.method({
  51. selector: unescape('buildChapters'),
  52. category: 'building',
  53. fn: function (){
  54. var self=this;
  55. return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "_methodDictionary", []), "_values", []), "_sorted_", [(function(a, b){return ((($receiver = smalltalk.send(a, "_selector", [])).klass === smalltalk.Number) ? $receiver <smalltalk.send(b, "_selector", []) : smalltalk.send($receiver, "__lt", [smalltalk.send(b, "_selector", [])]));})]), "_select_", [(function(each){return smalltalk.send(smalltalk.send(each, "_category", []), "__eq", ["chapters"]);})]), "_collect_", [(function(each){return smalltalk.send(self, "_perform_", [smalltalk.send(each, "_selector", [])]);})]);
  56. return self;},
  57. args: [],
  58. source: unescape('buildChapters%0A%09%5E%28%28self%20class%20methodDictionary%20values%20sorted%3A%20%5B%3Aa%20%3Ab%20%7C%20a%20selector%20%3C%20b%20selector%5D%29%0A%09%09select%3A%20%5B%3Aeach%20%7C%20each%20category%20%3D%20%27chapters%27%5D%29%0A%09%09collect%3A%20%5B%3Aeach%20%7C%20self%20perform%3A%20each%20selector%5D'),
  59. messageSends: ["collect:", "select:", "sorted:", "values", "methodDictionary", "class", unescape("%3C"), "selector", unescape("%3D"), "category", "perform:"],
  60. referencedClasses: []
  61. }),
  62. smalltalk.DocumentationBuilder);
  63. smalltalk.addMethod(
  64. unescape('_buildOn_'),
  65. smalltalk.method({
  66. selector: unescape('buildOn%3A'),
  67. category: 'building',
  68. fn: function (aCanvas){
  69. var self=this;
  70. smalltalk.send(aCanvas, "_with_", [smalltalk.send(self, "_widget", [])]);
  71. (function($rec){smalltalk.send($rec, "_checkHashChange", []);return smalltalk.send($rec, "_checkHash", []);})(self);
  72. return self;},
  73. args: ["aCanvas"],
  74. source: unescape('buildOn%3A%20aCanvas%0A%09aCanvas%20with%3A%20self%20widget.%0A%09self%20%0A%09%09checkHashChange%3B%0A%09%09checkHash'),
  75. messageSends: ["with:", "widget", "checkHashChange", "checkHash"],
  76. referencedClasses: []
  77. }),
  78. smalltalk.DocumentationBuilder);
  79. smalltalk.addMethod(
  80. unescape('_buildOnJQuery_'),
  81. smalltalk.method({
  82. selector: unescape('buildOnJQuery%3A'),
  83. category: 'building',
  84. fn: function (aJQuery){
  85. var self=this;
  86. smalltalk.send(self, "_buildOn_", [smalltalk.send((smalltalk.HTMLCanvas || HTMLCanvas), "_onJQuery_", [aJQuery])]);
  87. return self;},
  88. args: ["aJQuery"],
  89. source: unescape('buildOnJQuery%3A%20aJQuery%0A%09self%20buildOn%3A%20%28HTMLCanvas%20onJQuery%3A%20aJQuery%29'),
  90. messageSends: ["buildOn:", "onJQuery:"],
  91. referencedClasses: ["HTMLCanvas"]
  92. }),
  93. smalltalk.DocumentationBuilder);
  94. smalltalk.addMethod(
  95. unescape('_build'),
  96. smalltalk.method({
  97. selector: unescape('build'),
  98. category: 'building',
  99. fn: function (){
  100. var self=this;
  101. smalltalk.send(self, "_buildOnJQuery_", [smalltalk.send("body", "_asJQuery", [])]);
  102. return self;},
  103. args: [],
  104. source: unescape('build%0A%09self%20buildOnJQuery%3A%20%28%27body%27%20asJQuery%29'),
  105. messageSends: ["buildOnJQuery:", "asJQuery"],
  106. referencedClasses: []
  107. }),
  108. smalltalk.DocumentationBuilder);
  109. smalltalk.addMethod(
  110. unescape('_ch1introduction'),
  111. smalltalk.method({
  112. selector: unescape('ch1introduction'),
  113. category: 'chapters',
  114. fn: function (){
  115. var self=this;
  116. return (function($rec){smalltalk.send($rec, "_title_", ["Introduction"]);return smalltalk.send($rec, "_contents_", [unescape("%0A%0A%23%23Amber%20Smalltalk%20in%20a%20nutshell%0A%0AAmber%20is%20an%20implementation%20of%20the%20Smalltalk-80%20language.%20It%20is%20designed%20to%20make%20client-side%20web%20development%20**faster%2C%20easier%20and%20more%20fun**%20as%20it%20allows%20developers%20to%20write%20HTML5%20applications%20in%20a%20live%20Smalltalk%20environment%21%0A%0AAmber%20is%20written%20in%20itself%2C%20including%20the%20IDE%20and%20the%20compiler%20and%20it%20runs%20**directly%20inside%20your%20browser**.%20The%20IDE%20is%20fairly%20complete%20with%20a%20class%20browser%2C%20workspace%2C%20transcript%2C%20unit%20test%20runner%2C%20object%20inspectors%2C%20cross%20reference%20tools%20and%20even%20a%20debugger.%0A%0ANoteworthy%20features%3A%0A%0A-%20Amber%20is%20semantically%20and%20syntactically%20very%20close%20to%20%5BPharo%20Smalltalk%5D%28http%3A//www.pharo-project.org%29.%20Pharo%20is%20considered%20the%20reference%20implementation.%0A-%20Amber%20**seamlessly%20interacts%20with%20JavaScript**%20and%20can%20use%20its%20full%20eco%20system%20of%20libraries%20without%20any%20glue%20code%20needed.%0A-%20Amber%20**has%20no%20dependencies**%20and%20can%20be%20used%20in%20any%20JavaScript%20runtime%2C%20not%20only%20inside%20browsers.%20An%20important%20example%20is%20%5BNode.js%5D%28http%3A//nodejs.org%29.%0A-%20Amber%20is%20a%20live%20Smalltalk%20that%20**compiles%20incrementally%20into%20efficient%20JavaScript**%20often%20mapping%20one-to-one%20with%20JavaScript%20equivalents.%0A-%20Amber%20has%20a%20**Seaside%20influenced%20canvas%20library**%20to%20dynamically%20generate%20HTML.%0A%0A%23%23%20Arguments%20for%20using%20Amber%0AIn%20our%20humble%20opinion%20the%20main%20arguments%20for%20using%20Amber%20are%3A%0A%0A-%20JavaScript%20is%20quite%20a%20broken%20language%20with%20lots%20of%20traps%20and%20odd%20quirks.%20It%20is%20the%20assembler%20of%20the%20Internet%20which%20is%20cool%2C%20but%20we%20don%27t%20want%20to%20write%20in%20it.%0A-%20Smalltalk%20as%20a%20language%20is%20immensely%20cleaner%20and%20more%20mature%2C%20both%20syntactically%20and%20semantically.%0A-%20Smalltalk%20has%20a%20simple%20class%20model%20with%20a%20lightweight%20syntax%20for%20closures%2C%20it%20is%20in%20many%20ways%20a%20perfect%20match%20for%20the%20Good%20Parts%20of%20JavaScript.%0A-%20Having%20a%20true%20live%20interactive%20incremental%20development%20environment%20where%20you%20can%20build%20your%20application%20directly%20in%20the%20browser%20is%20unbeatable.%0A%0A%23%23%20Disclaimer%0A%0AThis%20documentation%20doesn%27t%20aim%20to%20teach%20Smalltalk.%20%0AKnowledge%20of%20Smalltalk%20is%20needed%20to%20understand%20the%20topics%20covered%20in%20this%20documentation.%20%0AIf%20you%20want%20to%20learn%20the%20Smalltalk%20language%2C%20you%20can%20read%20the%20excellent%20%5BPharo%20By%20Example%5D%28http%3A//www.pharobyexample.org%29%20book.%0A")]);})(smalltalk.send((smalltalk.DocChapter || DocChapter), "_new", []));
  117. return self;},
  118. args: [],
  119. source: unescape('ch1introduction%0A%09%5EDocChapter%20new%0A%09%09title%3A%20%27Introduction%27%3B%0A%09%09contents%3A%20%27%0A%0A%23%23Amber%20Smalltalk%20in%20a%20nutshell%0A%0AAmber%20is%20an%20implementation%20of%20the%20Smalltalk-80%20language.%20It%20is%20designed%20to%20make%20client-side%20web%20development%20**faster%2C%20easier%20and%20more%20fun**%20as%20it%20allows%20developers%20to%20write%20HTML5%20applications%20in%20a%20live%20Smalltalk%20environment%21%0A%0AAmber%20is%20written%20in%20itself%2C%20including%20the%20IDE%20and%20the%20compiler%20and%20it%20runs%20**directly%20inside%20your%20browser**.%20The%20IDE%20is%20fairly%20complete%20with%20a%20class%20browser%2C%20workspace%2C%20transcript%2C%20unit%20test%20runner%2C%20object%20inspectors%2C%20cross%20reference%20tools%20and%20even%20a%20debugger.%0A%0ANoteworthy%20features%3A%0A%0A-%20Amber%20is%20semantically%20and%20syntactically%20very%20close%20to%20%5BPharo%20Smalltalk%5D%28http%3A//www.pharo-project.org%29.%20Pharo%20is%20considered%20the%20reference%20implementation.%0A-%20Amber%20**seamlessly%20interacts%20with%20JavaScript**%20and%20can%20use%20its%20full%20eco%20system%20of%20libraries%20without%20any%20glue%20code%20needed.%0A-%20Amber%20**has%20no%20dependencies**%20and%20can%20be%20used%20in%20any%20JavaScript%20runtime%2C%20not%20only%20inside%20browsers.%20An%20important%20example%20is%20%5BNode.js%5D%28http%3A//nodejs.org%29.%0A-%20Amber%20is%20a%20live%20Smalltalk%20that%20**compiles%20incrementally%20into%20efficient%20JavaScript**%20often%20mapping%20one-to-one%20with%20JavaScript%20equivalents.%0A-%20Amber%20has%20a%20**Seaside%20influenced%20canvas%20library**%20to%20dynamically%20generate%20HTML.%0A%0A%23%23%20Arguments%20for%20using%20Amber%0AIn%20our%20humble%20opinion%20the%20main%20arguments%20for%20using%20Amber%20are%3A%0A%0A-%20JavaScript%20is%20quite%20a%20broken%20language%20with%20lots%20of%20traps%20and%20odd%20quirks.%20It%20is%20the%20assembler%20of%20the%20Internet%20which%20is%20cool%2C%20but%20we%20don%27%27t%20want%20to%20write%20in%20it.%0A-%20Smalltalk%20as%20a%20language%20is%20immensely%20cleaner%20and%20more%20mature%2C%20both%20syntactically%20and%20semantically.%0A-%20Smalltalk%20has%20a%20simple%20class%20model%20with%20a%20lightweight%20syntax%20for%20closures%2C%20it%20is%20in%20many%20ways%20a%20perfect%20match%20for%20the%20Good%20Parts%20of%20JavaScript.%0A-%20Having%20a%20true%20live%20interactive%20incremental%20development%20environment%20where%20you%20can%20build%20your%20application%20directly%20in%20the%20browser%20is%20unbeatable.%0A%0A%23%23%20Disclaimer%0A%0AThis%20documentation%20doesn%27%27t%20aim%20to%20teach%20Smalltalk.%20%0AKnowledge%20of%20Smalltalk%20is%20needed%20to%20understand%20the%20topics%20covered%20in%20this%20documentation.%20%0AIf%20you%20want%20to%20learn%20the%20Smalltalk%20language%2C%20you%20can%20read%20the%20excellent%20%5BPharo%20By%20Example%5D%28http%3A//www.pharobyexample.org%29%20book.%0A%27'),
  120. messageSends: ["title:", "contents:", "new"],
  121. referencedClasses: ["DocChapter"]
  122. }),
  123. smalltalk.DocumentationBuilder);
  124. smalltalk.addMethod(
  125. unescape('_ch2differencesWithOtherSmalltalks'),
  126. smalltalk.method({
  127. selector: unescape('ch2differencesWithOtherSmalltalks'),
  128. category: 'chapters',
  129. fn: function (){
  130. var self=this;
  131. return (function($rec){smalltalk.send($rec, "_title_", ["Differences with other Smalltalks"]);return smalltalk.send($rec, "_contents_", [unescape("%0AAmber%20has%20some%20differences%20with%20other%20Smalltalk%20implementations.%20This%20makes%20porting%20code%20a%20non-trivial%20thing%2C%20but%20still%20quite%20manageable.%0ABecause%20it%20maps%20Smalltalk%20constructs%20one-to-one%20with%20the%20JavaScript%20equivalent%2C%20including%20Smalltalk%20classes%20to%20JavaScript%20constructors%2C%20the%20core%20class%20library%20is%20simplified%20compared%20to%20Pharo%20Smalltalk.%0AAnd%20since%20we%20want%20Amber%20to%20be%20useful%20in%20building%20lean%20browser%20apps%20we%20can%27t%20let%20it%20bloat%20too%20much.%0A%0ABut%20apart%20from%20missing%20things%20other%20Smalltalks%20may%20have%2C%20there%20are%20also%20things%20that%20are%20plain%20different%3A%0A%0A-%20The%20collection%20class%20hierarchy%20is%20much%20simpler%20compared%20to%20most%20Smalltalk%20implementations.%20In%20part%20this%20is%20because%20we%20want%20to%20map%20reasonably%20well%20with%20JavaScript%20counter%20parts.%0A-%20As%20of%20today%2C%20there%20is%20no%20SortedCollection.%20The%20size%20of%20arrays%20is%20dynamic%2C%20and%20they%20behave%20like%20an%20ordered%20collection.%20They%20can%20also%20be%20sorted%20with%20the%20%60%23sort*%60%20methods.%0A-%20The%20%60Date%60%20class%20behaves%20like%20the%20%60Date%60%20and%20%60TimeStamp%60%20classes%20in%20Pharo%20Smalltalk.%20Therefore%20both%20%60Date%20today%60%20and%20%60Date%20now%60%20are%20valid%20in%20Amber.%0A-%20Amber%20does%20not%20have%20class%20Character%2C%20but%20%60String%60%20does%20implement%20some%20of%20Character%20behavior%20so%20a%20single%20character%20String%20can%20work%20as%20a%20Character.%0A-%20Amber%20does%20support%20**class%20instance%20variables**%2C%20but%20not%20class%20variables.%0A-%20Amber%20only%20has%20global%20classes%20and%20packages%2C%20but%20not%20arbitrary%20objects.%20Use%20classes%20instead%20like%20%60Smalltalk%20current%60%20instead%20of%20%60Smalltalk%60%20etc.%0A-%20Amber%20does%20not%20support%20pool%20dictionaries.%0A-%20Amber%20uses%20**%3C%20...javascript%20code...%20%3E**%20to%20inline%20JavaScript%20code%20and%20does%20not%20have%20pragmas.%0A-%20Amber%20does%20not%20have%20class%20categories.%20The%20left%20side%20in%20the%20browser%20lists%20real%20Packages%2C%20but%20they%20feel%20much%20the%20same.%0A")]);})(smalltalk.send((smalltalk.DocChapter || DocChapter), "_new", []));
  132. return self;},
  133. args: [],
  134. source: unescape('ch2differencesWithOtherSmalltalks%0A%09%5EDocChapter%20new%0A%09%09title%3A%20%27Differences%20with%20other%20Smalltalks%27%3B%0A%09%09contents%3A%20%27%0AAmber%20has%20some%20differences%20with%20other%20Smalltalk%20implementations.%20This%20makes%20porting%20code%20a%20non-trivial%20thing%2C%20but%20still%20quite%20manageable.%0ABecause%20it%20maps%20Smalltalk%20constructs%20one-to-one%20with%20the%20JavaScript%20equivalent%2C%20including%20Smalltalk%20classes%20to%20JavaScript%20constructors%2C%20the%20core%20class%20library%20is%20simplified%20compared%20to%20Pharo%20Smalltalk.%0AAnd%20since%20we%20want%20Amber%20to%20be%20useful%20in%20building%20lean%20browser%20apps%20we%20can%27%27t%20let%20it%20bloat%20too%20much.%0A%0ABut%20apart%20from%20missing%20things%20other%20Smalltalks%20may%20have%2C%20there%20are%20also%20things%20that%20are%20plain%20different%3A%0A%0A-%20The%20collection%20class%20hierarchy%20is%20much%20simpler%20compared%20to%20most%20Smalltalk%20implementations.%20In%20part%20this%20is%20because%20we%20want%20to%20map%20reasonably%20well%20with%20JavaScript%20counter%20parts.%0A-%20As%20of%20today%2C%20there%20is%20no%20SortedCollection.%20The%20size%20of%20arrays%20is%20dynamic%2C%20and%20they%20behave%20like%20an%20ordered%20collection.%20They%20can%20also%20be%20sorted%20with%20the%20%60%23sort*%60%20methods.%0A-%20The%20%60Date%60%20class%20behaves%20like%20the%20%60Date%60%20and%20%60TimeStamp%60%20classes%20in%20Pharo%20Smalltalk.%20Therefore%20both%20%60Date%20today%60%20and%20%60Date%20now%60%20are%20valid%20in%20Amber.%0A-%20Amber%20does%20not%20have%20class%20Character%2C%20but%20%60String%60%20does%20implement%20some%20of%20Character%20behavior%20so%20a%20single%20character%20String%20can%20work%20as%20a%20Character.%0A-%20Amber%20does%20support%20**class%20instance%20variables**%2C%20but%20not%20class%20variables.%0A-%20Amber%20only%20has%20global%20classes%20and%20packages%2C%20but%20not%20arbitrary%20objects.%20Use%20classes%20instead%20like%20%60Smalltalk%20current%60%20instead%20of%20%60Smalltalk%60%20etc.%0A-%20Amber%20does%20not%20support%20pool%20dictionaries.%0A-%20Amber%20uses%20**%3C%20...javascript%20code...%20%3E**%20to%20inline%20JavaScript%20code%20and%20does%20not%20have%20pragmas.%0A-%20Amber%20does%20not%20have%20class%20categories.%20The%20left%20side%20in%20the%20browser%20lists%20real%20Packages%2C%20but%20they%20feel%20much%20the%20same.%0A%27'),
  135. messageSends: ["title:", "contents:", "new"],
  136. referencedClasses: ["DocChapter"]
  137. }),
  138. smalltalk.DocumentationBuilder);
  139. smalltalk.addMethod(
  140. unescape('_ch3GettingStarted'),
  141. smalltalk.method({
  142. selector: unescape('ch3GettingStarted'),
  143. category: 'chapters',
  144. fn: function (){
  145. var self=this;
  146. return (function($rec){smalltalk.send($rec, "_title_", ["Getting started"]);return smalltalk.send($rec, "_contents_", [unescape("%0ATo%20get%20started%20hacking%20in%20Amber%20you%20can%20basically%20take%20three%20routes%2C%20independent%20of%20your%20platform%3A%0A%0A1.%20Just%20**try%20it%20out%20directly**%20at%20%5Bwww.amber-lang.net%5D%28http%3A//www.amber-lang.net%29%20-%20click%20the%20**Class%20browser**%20button%20there.%20But%20you%20will%20**not%20be%20able%20to%20save%20any%20code%20you%20write**%21%20%0A%20%20%20%20Still%2C%20it%20works%20fine%20for%20looking%20at%20the%20IDE%20and%20playing%20around.%20Just%20**don%27t%20press%20F5/reload**%20-%20it%20will%20lose%20any%20code%20you%20have%20written.%0A2.%20Download%20an%20Amber%20zip-ball%2C%20install%20%5BNodejs%5D%28http%3A//www.nodejs.org%29%2C%20fire%20up%20the%20Amber%20server%20and%20then%20open%20Amber%20from%20localhost%20-%20then%20you%20**can%20save%20code**.%20Detailed%20instructions%20are%20below%21%0A3.%20Same%20as%20above%20but%20install%20git%20first%20and%20get%20a%20proper%20clone%20from%20%5Bhttp%3A//github.com/NicolasPetton/amber%5D%28http%3A//github.com/NicolasPetton/amber%29%20instead%20of%20a%20zip/tar-ball.%20%0A%20%20%20%20If%20you%20want%20to%20**contribute%20to%20Amber%20itself**%20this%20is%20really%20what%20you%20want%20to%20do.%20In%20fact%2C%20in%20most%20cases%20this%20is%20what%20you%20want%20to%20do.%20It%20requires%20installing%20git%20first%2C%20but%20it%20is%20quite%20simple%20-%20although%20we%20leave%20this%20bit%20as%20an%20%22exercise%20to%20the%20reader%22%20%3A%29%0A%0A**PLEASE%20NOTE%3A**%20Amber%20core%20developers%20use%20Linux.%20%0AWe%20do%20not%20want%20to%20introduce%20dependencies%20that%20aren%27t%20cross%20platform%20-%20but%20currently%20amberc%20%28the%20command%20line%20compiler%29%20is%20a%20bash%20script%20and%20we%20also%20use%20Makefiles%20%0A%28for%20building%20Amber%20itself%20and%20server%20side%20examples%29%20written%20on%20Linux/Unix.%20So%20using%20Windows%20is%20currently%20a%20bit%20limited%20-%20you%20can%27t%20run%20%22make%22%20in%20the%20.st%20directory%20to%20rebuild%20whole%20of%20Amber%20for%20example.%0A%20BUT...%20if%20you%20only%20want%20to%20use%20Amber%20to%20build%20web%20client%20apps%20and%20not%20really%20get%20involved%20in%20hacking%20Amber%20itself%20-%20then%20you%20should%20be%20fine%21%0A%0A%23%23%20Downloading%20Amber%0ACurrently%20you%20can%20download%20in%20zip%20or%20tar-ball%20format%2C%20either%20cutting%20edge%20or%20a%20release.%20%5BDownloads%20are%20available%20here%5D%28https%3A//github.com/NicolasPetton/amber/archives/amber%29.%20%0A%0AUnpack%20wherever%20you%20like%2C%20but%20I%20would%20rename%20the%20directory%20that%20is%20unpacked%20to%20something%20slightly%20shorter%20-%20like%20say%20%22amber%22.%20%3A%29%0AAnd%20yes%2C%20at%20this%20point%20you%20can%20double%20click%20the%20index.html%20file%20in%20the%20amber%20directory%20to%20get%20the%20IDE%20up%2C%20but%20again%2C%20**you%20will%20not%20be%20able%20to%20save%20code**.%20So%20please%20continue%20below%20%3A%29%0A%0A%23%23%20Installing%20Node.js%0A%5BNode%5D%28http%3A//www.nodejs.org%29%20%28for%20short%29%20is%20simply%20the%20V8%20Javascript%20VM%20from%20Google%20%28used%20in%20Chrome%29%20hooked%20together%20with%20some%20hard%20core%20C-libraries%20for%20doing%20%22evented%20I/O%22.%0ABasically%20it%27s%20JavaScript%20for%20the%20server%20-%20on%20asynch%20steroids.%20Amber%20runs%20fine%20in%20Node%20and%20we%20use%20it%20for%20several%20Amber%20tools%2C%20like%20amberc%20%28the%20command%20line%20Amber%20compiler%29%20or%20the%20Amber%20server%20%28see%20below%29.%20%0AThere%20are%20also%20several%20Amber-Node%20examples%20to%20look%20at%20if%20you%20want%20to%20play%20with%20running%20Amber%20programs%20server%20side.%20**In%20short%20-%20you%20really%20want%20to%20install%20Nodejs.%20%3A%29**%0A%0A-%20Installing%20Node%20on%20Linux%20can%20be%20done%20using%20your%20package%20tool%20of%20choice%20%28%60apt-get%20install%20nodejs%60%20for%20example%29%20or%20any%20other%20way%20described%20at%20%5Bthe%20download%20page%5D%28http%3A//nodejs.org/%23download%29.%0A-%20Installing%20Node%20on%20MacOS%20or%20Windows%20is%20probably%20done%20best%20by%20using%20the%20%5Binstallers%20available%20at%20Nodejs.org%5D%28http%3A//nodejs.org/%23download%29.%0A%0A%23%23%20Starting%20Amber%20server%0ANicolas%20has%20written%20a%20minimal%20webDAV%20server%20that%20is%20the%20easiest%20way%20to%20get%20up%20and%20running%20Amber%20with%20the%20ability%20to%20save%20code.%20This%20little%20server%20is%20written%20in...%20Amber%21%20%0AAnd%20it%20runs%20on%20top%20of%20Node.%20So%20to%20start%20it%20up%20serving%20your%20brand%20new%20directory%20tree%20of%20sweet%20Amber%20you%20do%3A%0A%0A%09cd%20amber%09%28or%20whatever%20you%20called%20the%20directory%20you%20unpackaged%29%0A%09./bin/server%09%28in%20windows%20you%20type%20%60node%20server%5Cserver.js%60%20instead%29%0A%0AIt%20should%20say%20it%20is%20listening%20on%20port%204000.%20If%20it%20does%2C%20hooray%21%20That%20means%20both%20Node%20and%20Amber%20are%20good.%20In%20Windows%20you%20might%20get%20a%20question%20about%20opening%20that%20port%20in%20the%20local%20firewall%20-%20yep%2C%20do%20it%21%0A%0A%23%23%20Firing%20up%20Amber%0AThe%20Amber%20IDE%20is%20written%20in...%20Amber.%20It%20uses%20%5BjQuery%5D%28http%3A//jquery.com%29%20and%20runs%20right%20in%20your%20browser%20as%20a%20...%20well%2C%20a%20web%20page.%20%0AWe%20could%20open%20it%20up%20just%20using%20a%20file%20url%20-%20but%20the%20reason%20we%20performed%20the%20previous%20steps%20is%20so%20that%20we%20can%20load%20the%20IDE%20web%20page%20from%20a%20server%20that%20can%20handle%20PUTs%20%28webDAV%29%20of%20source%20code.%20%0AAccording%20to%20web%20security%20Amber%20can%20only%20do%20PUT%20back%20to%20the%20same%20server%20it%20was%20loaded%20from.%20Thus%20we%20instead%20want%20to%20open%20it%20%5Bthrough%20our%20little%20server%20now%20listening%20on%20port%204000%5D%28http%3A//localhost%3A4000/index.html%29.%0AClicking%20that%20link%20and%20then%20pressing%20the%20**Class%20browser**%20should%20get%20your%20Amber%20IDE%20running%20with%20the%20ability%20to%20commit%20modified%20packages%20locally.%0A%0ATo%20verify%20that%20you%20can%20indeed%20commit%20now%20-%20just%20select%20a%20Package%20in%20the%20browser%2C%20like%20say%20%22Examples%22%20and%20press%20the%20**Commit**%20button%20below.%20**If%20all%20goes%20well%20nothing%20happens%20%3A%29**.%20%0ASo%20in%20order%20to%20really%20know%20if%20it%20worked%20we%20can%20check%20the%20modified%20date%20on%20the%20files%20**amber/st/Examples.st**%2C%20**amber/js/Examples.js**%20and%20**amber/js/Examples.deploy.js**%20-%20they%20should%20be%20brand%20new.%0A%0ANOTE%3A%20We%20can%20use%20any%20webDAV%20server%20and%20Apache2%20has%20been%20used%20earlier%20and%20works%20fine.%20But%20the%20Amber%20server%20is%20smaller%20and%20simpler%20to%20start.%0A")]);})(smalltalk.send((smalltalk.DocChapter || DocChapter), "_new", []));
  147. return self;},
  148. args: [],
  149. source: unescape('ch3GettingStarted%0A%09%5EDocChapter%20new%0A%09%09title%3A%20%27Getting%20started%27%3B%0A%09%09contents%3A%20%27%0ATo%20get%20started%20hacking%20in%20Amber%20you%20can%20basically%20take%20three%20routes%2C%20independent%20of%20your%20platform%3A%0A%0A1.%20Just%20**try%20it%20out%20directly**%20at%20%5Bwww.amber-lang.net%5D%28http%3A//www.amber-lang.net%29%20-%20click%20the%20**Class%20browser**%20button%20there.%20But%20you%20will%20**not%20be%20able%20to%20save%20any%20code%20you%20write**%21%20%0A%20%20%20%20Still%2C%20it%20works%20fine%20for%20looking%20at%20the%20IDE%20and%20playing%20around.%20Just%20**don%27%27t%20press%20F5/reload**%20-%20it%20will%20lose%20any%20code%20you%20have%20written.%0A2.%20Download%20an%20Amber%20zip-ball%2C%20install%20%5BNodejs%5D%28http%3A//www.nodejs.org%29%2C%20fire%20up%20the%20Amber%20server%20and%20then%20open%20Amber%20from%20localhost%20-%20then%20you%20**can%20save%20code**.%20Detailed%20instructions%20are%20below%21%0A3.%20Same%20as%20above%20but%20install%20git%20first%20and%20get%20a%20proper%20clone%20from%20%5Bhttp%3A//github.com/NicolasPetton/amber%5D%28http%3A//github.com/NicolasPetton/amber%29%20instead%20of%20a%20zip/tar-ball.%20%0A%20%20%20%20If%20you%20want%20to%20**contribute%20to%20Amber%20itself**%20this%20is%20really%20what%20you%20want%20to%20do.%20In%20fact%2C%20in%20most%20cases%20this%20is%20what%20you%20want%20to%20do.%20It%20requires%20installing%20git%20first%2C%20but%20it%20is%20quite%20simple%20-%20although%20we%20leave%20this%20bit%20as%20an%20%22exercise%20to%20the%20reader%22%20%3A%29%0A%0A**PLEASE%20NOTE%3A**%20Amber%20core%20developers%20use%20Linux.%20%0AWe%20do%20not%20want%20to%20introduce%20dependencies%20that%20aren%27%27t%20cross%20platform%20-%20but%20currently%20amberc%20%28the%20command%20line%20compiler%29%20is%20a%20bash%20script%20and%20we%20also%20use%20Makefiles%20%0A%28for%20building%20Amber%20itself%20and%20server%20side%20examples%29%20written%20on%20Linux/Unix.%20So%20using%20Windows%20is%20currently%20a%20bit%20limited%20-%20you%20can%27%27t%20run%20%22make%22%20in%20the%20.st%20directory%20to%20rebuild%20whole%20of%20Amber%20for%20example.%0A%20BUT...%20if%20you%20only%20want%20to%20use%20Amber%20to%20build%20web%20client%20apps%20and%20not%20really%20get%20involved%20in%20hacking%20Amber%20itself%20-%20then%20you%20should%20be%20fine%21%0A%0A%23%23%20Downloading%20Amber%0ACurrently%20you%20can%20download%20in%20zip%20or%20tar-ball%20format%2C%20either%20cutting%20edge%20or%20a%20release.%20%5BDownloads%20are%20available%20here%5D%28https%3A//github.com/NicolasPetton/amber/archives/amber%29.%20%0A%0AUnpack%20wherever%20you%20like%2C%20but%20I%20would%20rename%20the%20directory%20that%20is%20unpacked%20to%20something%20slightly%20shorter%20-%20like%20say%20%22amber%22.%20%3A%29%0AAnd%20yes%2C%20at%20this%20point%20you%20can%20double%20click%20the%20index.html%20file%20in%20the%20amber%20directory%20to%20get%20the%20IDE%20up%2C%20but%20again%2C%20**you%20will%20not%20be%20able%20to%20save%20code**.%20So%20please%20continue%20below%20%3A%29%0A%0A%23%23%20Installing%20Node.js%0A%5BNode%5D%28http%3A//www.nodejs.org%29%20%28for%20short%29%20is%20simply%20the%20V8%20Javascript%20VM%20from%20Google%20%28used%20in%20Chrome%29%20hooked%20together%20with%20some%20hard%20core%20C-libraries%20for%20doing%20%22evented%20I/O%22.%0ABasically%20it%27%27s%20JavaScript%20for%20the%20server%20-%20on%20asynch%20steroids.%20Amber%20runs%20fine%20in%20Node%20and%20we%20use%20it%20for%20several%20Amber%20tools%2C%20like%20amberc%20%28the%20command%20line%20Amber%20compiler%29%20or%20the%20Amber%20server%20%28see%20below%29.%20%0AThere%20are%20also%20several%20Amber-Node%20examples%20to%20look%20at%20if%20you%20want%20to%20play%20with%20running%20Amber%20programs%20server%20side.%20**In%20short%20-%20you%20really%20want%20to%20install%20Nodejs.%20%3A%29**%0A%0A-%20Installing%20Node%20on%20Linux%20can%20be%20done%20using%20your%20package%20tool%20of%20choice%20%28%60apt-get%20install%20nodejs%60%20for%20example%29%20or%20any%20other%20way%20described%20at%20%5Bthe%20download%20page%5D%28http%3A//nodejs.org/%23download%29.%0A-%20Installing%20Node%20on%20MacOS%20or%20Windows%20is%20probably%20done%20best%20by%20using%20the%20%5Binstallers%20available%20at%20Nodejs.org%5D%28http%3A//nodejs.org/%23download%29.%0A%0A%23%23%20Starting%20Amber%20server%0ANicolas%20has%20written%20a%20minimal%20webDAV%20server%20that%20is%20the%20easiest%20way%20to%20get%20up%20and%20running%20Amber%20with%20the%20ability%20to%20save%20code.%20This%20little%20server%20is%20written%20in...%20Amber%21%20%0AAnd%20it%20runs%20on%20top%20of%20Node.%20So%20to%20start%20it%20up%20serving%20your%20brand%20new%20directory%20tree%20of%20sweet%20Amber%20you%20do%3A%0A%0A%09cd%20amber%09%28or%20whatever%20you%20called%20the%20directory%20you%20unpackaged%29%0A%09./bin/server%09%28in%20windows%20you%20type%20%60node%20server%5Cserver.js%60%20instead%29%0A%0AIt%20should%20say%20it%20is%20listening%20on%20port%204000.%20If%20it%20does%2C%20hooray%21%20That%20means%20both%20Node%20and%20Amber%20are%20good.%20In%20Windows%20you%20might%20get%20a%20question%20about%20opening%20that%20port%20in%20the%20local%20firewall%20-%20yep%2C%20do%20it%21%0A%0A%23%23%20Firing%20up%20Amber%0AThe%20Amber%20IDE%20is%20written%20in...%20Amber.%20It%20uses%20%5BjQuery%5D%28http%3A//jquery.com%29%20and%20runs%20right%20in%20your%20browser%20as%20a%20...%20well%2C%20a%20web%20page.%20%0AWe%20could%20open%20it%20up%20just%20using%20a%20file%20url%20-%20but%20the%20reason%20we%20performed%20the%20previous%20steps%20is%20so%20that%20we%20can%20load%20the%20IDE%20web%20page%20from%20a%20server%20that%20can%20handle%20PUTs%20%28webDAV%29%20of%20source%20code.%20%0AAccording%20to%20web%20security%20Amber%20can%20only%20do%20PUT%20back%20to%20the%20same%20server%20it%20was%20loaded%20from.%20Thus%20we%20instead%20want%20to%20open%20it%20%5Bthrough%20our%20little%20server%20now%20listening%20on%20port%204000%5D%28http%3A//localhost%3A4000/index.html%29.%0AClicking%20that%20link%20and%20then%20pressing%20the%20**Class%20browser**%20should%20get%20your%20Amber%20IDE%20running%20with%20the%20ability%20to%20commit%20modified%20packages%20locally.%0A%0ATo%20verify%20that%20you%20can%20indeed%20commit%20now%20-%20just%20select%20a%20Package%20in%20the%20browser%2C%20like%20say%20%22Examples%22%20and%20press%20the%20**Commit**%20button%20below.%20**If%20all%20goes%20well%20nothing%20happens%20%3A%29**.%20%0ASo%20in%20order%20to%20really%20know%20if%20it%20worked%20we%20can%20check%20the%20modified%20date%20on%20the%20files%20**amber/st/Examples.st**%2C%20**amber/js/Examples.js**%20and%20**amber/js/Examples.deploy.js**%20-%20they%20should%20be%20brand%20new.%0A%0ANOTE%3A%20We%20can%20use%20any%20webDAV%20server%20and%20Apache2%20has%20been%20used%20earlier%20and%20works%20fine.%20But%20the%20Amber%20server%20is%20smaller%20and%20simpler%20to%20start.%0A%27'),
  150. messageSends: ["title:", "contents:", "new"],
  151. referencedClasses: ["DocChapter"]
  152. }),
  153. smalltalk.DocumentationBuilder);
  154. smalltalk.addMethod(
  155. unescape('_ch5Index'),
  156. smalltalk.method({
  157. selector: unescape('ch5Index'),
  158. category: 'chapters',
  159. fn: function (){
  160. var self=this;
  161. return smalltalk.send((smalltalk.ClassesIndexChapter || ClassesIndexChapter), "_new", []);
  162. return self;},
  163. args: [],
  164. source: unescape('ch5Index%0A%09%5EClassesIndexChapter%20new'),
  165. messageSends: ["new"],
  166. referencedClasses: ["ClassesIndexChapter"]
  167. }),
  168. smalltalk.DocumentationBuilder);
  169. smalltalk.addMethod(
  170. unescape('_ch6KernelObjects'),
  171. smalltalk.method({
  172. selector: unescape('ch6KernelObjects'),
  173. category: 'chapters',
  174. fn: function (){
  175. var self=this;
  176. return smalltalk.send((smalltalk.PackageDocChapter || PackageDocChapter), "_on_", [smalltalk.send((smalltalk.Package || Package), "_named_", [unescape("Kernel-Objects")])]);
  177. return self;},
  178. args: [],
  179. source: unescape('ch6KernelObjects%0A%09%5EPackageDocChapter%20on%3A%20%28Package%20named%3A%20%27Kernel-Objects%27%29'),
  180. messageSends: ["on:", "named:"],
  181. referencedClasses: ["PackageDocChapter", "Package"]
  182. }),
  183. smalltalk.DocumentationBuilder);
  184. smalltalk.addMethod(
  185. unescape('_ch7KernelClasses'),
  186. smalltalk.method({
  187. selector: unescape('ch7KernelClasses'),
  188. category: 'chapters',
  189. fn: function (){
  190. var self=this;
  191. return smalltalk.send((smalltalk.PackageDocChapter || PackageDocChapter), "_on_", [smalltalk.send((smalltalk.Package || Package), "_named_", [unescape("Kernel-Classes")])]);
  192. return self;},
  193. args: [],
  194. source: unescape('ch7KernelClasses%0A%09%5EPackageDocChapter%20on%3A%20%28Package%20named%3A%20%27Kernel-Classes%27%29'),
  195. messageSends: ["on:", "named:"],
  196. referencedClasses: ["PackageDocChapter", "Package"]
  197. }),
  198. smalltalk.DocumentationBuilder);
  199. smalltalk.addMethod(
  200. unescape('_ch4Tutorials'),
  201. smalltalk.method({
  202. selector: unescape('ch4Tutorials'),
  203. category: 'chapters',
  204. fn: function (){
  205. var self=this;
  206. return smalltalk.send((smalltalk.TutorialsChapter || TutorialsChapter), "_new", []);
  207. return self;},
  208. args: [],
  209. source: unescape('ch4Tutorials%0A%09%5ETutorialsChapter%20new'),
  210. messageSends: ["new"],
  211. referencedClasses: ["TutorialsChapter"]
  212. }),
  213. smalltalk.DocumentationBuilder);
  214. smalltalk.addMethod(
  215. unescape('_checkHashChange'),
  216. smalltalk.method({
  217. selector: unescape('checkHashChange'),
  218. category: 'routing',
  219. fn: function (){
  220. var self=this;
  221. smalltalk.send(smalltalk.send((typeof window == 'undefined' ? nil : window), "_jQuery_", [(typeof window == 'undefined' ? nil : window)]), "_bind_do_", ["hashchange", (function(){return smalltalk.send(self, "_checkHash", []);})]);
  222. return self;},
  223. args: [],
  224. source: unescape('checkHashChange%0A%09%28window%20jQuery%3A%20window%29%20bind%3A%20%27hashchange%27%20do%3A%20%5Bself%20checkHash%5D'),
  225. messageSends: ["bind:do:", "jQuery:", "checkHash"],
  226. referencedClasses: []
  227. }),
  228. smalltalk.DocumentationBuilder);
  229. smalltalk.addMethod(
  230. unescape('_checkHash'),
  231. smalltalk.method({
  232. selector: unescape('checkHash'),
  233. category: 'routing',
  234. fn: function (){
  235. var self=this;
  236. var hash=nil;
  237. var presentation=nil;
  238. (hash=smalltalk.send(smalltalk.send(smalltalk.send((typeof document == 'undefined' ? nil : document), "_location", []), "_hash", []), "_replace_with_", [unescape("%5E%23"), ""]));
  239. smalltalk.send(smalltalk.send(self, "_announcer", []), "_announce_", [(function($rec){smalltalk.send($rec, "_id_", [hash]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.ChapterSelectionAnnouncement || ChapterSelectionAnnouncement), "_new", []))]);
  240. return self;},
  241. args: [],
  242. source: unescape('checkHash%0A%09%7C%20hash%20presentation%20%7C%0A%09hash%20%3A%3D%20document%20location%20hash%20%20replace%3A%20%27%5E%23%27%20with%3A%20%27%27.%0A%09self%20announcer%20announce%3A%20%28ChapterSelectionAnnouncement%20new%20%0A%09%09id%3A%20hash%3B%20%0A%09%09yourself%29'),
  243. messageSends: ["replace:with:", "hash", "location", "announce:", "announcer", "id:", "yourself", "new"],
  244. referencedClasses: ["ChapterSelectionAnnouncement"]
  245. }),
  246. smalltalk.DocumentationBuilder);
  247. smalltalk.addMethod(
  248. unescape('_update'),
  249. smalltalk.method({
  250. selector: unescape('update'),
  251. category: 'updating',
  252. fn: function (){
  253. var self=this;
  254. (self['@chapters']=nil);
  255. (self['@announcer']=nil);
  256. (self['@widget']=nil);
  257. smalltalk.send(smalltalk.send((typeof window == 'undefined' ? nil : window), "_jQuery_", [".documentation"]), "_remove", []);
  258. smalltalk.send(self, "_build", []);
  259. return self;},
  260. args: [],
  261. source: unescape('update%0A%09chapters%20%3A%3D%20nil.%0A%09announcer%20%3A%3D%20nil.%0A%09widget%20%3A%3D%20nil.%0A%09%28window%20jQuery%3A%20%27.documentation%27%29%20remove.%0A%09self%20build'),
  262. messageSends: ["remove", "jQuery:", "build"],
  263. referencedClasses: []
  264. }),
  265. smalltalk.DocumentationBuilder);
  266. smalltalk.addMethod(
  267. unescape('_ch8KernelCollection'),
  268. smalltalk.method({
  269. selector: unescape('ch8KernelCollection'),
  270. category: 'chapters',
  271. fn: function (){
  272. var self=this;
  273. return smalltalk.send((smalltalk.PackageDocChapter || PackageDocChapter), "_on_", [smalltalk.send((smalltalk.Package || Package), "_named_", [unescape("Kernel-Collections")])]);
  274. return self;},
  275. args: [],
  276. source: unescape('ch8KernelCollection%0A%09%5EPackageDocChapter%20on%3A%20%28Package%20named%3A%20%27Kernel-Collections%27%29'),
  277. messageSends: ["on:", "named:"],
  278. referencedClasses: ["PackageDocChapter", "Package"]
  279. }),
  280. smalltalk.DocumentationBuilder);
  281. smalltalk.addMethod(
  282. unescape('_ch9KernelMethods'),
  283. smalltalk.method({
  284. selector: unescape('ch9KernelMethods'),
  285. category: 'chapters',
  286. fn: function (){
  287. var self=this;
  288. return smalltalk.send((smalltalk.PackageDocChapter || PackageDocChapter), "_on_", [smalltalk.send((smalltalk.Package || Package), "_named_", [unescape("Kernel-Methods")])]);
  289. return self;},
  290. args: [],
  291. source: unescape('ch9KernelMethods%0A%09%5EPackageDocChapter%20on%3A%20%28Package%20named%3A%20%27Kernel-Methods%27%29'),
  292. messageSends: ["on:", "named:"],
  293. referencedClasses: ["PackageDocChapter", "Package"]
  294. }),
  295. smalltalk.DocumentationBuilder);
  296. smalltalk.DocumentationBuilder.klass.iVarNames = ['current'];
  297. smalltalk.addMethod(
  298. unescape('_current'),
  299. smalltalk.method({
  300. selector: unescape('current'),
  301. category: 'accessing',
  302. fn: function (){
  303. var self=this;
  304. return (($receiver = self['@current']) == nil || $receiver == undefined) ? (function(){return (self['@current']=smalltalk.send(self, "_new", []));})() : $receiver;
  305. return self;},
  306. args: [],
  307. source: unescape('current%0A%09%5Ecurrent%20ifNil%3A%20%5Bcurrent%20%3A%3D%20self%20new%5D'),
  308. messageSends: ["ifNil:", "new"],
  309. referencedClasses: []
  310. }),
  311. smalltalk.DocumentationBuilder.klass);
  312. smalltalk.addMethod(
  313. unescape('_initialize'),
  314. smalltalk.method({
  315. selector: unescape('initialize'),
  316. category: 'initialization',
  317. fn: function (){
  318. var self=this;
  319. smalltalk.send(smalltalk.send(self, "_current", []), "_build", []);
  320. return self;},
  321. args: [],
  322. source: unescape('initialize%0A%09self%20current%20build'),
  323. messageSends: ["build", "current"],
  324. referencedClasses: []
  325. }),
  326. smalltalk.DocumentationBuilder.klass);
  327. smalltalk.addClass('DocChapter', smalltalk.Widget, ['title', 'contents', 'parent'], 'Documentation');
  328. smalltalk.addMethod(
  329. unescape('_title'),
  330. smalltalk.method({
  331. selector: unescape('title'),
  332. category: 'accessing',
  333. fn: function (){
  334. var self=this;
  335. return (($receiver = self['@title']) == nil || $receiver == undefined) ? (function(){return "";})() : $receiver;
  336. return self;},
  337. args: [],
  338. source: unescape('title%0A%09%5Etitle%20ifNil%3A%20%5B%27%27%5D'),
  339. messageSends: ["ifNil:"],
  340. referencedClasses: []
  341. }),
  342. smalltalk.DocChapter);
  343. smalltalk.addMethod(
  344. unescape('_title_'),
  345. smalltalk.method({
  346. selector: unescape('title%3A'),
  347. category: 'accessing',
  348. fn: function (aString){
  349. var self=this;
  350. (self['@title']=aString);
  351. return self;},
  352. args: ["aString"],
  353. source: unescape('title%3A%20aString%0A%09title%20%3A%3D%20aString'),
  354. messageSends: [],
  355. referencedClasses: []
  356. }),
  357. smalltalk.DocChapter);
  358. smalltalk.addMethod(
  359. unescape('_contents'),
  360. smalltalk.method({
  361. selector: unescape('contents'),
  362. category: 'accessing',
  363. fn: function (){
  364. var self=this;
  365. return (($receiver = self['@contents']) == nil || $receiver == undefined) ? (function(){return "";})() : $receiver;
  366. return self;},
  367. args: [],
  368. source: unescape('contents%0A%09%5Econtents%20ifNil%3A%20%5B%27%27%5D'),
  369. messageSends: ["ifNil:"],
  370. referencedClasses: []
  371. }),
  372. smalltalk.DocChapter);
  373. smalltalk.addMethod(
  374. unescape('_contents_'),
  375. smalltalk.method({
  376. selector: unescape('contents%3A'),
  377. category: 'accessing',
  378. fn: function (aString){
  379. var self=this;
  380. (self['@contents']=aString);
  381. return self;},
  382. args: ["aString"],
  383. source: unescape('contents%3A%20aString%0A%09contents%20%3A%3D%20aString'),
  384. messageSends: [],
  385. referencedClasses: []
  386. }),
  387. smalltalk.DocChapter);
  388. smalltalk.addMethod(
  389. unescape('_htmlContents'),
  390. smalltalk.method({
  391. selector: unescape('htmlContents'),
  392. category: 'accessing',
  393. fn: function (){
  394. var self=this;
  395. return smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.Showdown || Showdown), "_at_", [smalltalk.symbolFor("converter")]), "_new", []), "_makeHtml_", [smalltalk.send(self, "_contents", [])]);
  396. return self;},
  397. args: [],
  398. source: unescape('htmlContents%0A%09%5E%28Showdown%20at%3A%20%23converter%29%20new%20makeHtml%3A%20self%20contents'),
  399. messageSends: ["makeHtml:", "new", "at:", "contents"],
  400. referencedClasses: ["Showdown"]
  401. }),
  402. smalltalk.DocChapter);
  403. smalltalk.addMethod(
  404. unescape('_chapters'),
  405. smalltalk.method({
  406. selector: unescape('chapters'),
  407. category: 'accessing',
  408. fn: function (){
  409. var self=this;
  410. return [];
  411. return self;},
  412. args: [],
  413. source: unescape('chapters%0A%09%22A%20doc%20chapter%20can%20contain%20sub%20chapters%22%0A%09%5E%23%28%29'),
  414. messageSends: [],
  415. referencedClasses: []
  416. }),
  417. smalltalk.DocChapter);
  418. smalltalk.addMethod(
  419. unescape('_cssClass'),
  420. smalltalk.method({
  421. selector: unescape('cssClass'),
  422. category: 'accessing',
  423. fn: function (){
  424. var self=this;
  425. return "doc_chapter";
  426. return self;},
  427. args: [],
  428. source: unescape('cssClass%0A%09%5E%27doc_chapter%27'),
  429. messageSends: [],
  430. referencedClasses: []
  431. }),
  432. smalltalk.DocChapter);
  433. smalltalk.addMethod(
  434. unescape('_level'),
  435. smalltalk.method({
  436. selector: unescape('level'),
  437. category: 'accessing',
  438. fn: function (){
  439. var self=this;
  440. return (($receiver = smalltalk.send(self, "_parent", [])) == nil || $receiver == undefined) ? (function(){return (1);})() : (function(){return ((($receiver = smalltalk.send(smalltalk.send(self, "_parent", []), "_level", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));})();
  441. return self;},
  442. args: [],
  443. source: unescape('level%0A%09%5Eself%20parent%20ifNil%3A%20%5B1%5D%20ifNotNil%3A%20%5Bself%20parent%20level%20+1%5D'),
  444. messageSends: ["ifNil:ifNotNil:", "parent", unescape("+"), "level"],
  445. referencedClasses: []
  446. }),
  447. smalltalk.DocChapter);
  448. smalltalk.addMethod(
  449. unescape('_level_'),
  450. smalltalk.method({
  451. selector: unescape('level%3A'),
  452. category: 'accessing',
  453. fn: function (anInteger){
  454. var self=this;
  455. (level=anInteger);
  456. return self;},
  457. args: ["anInteger"],
  458. source: unescape('level%3A%20anInteger%0A%09level%20%3A%3D%20anInteger'),
  459. messageSends: [],
  460. referencedClasses: []
  461. }),
  462. smalltalk.DocChapter);
  463. smalltalk.addMethod(
  464. unescape('_parent'),
  465. smalltalk.method({
  466. selector: unescape('parent'),
  467. category: 'accessing',
  468. fn: function (){
  469. var self=this;
  470. return self['@parent'];
  471. return self;},
  472. args: [],
  473. source: unescape('parent%0A%09%5Eparent'),
  474. messageSends: [],
  475. referencedClasses: []
  476. }),
  477. smalltalk.DocChapter);
  478. smalltalk.addMethod(
  479. unescape('_parent_'),
  480. smalltalk.method({
  481. selector: unescape('parent%3A'),
  482. category: 'accessing',
  483. fn: function (aChapter){
  484. var self=this;
  485. (self['@parent']=aChapter);
  486. return self;},
  487. args: ["aChapter"],
  488. source: unescape('parent%3A%20aChapter%0A%09parent%20%3A%3D%20aChapter'),
  489. messageSends: [],
  490. referencedClasses: []
  491. }),
  492. smalltalk.DocChapter);
  493. smalltalk.addMethod(
  494. unescape('_id'),
  495. smalltalk.method({
  496. selector: unescape('id'),
  497. category: 'accessing',
  498. fn: function (){
  499. var self=this;
  500. return smalltalk.send(smalltalk.send(self, "_title", []), "_replace_with_", [" ", unescape("-")]);
  501. return self;},
  502. args: [],
  503. source: unescape('id%0A%09%22The%20id%20is%20used%20in%20url%20fragments.%20%0A%09It%20must%20be%20unique%20amoung%20all%20chapters%22%0A%09%5Eself%20title%20replace%3A%20%27%20%27%20with%3A%20%27-%27'),
  504. messageSends: ["replace:with:", "title"],
  505. referencedClasses: []
  506. }),
  507. smalltalk.DocChapter);
  508. smalltalk.addMethod(
  509. unescape('_announcer'),
  510. smalltalk.method({
  511. selector: unescape('announcer'),
  512. category: 'accessing',
  513. fn: function (){
  514. var self=this;
  515. return smalltalk.send(smalltalk.send((smalltalk.DocumentationBuilder || DocumentationBuilder), "_current", []), "_announcer", []);
  516. return self;},
  517. args: [],
  518. source: unescape('announcer%0A%09%5EDocumentationBuilder%20current%20announcer'),
  519. messageSends: ["announcer", "current"],
  520. referencedClasses: ["DocumentationBuilder"]
  521. }),
  522. smalltalk.DocChapter);
  523. smalltalk.addMethod(
  524. unescape('_selectClass_'),
  525. smalltalk.method({
  526. selector: unescape('selectClass%3A'),
  527. category: 'actions',
  528. fn: function (aClass){
  529. var self=this;
  530. smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.DocumentationBuilder || DocumentationBuilder), "_current", []), "_announcer", []), "_announce_", [smalltalk.send((smalltalk.ClassSelectionAnnouncement || ClassSelectionAnnouncement), "_on_", [aClass])]);
  531. return self;},
  532. args: ["aClass"],
  533. source: unescape('selectClass%3A%20aClass%0A%09DocumentationBuilder%20current%20announcer%20announce%3A%20%28ClassSelectionAnnouncement%20on%3A%20aClass%29'),
  534. messageSends: ["announce:", "announcer", "current", "on:"],
  535. referencedClasses: ["DocumentationBuilder", "ClassSelectionAnnouncement"]
  536. }),
  537. smalltalk.DocChapter);
  538. smalltalk.addMethod(
  539. unescape('_selectChapter_'),
  540. smalltalk.method({
  541. selector: unescape('selectChapter%3A'),
  542. category: 'actions',
  543. fn: function (aChapter){
  544. var self=this;
  545. smalltalk.send(smalltalk.send((typeof document == 'undefined' ? nil : document), "_location", []), "_hash_", [smalltalk.send(aChapter, "_id", [])]);
  546. return self;},
  547. args: ["aChapter"],
  548. source: unescape('selectChapter%3A%20aChapter%0A%09document%20location%20hash%3A%20aChapter%20id'),
  549. messageSends: ["hash:", "location", "id"],
  550. referencedClasses: []
  551. }),
  552. smalltalk.DocChapter);
  553. smalltalk.addMethod(
  554. unescape('_displayChapter_'),
  555. smalltalk.method({
  556. selector: unescape('displayChapter%3A'),
  557. category: 'actions',
  558. fn: function (aChapter){
  559. var self=this;
  560. smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.DocumentationBuilder || DocumentationBuilder), "_current", []), "_widget", []), "_displayChapter_", [aChapter]);
  561. return self;},
  562. args: ["aChapter"],
  563. source: unescape('displayChapter%3A%20aChapter%0A%09DocumentationBuilder%20current%20widget%20displayChapter%3A%20aChapter'),
  564. messageSends: ["displayChapter:", "widget", "current"],
  565. referencedClasses: ["DocumentationBuilder"]
  566. }),
  567. smalltalk.DocChapter);
  568. smalltalk.addMethod(
  569. unescape('_initialize'),
  570. smalltalk.method({
  571. selector: unescape('initialize'),
  572. category: 'initialization',
  573. fn: function (){
  574. var self=this;
  575. smalltalk.send(self, "_initialize", [], smalltalk.Widget);
  576. smalltalk.send(self, "_subscribe", []);
  577. return self;},
  578. args: [],
  579. source: unescape('initialize%0A%09super%20initialize.%0A%09self%20subscribe'),
  580. messageSends: ["initialize", "subscribe"],
  581. referencedClasses: []
  582. }),
  583. smalltalk.DocChapter);
  584. smalltalk.addMethod(
  585. unescape('_renderOn_'),
  586. smalltalk.method({
  587. selector: unescape('renderOn%3A'),
  588. category: 'rendering',
  589. fn: function (html){
  590. var self=this;
  591. (function($rec){smalltalk.send($rec, "_class_", [smalltalk.send(self, "_cssClass", [])]);return smalltalk.send($rec, "_with_", [(function(){smalltalk.send(self, "_renderDocOn_", [html]);return smalltalk.send(self, "_renderLinksOn_", [html]);})]);})(smalltalk.send(html, "_div", []));
  592. return self;},
  593. args: ["html"],
  594. source: unescape('renderOn%3A%20html%0A%09html%20div%20%0A%09%09class%3A%20self%20cssClass%3B%0A%09%09with%3A%20%5B%0A%09%09%09self%20renderDocOn%3A%20html.%0A%09%09%09self%20renderLinksOn%3A%20html%5D'),
  595. messageSends: ["class:", "cssClass", "with:", "renderDocOn:", "renderLinksOn:", "div"],
  596. referencedClasses: []
  597. }),
  598. smalltalk.DocChapter);
  599. smalltalk.addMethod(
  600. unescape('_renderDocOn_'),
  601. smalltalk.method({
  602. selector: unescape('renderDocOn%3A'),
  603. category: 'rendering',
  604. fn: function (html){
  605. var self=this;
  606. var div=nil;
  607. smalltalk.send(smalltalk.send(html, "_h1", []), "_with_", [smalltalk.send(self, "_title", [])]);
  608. smalltalk.send(self, "_renderNavigationOn_", [html]);
  609. (div=smalltalk.send(smalltalk.send(html, "_div", []), "_class_", ["contents"]));
  610. smalltalk.send(smalltalk.send(div, "_asJQuery", []), "_html_", [smalltalk.send(self, "_htmlContents", [])]);
  611. return self;},
  612. args: ["html"],
  613. source: unescape('renderDocOn%3A%20html%0A%09%7C%20div%20%7C%0A%09html%20h1%20with%3A%20self%20title.%0A%09self%20renderNavigationOn%3A%20html.%0A%09div%20%3A%3D%20html%20div%20class%3A%20%27contents%27.%0A%09div%20asJQuery%20html%3A%20self%20htmlContents'),
  614. messageSends: ["with:", "h1", "title", "renderNavigationOn:", "class:", "div", "html:", "asJQuery", "htmlContents"],
  615. referencedClasses: []
  616. }),
  617. smalltalk.DocChapter);
  618. smalltalk.addMethod(
  619. unescape('_renderNavigationOn_'),
  620. smalltalk.method({
  621. selector: unescape('renderNavigationOn%3A'),
  622. category: 'rendering',
  623. fn: function (html){
  624. var self=this;
  625. (($receiver = smalltalk.send(self, "_parent", [])) != nil && $receiver != undefined) ? (function(){return (function($rec){smalltalk.send($rec, "_class_", ["navigation"]);return smalltalk.send($rec, "_with_", [(function(){return (function($rec){smalltalk.send($rec, "_with_", [smalltalk.send(unescape("%u2190%20back%20to%20"), "__comma", [smalltalk.send(smalltalk.send(self, "_parent", []), "_title", [])])]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_selectChapter_", [smalltalk.send(self, "_parent", [])]);})]);})(smalltalk.send(html, "_a", []));})]);})(smalltalk.send(html, "_div", []));})() : nil;
  626. return self;},
  627. args: ["html"],
  628. source: unescape('renderNavigationOn%3A%20html%0A%09self%20parent%20ifNotNil%3A%20%5B%0A%09%09html%20div%20%0A%09%09%09class%3A%20%27navigation%27%3B%20with%3A%20%5B%0A%09%09%09%09html%20a%0A%09%09%09%09%09with%3A%20%27%u2190%20back%20to%20%27%2C%20self%20parent%20title%3B%0A%09%09%09%09%09onClick%3A%20%5Bself%20selectChapter%3A%20self%20parent%5D%5D%5D'),
  629. messageSends: ["ifNotNil:", "parent", "class:", "with:", unescape("%2C"), "title", "onClick:", "selectChapter:", "a", "div"],
  630. referencedClasses: []
  631. }),
  632. smalltalk.DocChapter);
  633. smalltalk.addMethod(
  634. unescape('_renderLinksOn_'),
  635. smalltalk.method({
  636. selector: unescape('renderLinksOn%3A'),
  637. category: 'rendering',
  638. fn: function (html){
  639. var self=this;
  640. (function($rec){smalltalk.send($rec, "_class_", ["links"]);return smalltalk.send($rec, "_with_", [(function(){return smalltalk.send(smalltalk.send(self, "_chapters", []), "_do_", [(function(each){return smalltalk.send(smalltalk.send(html, "_li", []), "_with_", [(function(){return (function($rec){smalltalk.send($rec, "_with_", [smalltalk.send(each, "_title", [])]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_selectChapter_", [each]);})]);})(smalltalk.send(html, "_a", []));})]);})]);})]);})(smalltalk.send(html, "_ul", []));
  641. return self;},
  642. args: ["html"],
  643. source: unescape('renderLinksOn%3A%20html%0A%09html%20ul%20%0A%09%09class%3A%20%27links%27%3B%0A%09%09with%3A%20%5B%0A%09%09%09self%20chapters%20do%3A%20%5B%3Aeach%20%7C%0A%09%09%09%09html%20li%20with%3A%20%5B%0A%09%09%09%09%09html%20a%0A%09%09%09%09%09%09with%3A%20each%20title%3B%0A%09%09%09%09%09%09onClick%3A%20%5Bself%20selectChapter%3A%20each%5D%5D%5D%5D'),
  644. messageSends: ["class:", "with:", "do:", "chapters", "li", "title", "onClick:", "selectChapter:", "a", "ul"],
  645. referencedClasses: []
  646. }),
  647. smalltalk.DocChapter);
  648. smalltalk.addMethod(
  649. unescape('_subscribe'),
  650. smalltalk.method({
  651. selector: unescape('subscribe'),
  652. category: 'subscriptions',
  653. fn: function (){
  654. var self=this;
  655. smalltalk.send(smalltalk.send(self, "_announcer", []), "_on_do_", [(smalltalk.ChapterSelectionAnnouncement || ChapterSelectionAnnouncement), (function(ann){return ((($receiver = smalltalk.send(smalltalk.send(ann, "_id", []), "__eq", [smalltalk.send(self, "_id", [])])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_displayChapter_", [self]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(self, "_displayChapter_", [self]);})]));})]);
  656. return self;},
  657. args: [],
  658. source: unescape('subscribe%0A%09self%20announcer%20on%3A%20ChapterSelectionAnnouncement%20do%3A%20%5B%3Aann%20%7C%0A%09%09ann%20id%20%3D%20self%20id%20ifTrue%3A%20%5Bself%20displayChapter%3A%20self%5D%5D'),
  659. messageSends: ["on:do:", "announcer", "ifTrue:", unescape("%3D"), "id", "displayChapter:"],
  660. referencedClasses: ["ChapterSelectionAnnouncement"]
  661. }),
  662. smalltalk.DocChapter);
  663. smalltalk.addClass('PackageDocChapter', smalltalk.DocChapter, ['package', 'chapters'], 'Documentation');
  664. smalltalk.addMethod(
  665. unescape('_package'),
  666. smalltalk.method({
  667. selector: unescape('package'),
  668. category: 'accessing',
  669. fn: function (){
  670. var self=this;
  671. return self['@package'];
  672. return self;},
  673. args: [],
  674. source: unescape('package%0A%09%5Epackage'),
  675. messageSends: [],
  676. referencedClasses: []
  677. }),
  678. smalltalk.PackageDocChapter);
  679. smalltalk.addMethod(
  680. unescape('_title'),
  681. smalltalk.method({
  682. selector: unescape('title'),
  683. category: 'accessing',
  684. fn: function (){
  685. var self=this;
  686. return smalltalk.send("Package ", "__comma", [smalltalk.send(smalltalk.send(self, "_package", []), "_name", [])]);
  687. return self;},
  688. args: [],
  689. source: unescape('title%0A%09%5E%27Package%20%27%2C%20self%20package%20name'),
  690. messageSends: [unescape("%2C"), "name", "package"],
  691. referencedClasses: []
  692. }),
  693. smalltalk.PackageDocChapter);
  694. smalltalk.addMethod(
  695. unescape('_chapters'),
  696. smalltalk.method({
  697. selector: unescape('chapters'),
  698. category: 'accessing',
  699. fn: function (){
  700. var self=this;
  701. return self['@chapters'];
  702. return self;},
  703. args: [],
  704. source: unescape('chapters%0A%09%5Echapters'),
  705. messageSends: [],
  706. referencedClasses: []
  707. }),
  708. smalltalk.PackageDocChapter);
  709. smalltalk.addMethod(
  710. unescape('_contents'),
  711. smalltalk.method({
  712. selector: unescape('contents'),
  713. category: 'accessing',
  714. fn: function (){
  715. var self=this;
  716. return smalltalk.send(smalltalk.send("Classes in package ", "__comma", [smalltalk.send(smalltalk.send(self, "_package", []), "_name", [])]), "__comma", [":"]);
  717. return self;},
  718. args: [],
  719. source: unescape('contents%0A%09%5E%27Classes%20in%20package%20%27%2C%20self%20package%20name%2C%20%27%3A%27'),
  720. messageSends: [unescape("%2C"), "name", "package"],
  721. referencedClasses: []
  722. }),
  723. smalltalk.PackageDocChapter);
  724. smalltalk.addMethod(
  725. unescape('_initializeWithPackage_'),
  726. smalltalk.method({
  727. selector: unescape('initializeWithPackage%3A'),
  728. category: 'initialization',
  729. fn: function (aPackage){
  730. var self=this;
  731. (self['@package']=aPackage);
  732. (self['@chapters']=smalltalk.send(smalltalk.send(smalltalk.send(aPackage, "_classes", []), "_sorted_", [(function(a, b){return ((($receiver = smalltalk.send(a, "_name", [])).klass === smalltalk.Number) ? $receiver <smalltalk.send(b, "_name", []) : smalltalk.send($receiver, "__lt", [smalltalk.send(b, "_name", [])]));})]), "_collect_", [(function(each){return (function($rec){smalltalk.send($rec, "_parent_", [self]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.ClassDocChapter || ClassDocChapter), "_on_", [each]));})]));
  733. return self;},
  734. args: ["aPackage"],
  735. source: unescape('initializeWithPackage%3A%20aPackage%0A%09package%20%3A%3D%20aPackage.%0A%09chapters%20%3A%3D%20%28aPackage%20classes%20sorted%3A%20%5B%3Aa%20%3Ab%20%7C%20a%20name%20%3C%20b%20name%5D%29%20collect%3A%20%5B%3Aeach%20%7C%0A%09%09%28ClassDocChapter%20on%3A%20each%29%0A%09%09%09parent%3A%20self%3B%0A%09%09%09yourself%5D'),
  736. messageSends: ["collect:", "sorted:", "classes", unescape("%3C"), "name", "parent:", "yourself", "on:"],
  737. referencedClasses: ["ClassDocChapter"]
  738. }),
  739. smalltalk.PackageDocChapter);
  740. smalltalk.addMethod(
  741. unescape('_on_'),
  742. smalltalk.method({
  743. selector: unescape('on%3A'),
  744. category: 'instance creation',
  745. fn: function (aPackage){
  746. var self=this;
  747. return (function($rec){smalltalk.send($rec, "_initializeWithPackage_", [aPackage]);smalltalk.send($rec, "_initialize", []);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_basicNew", []));
  748. return self;},
  749. args: ["aPackage"],
  750. source: unescape('on%3A%20aPackage%0A%09%5Eself%20basicNew%0A%09%09initializeWithPackage%3A%20aPackage%3B%0A%09%09initialize%3B%0A%09%09yourself'),
  751. messageSends: ["initializeWithPackage:", "initialize", "yourself", "basicNew"],
  752. referencedClasses: []
  753. }),
  754. smalltalk.PackageDocChapter.klass);
  755. smalltalk.addClass('ClassDocChapter', smalltalk.DocChapter, ['theClass'], 'Documentation');
  756. smalltalk.addMethod(
  757. unescape('_theClass'),
  758. smalltalk.method({
  759. selector: unescape('theClass'),
  760. category: 'accessing',
  761. fn: function (){
  762. var self=this;
  763. return self['@theClass'];
  764. return self;},
  765. args: [],
  766. source: unescape('theClass%0A%09%5EtheClass'),
  767. messageSends: [],
  768. referencedClasses: []
  769. }),
  770. smalltalk.ClassDocChapter);
  771. smalltalk.addMethod(
  772. unescape('_contents'),
  773. smalltalk.method({
  774. selector: unescape('contents'),
  775. category: 'accessing',
  776. fn: function (){
  777. var self=this;
  778. return ((($receiver = smalltalk.send(smalltalk.send(smalltalk.send(self, "_theClass", []), "_comment", []), "_isEmpty", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(smalltalk.send(smalltalk.send(self, "_theClass", []), "_name", []), "__comma", [" is not documented yet."]);})() : (function(){return smalltalk.send(smalltalk.send(self, "_theClass", []), "_comment", []);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(smalltalk.send(smalltalk.send(self, "_theClass", []), "_name", []), "__comma", [" is not documented yet."]);}), (function(){return smalltalk.send(smalltalk.send(self, "_theClass", []), "_comment", []);})]));
  779. return self;},
  780. args: [],
  781. source: unescape('contents%0A%09%5Eself%20theClass%20comment%20isEmpty%0A%09%09ifTrue%3A%20%5Bself%20theClass%20name%2C%20%27%20is%20not%20documented%20yet.%27%5D%0A%09%09ifFalse%3A%20%5Bself%20theClass%20comment%5D'),
  782. messageSends: ["ifTrue:ifFalse:", "isEmpty", "comment", "theClass", unescape("%2C"), "name"],
  783. referencedClasses: []
  784. }),
  785. smalltalk.ClassDocChapter);
  786. smalltalk.addMethod(
  787. unescape('_cssClass'),
  788. smalltalk.method({
  789. selector: unescape('cssClass'),
  790. category: 'accessing',
  791. fn: function (){
  792. var self=this;
  793. return smalltalk.send("doc_class ", "__comma", [smalltalk.send(self, "_cssClass", [], smalltalk.DocChapter)]);
  794. return self;},
  795. args: [],
  796. source: unescape('cssClass%0A%09%5E%27doc_class%20%27%2C%20super%20cssClass'),
  797. messageSends: [unescape("%2C"), "cssClass"],
  798. referencedClasses: []
  799. }),
  800. smalltalk.ClassDocChapter);
  801. smalltalk.addMethod(
  802. unescape('_title'),
  803. smalltalk.method({
  804. selector: unescape('title'),
  805. category: 'accessing',
  806. fn: function (){
  807. var self=this;
  808. return smalltalk.send(smalltalk.send(self, "_theClass", []), "_name", []);
  809. return self;},
  810. args: [],
  811. source: unescape('title%0A%09%5Eself%20theClass%20name'),
  812. messageSends: ["name", "theClass"],
  813. referencedClasses: []
  814. }),
  815. smalltalk.ClassDocChapter);
  816. smalltalk.addMethod(
  817. unescape('_initializeWithClass_'),
  818. smalltalk.method({
  819. selector: unescape('initializeWithClass%3A'),
  820. category: 'accessing',
  821. fn: function (aClass){
  822. var self=this;
  823. (self['@theClass']=aClass);
  824. return self;},
  825. args: ["aClass"],
  826. source: unescape('initializeWithClass%3A%20aClass%0A%09theClass%20%3A%3D%20aClass'),
  827. messageSends: [],
  828. referencedClasses: []
  829. }),
  830. smalltalk.ClassDocChapter);
  831. smalltalk.addMethod(
  832. unescape('_renderLinksOn_'),
  833. smalltalk.method({
  834. selector: unescape('renderLinksOn%3A'),
  835. category: 'rendering',
  836. fn: function (html){
  837. var self=this;
  838. (function($rec){smalltalk.send($rec, "_class_", ["links"]);return smalltalk.send($rec, "_with_", [(function(){return smalltalk.send(smalltalk.send(html, "_li", []), "_with_", [(function(){return (function($rec){smalltalk.send($rec, "_with_", ["Browse this class"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send((smalltalk.Browser || Browser), "_openOn_", [smalltalk.send(self, "_theClass", [])]);})]);})(smalltalk.send(html, "_a", []));})]);})]);})(smalltalk.send(html, "_ul", []));
  839. return self;},
  840. args: ["html"],
  841. source: unescape('renderLinksOn%3A%20html%0A%09html%20ul%20%0A%09%09class%3A%20%27links%27%3B%0A%09%09with%3A%20%5B%0A%09%09%09html%20li%20with%3A%20%5Bhtml%20a%0A%09%09%09%09with%3A%20%27Browse%20this%20class%27%3B%0A%09%09%09%09onClick%3A%20%5BBrowser%20openOn%3A%20self%20theClass%5D%5D%5D'),
  842. messageSends: ["class:", "with:", "li", "onClick:", "openOn:", "theClass", "a", "ul"],
  843. referencedClasses: ["Browser"]
  844. }),
  845. smalltalk.ClassDocChapter);
  846. smalltalk.addMethod(
  847. unescape('_subscribe'),
  848. smalltalk.method({
  849. selector: unescape('subscribe'),
  850. category: 'subscriptions',
  851. fn: function (){
  852. var self=this;
  853. smalltalk.send(self, "_subscribe", [], smalltalk.DocChapter);
  854. smalltalk.send(smalltalk.send(self, "_announcer", []), "_on_do_", [(smalltalk.ClassSelectionAnnouncement || ClassSelectionAnnouncement), (function(ann){return ((($receiver = smalltalk.send(smalltalk.send(ann, "_theClass", []), "__eq", [smalltalk.send(self, "_theClass", [])])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_selectChapter_", [self]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(self, "_selectChapter_", [self]);})]));})]);
  855. return self;},
  856. args: [],
  857. source: unescape('subscribe%0A%09super%20subscribe.%0A%09self%20announcer%20%0A%09%09on%3A%20ClassSelectionAnnouncement%20do%3A%20%5B%3Aann%20%7C%0A%09%09%09ann%20theClass%20%3D%20self%20theClass%20ifTrue%3A%20%5B%0A%09%09%09%09self%20selectChapter%3A%20self%5D%5D'),
  858. messageSends: ["subscribe", "on:do:", "announcer", "ifTrue:", unescape("%3D"), "theClass", "selectChapter:"],
  859. referencedClasses: ["ClassSelectionAnnouncement"]
  860. }),
  861. smalltalk.ClassDocChapter);
  862. smalltalk.addMethod(
  863. unescape('_on_'),
  864. smalltalk.method({
  865. selector: unescape('on%3A'),
  866. category: 'accessing',
  867. fn: function (aClass){
  868. var self=this;
  869. return (function($rec){smalltalk.send($rec, "_initializeWithClass_", [aClass]);smalltalk.send($rec, "_initialize", []);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_basicNew", []));
  870. return self;},
  871. args: ["aClass"],
  872. source: unescape('on%3A%20aClass%0A%09%5Eself%20basicNew%0A%09%09initializeWithClass%3A%20aClass%3B%0A%09%09initialize%3B%0A%09%09yourself'),
  873. messageSends: ["initializeWithClass:", "initialize", "yourself", "basicNew"],
  874. referencedClasses: []
  875. }),
  876. smalltalk.ClassDocChapter.klass);
  877. smalltalk.addClass('DocumentationWidget', smalltalk.Widget, ['builder', 'selectedChapter', 'chapterDiv'], 'Documentation');
  878. smalltalk.addMethod(
  879. unescape('_builder'),
  880. smalltalk.method({
  881. selector: unescape('builder'),
  882. category: 'accessing',
  883. fn: function (){
  884. var self=this;
  885. return self['@builder'];
  886. return self;},
  887. args: [],
  888. source: unescape('builder%0A%09%5Ebuilder'),
  889. messageSends: [],
  890. referencedClasses: []
  891. }),
  892. smalltalk.DocumentationWidget);
  893. smalltalk.addMethod(
  894. unescape('_builder_'),
  895. smalltalk.method({
  896. selector: unescape('builder%3A'),
  897. category: 'accessing',
  898. fn: function (aDocumentationBuilder){
  899. var self=this;
  900. (self['@builder']=aDocumentationBuilder);
  901. return self;},
  902. args: ["aDocumentationBuilder"],
  903. source: unescape('builder%3A%20aDocumentationBuilder%0A%09builder%20%3A%3D%20aDocumentationBuilder'),
  904. messageSends: [],
  905. referencedClasses: []
  906. }),
  907. smalltalk.DocumentationWidget);
  908. smalltalk.addMethod(
  909. unescape('_chapters'),
  910. smalltalk.method({
  911. selector: unescape('chapters'),
  912. category: 'accessing',
  913. fn: function (){
  914. var self=this;
  915. return smalltalk.send(smalltalk.send(self, "_builder", []), "_chapters", []);
  916. return self;},
  917. args: [],
  918. source: unescape('chapters%0A%09%5Eself%20builder%20chapters'),
  919. messageSends: ["chapters", "builder"],
  920. referencedClasses: []
  921. }),
  922. smalltalk.DocumentationWidget);
  923. smalltalk.addMethod(
  924. unescape('_selectedChapter'),
  925. smalltalk.method({
  926. selector: unescape('selectedChapter'),
  927. category: 'accessing',
  928. fn: function (){
  929. var self=this;
  930. return (($receiver = self['@selectedChapter']) == nil || $receiver == undefined) ? (function(){return (self['@selectedChapter']=smalltalk.send(smalltalk.send(self, "_chapters", []), "_first", []));})() : $receiver;
  931. return self;},
  932. args: [],
  933. source: unescape('selectedChapter%0A%09%5EselectedChapter%20ifNil%3A%20%5BselectedChapter%20%3A%3D%20self%20chapters%20first%5D'),
  934. messageSends: ["ifNil:", "first", "chapters"],
  935. referencedClasses: []
  936. }),
  937. smalltalk.DocumentationWidget);
  938. smalltalk.addMethod(
  939. unescape('_selectedChapter_'),
  940. smalltalk.method({
  941. selector: unescape('selectedChapter%3A'),
  942. category: 'accessing',
  943. fn: function (aChapter){
  944. var self=this;
  945. return (self['@selectedChapter']=aChapter);
  946. return self;},
  947. args: ["aChapter"],
  948. source: unescape('selectedChapter%3A%20aChapter%0A%09%5EselectedChapter%20%3A%3D%20aChapter'),
  949. messageSends: [],
  950. referencedClasses: []
  951. }),
  952. smalltalk.DocumentationWidget);
  953. smalltalk.addMethod(
  954. unescape('_displayChapter_'),
  955. smalltalk.method({
  956. selector: unescape('displayChapter%3A'),
  957. category: 'actions',
  958. fn: function (aChapter){
  959. var self=this;
  960. smalltalk.send(self, "_selectedChapter_", [aChapter]);
  961. smalltalk.send(self, "_updateChapterDiv", []);
  962. return self;},
  963. args: ["aChapter"],
  964. source: unescape('displayChapter%3A%20aChapter%0A%09self%20selectedChapter%3A%20aChapter.%0A%09self%20updateChapterDiv'),
  965. messageSends: ["selectedChapter:", "updateChapterDiv"],
  966. referencedClasses: []
  967. }),
  968. smalltalk.DocumentationWidget);
  969. smalltalk.addMethod(
  970. unescape('_selectChapter_'),
  971. smalltalk.method({
  972. selector: unescape('selectChapter%3A'),
  973. category: 'actions',
  974. fn: function (aChapter){
  975. var self=this;
  976. smalltalk.send(smalltalk.send((typeof document == 'undefined' ? nil : document), "_location", []), "_hash_", [smalltalk.send(aChapter, "_id", [])]);
  977. return self;},
  978. args: ["aChapter"],
  979. source: unescape('selectChapter%3A%20aChapter%0A%09document%20location%20hash%3A%20aChapter%20id'),
  980. messageSends: ["hash:", "location", "id"],
  981. referencedClasses: []
  982. }),
  983. smalltalk.DocumentationWidget);
  984. smalltalk.addMethod(
  985. unescape('_renderOn_'),
  986. smalltalk.method({
  987. selector: unescape('renderOn%3A'),
  988. category: 'rendering',
  989. fn: function (html){
  990. var self=this;
  991. (function($rec){smalltalk.send($rec, "_class_", ["documentation"]);return smalltalk.send($rec, "_with_", [(function(){smalltalk.send(self, "_renderMenuOn_", [html]);(self['@chapterDiv']=smalltalk.send(html, "_div", []));return smalltalk.send(self, "_updateChapterDiv", []);})]);})(smalltalk.send(html, "_div", []));
  992. return self;},
  993. args: ["html"],
  994. source: unescape('renderOn%3A%20html%0A%09html%20div%20%0A%09%09class%3A%20%27documentation%27%3B%0A%09%09with%3A%20%5B%0A%09%09%09self%20renderMenuOn%3A%20html.%0A%09%09%09chapterDiv%20%3A%3D%20html%20div.%0A%09%09%09self%20updateChapterDiv%5D'),
  995. messageSends: ["class:", "with:", "renderMenuOn:", "div", "updateChapterDiv"],
  996. referencedClasses: []
  997. }),
  998. smalltalk.DocumentationWidget);
  999. smalltalk.addMethod(
  1000. unescape('_renderMenuOn_'),
  1001. smalltalk.method({
  1002. selector: unescape('renderMenuOn%3A'),
  1003. category: 'rendering',
  1004. fn: function (html){
  1005. var self=this;
  1006. (function($rec){smalltalk.send($rec, "_class_", ["menu"]);return smalltalk.send($rec, "_with_", [(function(){return smalltalk.send(smalltalk.send(html, "_ol", []), "_with_", [(function(){return smalltalk.send(smalltalk.send(self, "_chapters", []), "_do_", [(function(each){return smalltalk.send(smalltalk.send(html, "_li", []), "_with_", [(function(){return smalltalk.send(self, "_renderChapterMenu_on_", [each, html]);})]);})]);})]);})]);})(smalltalk.send(html, "_div", []));
  1007. return self;},
  1008. args: ["html"],
  1009. source: unescape('renderMenuOn%3A%20html%0A%09html%20div%20%0A%09%09class%3A%20%27menu%27%3B%0A%09%09with%3A%20%5B%0A%09%09%09html%20ol%20with%3A%20%5B%0A%09%09%09%09self%20chapters%20do%3A%20%5B%3Aeach%20%7C%0A%09%09%09%09%09html%20li%20with%3A%20%5B%0A%09%09%09%09%09%09self%20renderChapterMenu%3A%20each%20on%3A%20html%5D%5D%5D%5D'),
  1010. messageSends: ["class:", "with:", "ol", "do:", "chapters", "li", "renderChapterMenu:on:", "div"],
  1011. referencedClasses: []
  1012. }),
  1013. smalltalk.DocumentationWidget);
  1014. smalltalk.addMethod(
  1015. unescape('_renderChapterMenu_on_'),
  1016. smalltalk.method({
  1017. selector: unescape('renderChapterMenu%3Aon%3A'),
  1018. category: 'rendering',
  1019. fn: function (aChapter, html){
  1020. var self=this;
  1021. (function($rec){smalltalk.send($rec, "_with_", [smalltalk.send(aChapter, "_title", [])]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_selectChapter_", [aChapter]);})]);})(smalltalk.send(html, "_a", []));
  1022. smalltalk.send(smalltalk.send(html, "_ol", []), "_with_", [(function(){return smalltalk.send(smalltalk.send(aChapter, "_chapters", []), "_do_", [(function(each){return smalltalk.send(smalltalk.send(html, "_li", []), "_with_", [(function(){return smalltalk.send(self, "_renderChapterMenu_on_", [each, html]);})]);})]);})]);
  1023. return self;},
  1024. args: ["aChapter", "html"],
  1025. source: unescape('renderChapterMenu%3A%20aChapter%20on%3A%20html%0A%09html%20a%0A%09%09with%3A%20aChapter%20title%3B%0A%09%09onClick%3A%20%5B%0A%09%09%09self%20selectChapter%3A%20aChapter%5D.%0A%09html%20ol%20with%3A%20%5B%0A%09%09%09aChapter%20chapters%20do%3A%20%5B%3Aeach%20%7C%0A%09%09%09%09html%20li%20with%3A%20%5B%0A%09%09%09%09%09self%20renderChapterMenu%3A%20each%20on%3A%20html%5D%5D%5D'),
  1026. messageSends: ["with:", "title", "onClick:", "selectChapter:", "a", "ol", "do:", "chapters", "li", "renderChapterMenu:on:"],
  1027. referencedClasses: []
  1028. }),
  1029. smalltalk.DocumentationWidget);
  1030. smalltalk.addMethod(
  1031. unescape('_updateChapterDiv'),
  1032. smalltalk.method({
  1033. selector: unescape('updateChapterDiv'),
  1034. category: 'updating',
  1035. fn: function (){
  1036. var self=this;
  1037. smalltalk.send(self['@chapterDiv'], "_contents_", [(function(html){return smalltalk.send(html, "_with_", [smalltalk.send(self, "_selectedChapter", [])]);})]);
  1038. return self;},
  1039. args: [],
  1040. source: unescape('updateChapterDiv%0A%09chapterDiv%20contents%3A%20%5B%3Ahtml%20%7C%0A%09%09html%20with%3A%20self%20selectedChapter%5D'),
  1041. messageSends: ["contents:", "with:", "selectedChapter"],
  1042. referencedClasses: []
  1043. }),
  1044. smalltalk.DocumentationWidget);
  1045. smalltalk.addMethod(
  1046. unescape('_on_'),
  1047. smalltalk.method({
  1048. selector: unescape('on%3A'),
  1049. category: 'instance creation',
  1050. fn: function (aBuilder){
  1051. var self=this;
  1052. return (function($rec){smalltalk.send($rec, "_builder_", [aBuilder]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  1053. return self;},
  1054. args: ["aBuilder"],
  1055. source: unescape('on%3A%20aBuilder%0A%09%5Eself%20new%0A%09%09builder%3A%20aBuilder%3B%0A%09%09yourself'),
  1056. messageSends: ["builder:", "yourself", "new"],
  1057. referencedClasses: []
  1058. }),
  1059. smalltalk.DocumentationWidget.klass);
  1060. smalltalk.addClass('ClassesIndexChapter', smalltalk.DocChapter, [], 'Documentation');
  1061. smalltalk.addMethod(
  1062. unescape('_cssClass'),
  1063. smalltalk.method({
  1064. selector: unescape('cssClass'),
  1065. category: 'accessing',
  1066. fn: function (){
  1067. var self=this;
  1068. return smalltalk.send("index_doc ", "__comma", [smalltalk.send(self, "_cssClass", [], smalltalk.DocChapter)]);
  1069. return self;},
  1070. args: [],
  1071. source: unescape('cssClass%0A%09%5E%27index_doc%20%27%2C%20super%20cssClass'),
  1072. messageSends: [unescape("%2C"), "cssClass"],
  1073. referencedClasses: []
  1074. }),
  1075. smalltalk.ClassesIndexChapter);
  1076. smalltalk.addMethod(
  1077. unescape('_title'),
  1078. smalltalk.method({
  1079. selector: unescape('title'),
  1080. category: 'accessing',
  1081. fn: function (){
  1082. var self=this;
  1083. return "Smalltalk classes by index";
  1084. return self;},
  1085. args: [],
  1086. source: unescape('title%0A%09%5E%27Smalltalk%20classes%20by%20index%27'),
  1087. messageSends: [],
  1088. referencedClasses: []
  1089. }),
  1090. smalltalk.ClassesIndexChapter);
  1091. smalltalk.addMethod(
  1092. unescape('_alphabet'),
  1093. smalltalk.method({
  1094. selector: unescape('alphabet'),
  1095. category: 'accessing',
  1096. fn: function (){
  1097. var self=this;
  1098. return "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
  1099. return self;},
  1100. args: [],
  1101. source: unescape('alphabet%0A%09%5E%27ABCDEFGHIJKLMNOPQRSTUVWXYZ%27'),
  1102. messageSends: [],
  1103. referencedClasses: []
  1104. }),
  1105. smalltalk.ClassesIndexChapter);
  1106. smalltalk.addMethod(
  1107. unescape('_renderDocOn_'),
  1108. smalltalk.method({
  1109. selector: unescape('renderDocOn%3A'),
  1110. category: 'rendering',
  1111. fn: function (html){
  1112. var self=this;
  1113. smalltalk.send(smalltalk.send(html, "_h1", []), "_with_", [smalltalk.send(self, "_title", [])]);
  1114. smalltalk.send(smalltalk.send(self, "_alphabet", []), "_do_", [(function(letter){var classes=nil;
  1115. (classes=smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_classes", []), "_select_", [(function(each){return smalltalk.send(smalltalk.send(smalltalk.send(each, "_name", []), "_first", []), "__eq", [letter]);})]));smalltalk.send(classes, "_ifNotEmpty_", [(function(){return smalltalk.send(smalltalk.send(html, "_h2", []), "_with_", [letter]);})]);return smalltalk.send(smalltalk.send(html, "_ul", []), "_with_", [(function(){return smalltalk.send(smalltalk.send(classes, "_sorted_", [(function(a, b){return ((($receiver = smalltalk.send(a, "_name", [])).klass === smalltalk.Number) ? $receiver <smalltalk.send(b, "_name", []) : smalltalk.send($receiver, "__lt", [smalltalk.send(b, "_name", [])]));})]), "_do_", [(function(each){return smalltalk.send(smalltalk.send(html, "_li", []), "_with_", [(function(){return (function($rec){smalltalk.send($rec, "_with_", [smalltalk.send(each, "_name", [])]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_selectClass_", [each]);})]);})(smalltalk.send(html, "_a", []));})]);})]);})]);})]);
  1116. return self;},
  1117. args: ["html"],
  1118. source: unescape('renderDocOn%3A%20html%0A%09html%20h1%20with%3A%20self%20title.%0A%09self%20alphabet%20do%3A%20%5B%3Aletter%20%7C%7C%20classes%20%7C%0A%09%09classes%20%3A%3D%20Smalltalk%20current%20classes%20select%3A%20%5B%3Aeach%20%7C%20each%20name%20first%20%3D%20letter%5D.%0A%09%09classes%20ifNotEmpty%3A%20%5Bhtml%20h2%20with%3A%20letter%5D.%0A%09%09html%20ul%20with%3A%20%5B%0A%09%09%09%28classes%20sorted%3A%20%5B%3Aa%20%3Ab%20%7C%20a%20name%20%3C%20b%20name%5D%29%20%0A%09%09%09%09do%3A%20%5B%3Aeach%20%7C%0A%09%09%09%09%09html%20li%20with%3A%20%5Bhtml%20a%20%0A%09%09%09%09%09%09with%3A%20each%20name%3B%0A%09%09%09%09%09%09onClick%3A%20%5Bself%20selectClass%3A%20each%5D%5D%5D%5D%5D'),
  1119. messageSends: ["with:", "h1", "title", "do:", "alphabet", "select:", "classes", "current", unescape("%3D"), "first", "name", "ifNotEmpty:", "h2", "ul", "sorted:", unescape("%3C"), "li", "onClick:", "selectClass:", "a"],
  1120. referencedClasses: ["Smalltalk"]
  1121. }),
  1122. smalltalk.ClassesIndexChapter);
  1123. smalltalk.addClass('ClassSelectionAnnouncement', smalltalk.Object, ['theClass'], 'Documentation');
  1124. smalltalk.addMethod(
  1125. unescape('_theClass'),
  1126. smalltalk.method({
  1127. selector: unescape('theClass'),
  1128. category: 'accessing',
  1129. fn: function (){
  1130. var self=this;
  1131. return self['@theClass'];
  1132. return self;},
  1133. args: [],
  1134. source: unescape('theClass%0A%09%5EtheClass'),
  1135. messageSends: [],
  1136. referencedClasses: []
  1137. }),
  1138. smalltalk.ClassSelectionAnnouncement);
  1139. smalltalk.addMethod(
  1140. unescape('_theClass_'),
  1141. smalltalk.method({
  1142. selector: unescape('theClass%3A'),
  1143. category: 'accessing',
  1144. fn: function (aClass){
  1145. var self=this;
  1146. (self['@theClass']=aClass);
  1147. return self;},
  1148. args: ["aClass"],
  1149. source: unescape('theClass%3A%20aClass%0A%09theClass%20%3A%3D%20aClass'),
  1150. messageSends: [],
  1151. referencedClasses: []
  1152. }),
  1153. smalltalk.ClassSelectionAnnouncement);
  1154. smalltalk.addMethod(
  1155. unescape('_on_'),
  1156. smalltalk.method({
  1157. selector: unescape('on%3A'),
  1158. category: 'instance creation',
  1159. fn: function (aClass){
  1160. var self=this;
  1161. return (function($rec){smalltalk.send($rec, "_theClass_", [aClass]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  1162. return self;},
  1163. args: ["aClass"],
  1164. source: unescape('on%3A%20aClass%0A%09%5Eself%20new%0A%09%09theClass%3A%20aClass%3B%0A%09%09yourself'),
  1165. messageSends: ["theClass:", "yourself", "new"],
  1166. referencedClasses: []
  1167. }),
  1168. smalltalk.ClassSelectionAnnouncement.klass);
  1169. smalltalk.addClass('ChapterSelectionAnnouncement', smalltalk.Object, ['id'], 'Documentation');
  1170. smalltalk.addMethod(
  1171. unescape('_id'),
  1172. smalltalk.method({
  1173. selector: unescape('id'),
  1174. category: 'accessing',
  1175. fn: function (){
  1176. var self=this;
  1177. return self['@id'];
  1178. return self;},
  1179. args: [],
  1180. source: unescape('id%0A%09%5Eid'),
  1181. messageSends: [],
  1182. referencedClasses: []
  1183. }),
  1184. smalltalk.ChapterSelectionAnnouncement);
  1185. smalltalk.addMethod(
  1186. unescape('_id_'),
  1187. smalltalk.method({
  1188. selector: unescape('id%3A'),
  1189. category: 'accessing',
  1190. fn: function (aString){
  1191. var self=this;
  1192. (self['@id']=aString);
  1193. return self;},
  1194. args: ["aString"],
  1195. source: unescape('id%3A%20aString%0A%09id%20%3A%3D%20aString'),
  1196. messageSends: [],
  1197. referencedClasses: []
  1198. }),
  1199. smalltalk.ChapterSelectionAnnouncement);
  1200. smalltalk.addClass('TutorialsChapter', smalltalk.DocChapter, [], 'Documentation');
  1201. smalltalk.addMethod(
  1202. unescape('_title'),
  1203. smalltalk.method({
  1204. selector: unescape('title'),
  1205. category: 'accessing',
  1206. fn: function (){
  1207. var self=this;
  1208. return "Tutorials";
  1209. return self;},
  1210. args: [],
  1211. source: unescape('title%0A%09%5E%27Tutorials%27'),
  1212. messageSends: [],
  1213. referencedClasses: []
  1214. }),
  1215. smalltalk.TutorialsChapter);
  1216. smalltalk.addMethod(
  1217. unescape('_contents'),
  1218. smalltalk.method({
  1219. selector: unescape('contents'),
  1220. category: 'accessing',
  1221. fn: function (){
  1222. var self=this;
  1223. return unescape("Here%27s%20a%20serie%20of%20tutorials.%20If%20you%20are%20new%20to%20Smalltalk%2C%20you%20can%20also%20learn%20Amber%20online%20with%20%5BProfStef%5D%28http%3A//www.amber-lang.net/learn.html%29");
  1224. return self;},
  1225. args: [],
  1226. source: unescape('contents%0A%09%5E%27Here%27%27s%20a%20serie%20of%20tutorials.%20If%20you%20are%20new%20to%20Smalltalk%2C%20you%20can%20also%20learn%20Amber%20online%20with%20%5BProfStef%5D%28http%3A//www.amber-lang.net/learn.html%29%27'),
  1227. messageSends: [],
  1228. referencedClasses: []
  1229. }),
  1230. smalltalk.TutorialsChapter);
  1231. smalltalk.addMethod(
  1232. unescape('_chapters'),
  1233. smalltalk.method({
  1234. selector: unescape('chapters'),
  1235. category: 'accessing',
  1236. fn: function (){
  1237. var self=this;
  1238. return [smalltalk.send(self, "_firstAppChapter", []),smalltalk.send(self, "_counterChapter", [])];
  1239. return self;},
  1240. args: [],
  1241. source: unescape('chapters%0A%09%5E%7B%20self%20firstAppChapter.%20self%20counterChapter%20%7D'),
  1242. messageSends: ["firstAppChapter", "counterChapter"],
  1243. referencedClasses: []
  1244. }),
  1245. smalltalk.TutorialsChapter);
  1246. smalltalk.addMethod(
  1247. unescape('_firstAppChapter'),
  1248. smalltalk.method({
  1249. selector: unescape('firstAppChapter'),
  1250. category: 'accessing',
  1251. fn: function (){
  1252. var self=this;
  1253. return (function($rec){smalltalk.send($rec, "_title_", ["A first application"]);return smalltalk.send($rec, "_contents_", [unescape("%0A%0ALet%27s%20make%20Hello%20World%20in%20Amber.%0A%0AFirst%2C%20you%20need%20a%20place%20for%20your%20new%20project.%20I%20made%20a%20new%20directory%20under%20amber%3A%0A%0A%20%20%20%20amber/projects/hello%0A%0AThis%20will%20store%20your%20project%20files.%20To%20get%20started%2C%20add%20a%20new%20index.html%20file%20to%20this%20folder%2C%20as%20well%20as%20empty%20js%20and%20st%20folders.%0A%0AYour%20index.html%20can%20be%20really%20basic.%20The%20most%20important%20thing%20it%20does%20is%20include%20amber.js%20and%20run%20loadAmber.%20Here%20is%20a%20basic%20index.html%20you%20can%20use%3A%0A%0A%0A%20%20%20%20%3C%21DOCTYPE%20html%3E%0A%20%20%20%20%3Chtml%3E%0A%20%20%20%20%20%20%3Chead%3E%0A%20%20%20%20%20%20%20%20%3Ctitle%3EMy%20First%20Amber%20Project%3C/title%3E%0A%20%20%20%20%20%20%20%20%3Cscript%20src%3D%22../../js/amber.js%22%20type%3D%22text/javascript%22%3E%3C/script%3E%0A%20%20%20%20%20%20%20%20%3Cscript%20type%3D%22text/javascript%22%3E%0A%20%20%20%20%20%20%20%20%20%20loadAmber%28%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20files%3A%20%5B%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20prefix%3A%20%27projects/hello/js%27%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20ready%3A%20function%28%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%7D%29%3B%20%0A%20%20%20%20%20%20%20%20%3C/script%3E%0A%20%20%20%20%20%20%3C/head%3E%0A%20%20%20%20%20%20%3Cbody%3E%0A%20%20%20%20%20%20%20%20%3Carticle%3E%0A%20%20%20%20%20%20%20%20%20%20%3Ch1%3EMy%20First%20Amber%20Project%3C/h1%3E%0A%20%20%20%20%20%20%20%20%20%20%3Cbutton%20onclick%3D%22smalltalk.Browser._open%28%29%22%3Eclass%20browser%3C/button%3E%0A%20%20%20%20%20%20%20%20%20%20%3Cbutton%20id%3D%22sayHello%22%3Esay%20hello%3C/button%3E%0A%20%20%20%20%20%20%20%20%3C/article%3E%0A%20%20%20%20%20%20%3C/body%3E%0A%20%20%20%20%3C/html%3E%0A%0ANow%20start%20up%20amber%20with%20node.js%20and%20navigate%20to%20%20http%3A//localhost%3A4000/projects/hello/index.html%0A%0AIt%27s%20boring%20so%20far%2C%20so%20lets%20write%20some%20code.%20Click%20the%20button%20to%20open%20the%20class%20browser.%20Find%20an%20existing%20class%20and%20change%20its%20name%20to%20Hello%20and%20its%20package%20to%20HelloApp.%20%0AThen%20click%20save.%20This%20creates%20a%20new%20class%20and%20leaves%20the%20old%20one%20intact%2C%20it%20doesn%27t%20overwrite%20it.%20Your%20class%20will%20look%20like%20this%3A%0A%0A%20%20%20%20Object%20subclass%3A%20%23Hello%0A%20%20%20%20%20%20%20%20instanceVariableNames%3A%20%27%27%0A%20%20%20%20%20%20%20%20package%3A%20%27HelloApp%27%0A%0ANow%20click%20save%20and%20navigate%20to%20your%20new%20class%20in%20its%20new%20package.%0A%20Then%20click%20%27commit%20package%27.%20You%20just%20created%20a%20new%20class%20and%20saved%20your%20work.%20%0AOn%20your%20file%20system%20check%20out%20your%20js%20and%20st%20folders.%20Your%20new%20class%20is%20now%20saved%20in%20both%20JavaScript%20and%20Smalltalk.%0A%0ANow%2C%20refresh%20your%20browser%20page%20and%20reopen%20the%20class%20browser.%20Oh%20no%2C%20your%20new%20class%20is%20gone%21%20To%20load%20your%20new%20class%20automatically%2C%20you%20have%20to%20add%20it%20in%20index.html.%20Make%20your%20JavaScript%20look%20like%20this%3A%0A%0A%0A%20%20%20%20loadAmber%28%7B%0A%20%20%20%20%20%20%20%20files%3A%20%5B%27HelloApp.js%27%5D%2C%0A%20%20%20%20%20%20%20%20prefix%3A%20%27projects/hello/js%27%2C%0A%20%20%20%20%20%20%20%20ready%3A%20function%28%29%20%7B%20%20%20%20%20%20%0A%20%20%20%20%7D%7D%29%3B%20%0A%0ASave%20and%20refresh%20again.%20Now%20your%20class%20is%20loaded%20and%20shows%20up%20in%20the%20class%20browser.%0A%0ANow%2C%20let%27s%20make%20this%20class%20do%20something.%20Create%20a%20new%20message%20in%20the%20class%20browser%20by%20navigating%20to%20your%20class%2C%20then%20clicking%20%27not%20yet%20classified%27%20and%20fill%20in%20a%20simple%20message.%20Try%20this%20for%20example%3A%0A%0A%20%20%20%20begin%0A%09%22Makes%20me%20say%20hello%20to%20the%20user.%22%0A%0A%09%7C%20msg%20button%20%7C%0A%09msg%20%3A%3D%20%27Hello%20world%21%27.%0A%09button%20%3A%3D%20%27%23sayHello%27%20asJQuery.%0A%09button%20click%3A%20%5Bbutton%20after%3A%20%27%3Cp%3E%27%20%2C%20msg%20%2C%20%27%3C/p%3E%27%5D.%0A%0AYour%20message%20isn%27t%20too%20helpful%20if%20it%20doesn%27t%20get%20called.%20Save%20it%2C%20commit%20the%20package%2C%20then%20edit%20index.html%20again.%20You%20can%20write%20JavaScript%20code%20that%20sends%20a%20message%20to%20Smalltalk%3A%0A%0A%20%20%20%20loadAmber%28%7B%0A%20%20%20%20%20%20%20%20files%3A%20%5B%27HelloApp.js%27%5D%2C%0A%20%20%20%20%20%20%20%20prefix%3A%20%27projects/hello/js%27%2C%20//%20path%20for%20js%20files%20i%20think%0A%20%20%20%20%20%20%20%20ready%3A%20function%28%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20%24%28function%28%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20smalltalk.Hello._new%28%29._begin%28%29%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%29%3B%0A%20%20%20%20%7D%7D%29%3B%20%0A%0AFrom%20there%2C%20you%20can%20create%20new%20Smalltalk%20classes%20and%20messages%20to%20build%20up%20your%20app.%20Enjoy%21%0A")]);})(smalltalk.send((smalltalk.DocChapter || DocChapter), "_new", []));
  1254. return self;},
  1255. args: [],
  1256. source: unescape('firstAppChapter%0A%09%5EDocChapter%20new%0A%09%09title%3A%20%27A%20first%20application%27%3B%0A%09%09contents%3A%20%27%0A%0ALet%27%27s%20make%20Hello%20World%20in%20Amber.%0A%0AFirst%2C%20you%20need%20a%20place%20for%20your%20new%20project.%20I%20made%20a%20new%20directory%20under%20amber%3A%0A%0A%20%20%20%20amber/projects/hello%0A%0AThis%20will%20store%20your%20project%20files.%20To%20get%20started%2C%20add%20a%20new%20index.html%20file%20to%20this%20folder%2C%20as%20well%20as%20empty%20js%20and%20st%20folders.%0A%0AYour%20index.html%20can%20be%20really%20basic.%20The%20most%20important%20thing%20it%20does%20is%20include%20amber.js%20and%20run%20loadAmber.%20Here%20is%20a%20basic%20index.html%20you%20can%20use%3A%0A%0A%0A%20%20%20%20%3C%21DOCTYPE%20html%3E%0A%20%20%20%20%3Chtml%3E%0A%20%20%20%20%20%20%3Chead%3E%0A%20%20%20%20%20%20%20%20%3Ctitle%3EMy%20First%20Amber%20Project%3C/title%3E%0A%20%20%20%20%20%20%20%20%3Cscript%20src%3D%22../../js/amber.js%22%20type%3D%22text/javascript%22%3E%3C/script%3E%0A%20%20%20%20%20%20%20%20%3Cscript%20type%3D%22text/javascript%22%3E%0A%20%20%20%20%20%20%20%20%20%20loadAmber%28%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20files%3A%20%5B%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20prefix%3A%20%27%27projects/hello/js%27%27%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20ready%3A%20function%28%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%7D%29%3B%20%0A%20%20%20%20%20%20%20%20%3C/script%3E%0A%20%20%20%20%20%20%3C/head%3E%0A%20%20%20%20%20%20%3Cbody%3E%0A%20%20%20%20%20%20%20%20%3Carticle%3E%0A%20%20%20%20%20%20%20%20%20%20%3Ch1%3EMy%20First%20Amber%20Project%3C/h1%3E%0A%20%20%20%20%20%20%20%20%20%20%3Cbutton%20onclick%3D%22smalltalk.Browser._open%28%29%22%3Eclass%20browser%3C/button%3E%0A%20%20%20%20%20%20%20%20%20%20%3Cbutton%20id%3D%22sayHello%22%3Esay%20hello%3C/button%3E%0A%20%20%20%20%20%20%20%20%3C/article%3E%0A%20%20%20%20%20%20%3C/body%3E%0A%20%20%20%20%3C/html%3E%0A%0ANow%20start%20up%20amber%20with%20node.js%20and%20navigate%20to%20%20http%3A//localhost%3A4000/projects/hello/index.html%0A%0AIt%27%27s%20boring%20so%20far%2C%20so%20lets%20write%20some%20code.%20Click%20the%20button%20to%20open%20the%20class%20browser.%20Find%20an%20existing%20class%20and%20change%20its%20name%20to%20Hello%20and%20its%20package%20to%20HelloApp.%20%0AThen%20click%20save.%20This%20creates%20a%20new%20class%20and%20leaves%20the%20old%20one%20intact%2C%20it%20doesn%27%27t%20overwrite%20it.%20Your%20class%20will%20look%20like%20this%3A%0A%0A%20%20%20%20Object%20subclass%3A%20%23Hello%0A%20%20%20%20%20%20%20%20instanceVariableNames%3A%20%27%27%27%27%0A%20%20%20%20%20%20%20%20package%3A%20%27%27HelloApp%27%27%0A%0ANow%20click%20save%20and%20navigate%20to%20your%20new%20class%20in%20its%20new%20package.%0A%20Then%20click%20%27%27commit%20package%27%27.%20You%20just%20created%20a%20new%20class%20and%20saved%20your%20work.%20%0AOn%20your%20file%20system%20check%20out%20your%20js%20and%20st%20folders.%20Your%20new%20class%20is%20now%20saved%20in%20both%20JavaScript%20and%20Smalltalk.%0A%0ANow%2C%20refresh%20your%20browser%20page%20and%20reopen%20the%20class%20browser.%20Oh%20no%2C%20your%20new%20class%20is%20gone%21%20To%20load%20your%20new%20class%20automatically%2C%20you%20have%20to%20add%20it%20in%20index.html.%20Make%20your%20JavaScript%20look%20like%20this%3A%0A%0A%0A%20%20%20%20loadAmber%28%7B%0A%20%20%20%20%20%20%20%20files%3A%20%5B%27%27HelloApp.js%27%27%5D%2C%0A%20%20%20%20%20%20%20%20prefix%3A%20%27%27projects/hello/js%27%27%2C%0A%20%20%20%20%20%20%20%20ready%3A%20function%28%29%20%7B%20%20%20%20%20%20%0A%20%20%20%20%7D%7D%29%3B%20%0A%0ASave%20and%20refresh%20again.%20Now%20your%20class%20is%20loaded%20and%20shows%20up%20in%20the%20class%20browser.%0A%0ANow%2C%20let%27%27s%20make%20this%20class%20do%20something.%20Create%20a%20new%20message%20in%20the%20class%20browser%20by%20navigating%20to%20your%20class%2C%20then%20clicking%20%27%27not%20yet%20classified%27%27%20and%20fill%20in%20a%20simple%20message.%20Try%20this%20for%20example%3A%0A%0A%20%20%20%20begin%0A%09%22Makes%20me%20say%20hello%20to%20the%20user.%22%0A%0A%09%7C%20msg%20button%20%7C%0A%09msg%20%3A%3D%20%27%27Hello%20world%21%27%27.%0A%09button%20%3A%3D%20%27%27%23sayHello%27%27%20asJQuery.%0A%09button%20click%3A%20%5Bbutton%20after%3A%20%27%27%3Cp%3E%27%27%20%2C%20msg%20%2C%20%27%27%3C/p%3E%27%27%5D.%0A%0AYour%20message%20isn%27%27t%20too%20helpful%20if%20it%20doesn%27%27t%20get%20called.%20Save%20it%2C%20commit%20the%20package%2C%20then%20edit%20index.html%20again.%20You%20can%20write%20JavaScript%20code%20that%20sends%20a%20message%20to%20Smalltalk%3A%0A%0A%20%20%20%20loadAmber%28%7B%0A%20%20%20%20%20%20%20%20files%3A%20%5B%27%27HelloApp.js%27%27%5D%2C%0A%20%20%20%20%20%20%20%20prefix%3A%20%27%27projects/hello/js%27%27%2C%20//%20path%20for%20js%20files%20i%20think%0A%20%20%20%20%20%20%20%20ready%3A%20function%28%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20%24%28function%28%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20smalltalk.Hello._new%28%29._begin%28%29%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%29%3B%0A%20%20%20%20%7D%7D%29%3B%20%0A%0AFrom%20there%2C%20you%20can%20create%20new%20Smalltalk%20classes%20and%20messages%20to%20build%20up%20your%20app.%20Enjoy%21%0A%27'),
  1257. messageSends: ["title:", "contents:", "new"],
  1258. referencedClasses: ["DocChapter"]
  1259. }),
  1260. smalltalk.TutorialsChapter);
  1261. smalltalk.addMethod(
  1262. unescape('_counterChapter'),
  1263. smalltalk.method({
  1264. selector: unescape('counterChapter'),
  1265. category: 'accessing',
  1266. fn: function (){
  1267. var self=this;
  1268. return (function($rec){smalltalk.send($rec, "_title_", ["The counter application"]);return smalltalk.send($rec, "_contents_", [unescape("%0A%0AThis%20tutorial%20will%20teach%20you%20how%20to%20build%20HTML%20with%20Amber%20using%20jQuery%20and%20the%20HTMLCanvas%20API.%20It%20is%20freely%20adapted%20from%20%0Athe%20%5BSeaside%20counter%20example%5D%28http%3A//www.seaside.st/about/examples/counter%29%0A%0A%23%23The%20counter%20widget%0A%0AThe%20counter%20is%20the%20most%20basic%20example%20of%20a%20widget.%20It%20allows%20to%20increment%20and%20decrement%20a%20number%20by%20clicking%20a%20button.%0A%0AAmber%20already%20comes%20with%20a%20counter%20example%20in%20the%20%60Examples%60%20package.%20To%20avoid%20class%20name%20conflict%2C%20we%27ll%20name%20our%20counter%20class%20%60TCounter%60.%0A%0A%20%20%20%20Widget%20subclass%3A%20%23TCounter%0A%20%20%20%20%20%20%20%20instanceVariableNames%3A%20%27count%20header%27%0A%20%20%20%20%20%20%20%20package%3A%20%27Tutorials%27%0A%0AThe%20first%20method%20is%20used%20to%20initialize%20the%20component%20with%20the%20default%20state%2C%20in%20this%20case%20we%20set%20the%20counter%20to%200%3A%0A%0A%20%20%20%20initialize%0A%20%20%20%20%20%20%20%20super%20initialize.%0A%20%20%20%20%20%20%20%20count%20%3A%3D%200%0A%0AThe%20method%20used%20for%20rendering%20a%20widget%20is%20%60%23renderOn%3A%60.%20It%20takes%20an%20instance%20of%20HTMLCanvas%20as%20parameter.%20%0AThe%20%60header%60%20h1%20kept%20as%20an%20instance%20variable%2C%20so%20when%20the%20count%20value%20change%2C%20we%20can%20update%20it%27s%20contents%20accordingly.%0A%0A%20%20%20%20renderOn%3A%20html%0A%20%20%20%20%20%20%20%20header%20%3A%3D%20html%20h1%20%0A%20%20%20%20%20%20%20%20%20%20%20%20with%3A%20count%20asString%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20yourself.%0A%20%20%20%20%20%20%20%20html%20button%0A%20%20%20%20%20%20%20%20%20%20%20%20with%3A%20%27++%27%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20onClick%3A%20%5Bself%20increase%5D.%0A%20%20%20%20%20%20%20%20html%20button%0A%20%20%20%20%20%20%20%20%20%20%20%20with%3A%20%27--%27%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20onClick%3A%20%5Bself%20decrease%5D%0A%0AThe%20counter%20is%20almost%20ready.%20All%20we%20need%20now%20is%20to%20implement%20the%20two%20action%20methods%20%60%23increase%60%20and%20%60%23decrease%60%20to%20change%20the%20state%20%0Aof%20our%20counter%20and%20update%20its%20header.%0A%0A%20%20%20%20increase%0A%20%20%20%20%20%20%20%20count%20%3A%3D%20count%20+%201.%0A%20%20%20%20%20%20%20%20header%20contents%3A%20%5B%3Ahtml%20%7C%20html%20with%3A%20count%20asString%5D%0A%0A%20%20%20%20decrease%0A%20%20%20%20%20%20%20%20count%20%3A%3D%20count%20-%201.%0A%20%20%20%20%20%20%20%20header%20contents%3A%20%5B%3Ahtml%20%7C%20html%20with%3A%20count%20asString%5D%0A%0A%0AThat%27s%20it%21%20We%20can%20now%20display%20an%20instance%20of%20TCounter%20by%20rendering%20it%20on%20the%20page%20using%20jQuery%3A%0A%0A%20%20%20%20TCounter%20new%20appendToJQuery%3A%20%27body%27%20asJQuery%0A%0A")]);})(smalltalk.send((smalltalk.DocChapter || DocChapter), "_new", []));
  1269. return self;},
  1270. args: [],
  1271. source: unescape('counterChapter%0A%09%5EDocChapter%20new%0A%09%09title%3A%20%27The%20counter%20application%27%3B%0A%09%09contents%3A%20%27%0A%0AThis%20tutorial%20will%20teach%20you%20how%20to%20build%20HTML%20with%20Amber%20using%20jQuery%20and%20the%20HTMLCanvas%20API.%20It%20is%20freely%20adapted%20from%20%0Athe%20%5BSeaside%20counter%20example%5D%28http%3A//www.seaside.st/about/examples/counter%29%0A%0A%23%23The%20counter%20widget%0A%0AThe%20counter%20is%20the%20most%20basic%20example%20of%20a%20widget.%20It%20allows%20to%20increment%20and%20decrement%20a%20number%20by%20clicking%20a%20button.%0A%0AAmber%20already%20comes%20with%20a%20counter%20example%20in%20the%20%60Examples%60%20package.%20To%20avoid%20class%20name%20conflict%2C%20we%27%27ll%20name%20our%20counter%20class%20%60TCounter%60.%0A%0A%20%20%20%20Widget%20subclass%3A%20%23TCounter%0A%20%20%20%20%20%20%20%20instanceVariableNames%3A%20%27%27count%20header%27%27%0A%20%20%20%20%20%20%20%20package%3A%20%27%27Tutorials%27%27%0A%0AThe%20first%20method%20is%20used%20to%20initialize%20the%20component%20with%20the%20default%20state%2C%20in%20this%20case%20we%20set%20the%20counter%20to%200%3A%0A%0A%20%20%20%20initialize%0A%20%20%20%20%20%20%20%20super%20initialize.%0A%20%20%20%20%20%20%20%20count%20%3A%3D%200%0A%0AThe%20method%20used%20for%20rendering%20a%20widget%20is%20%60%23renderOn%3A%60.%20It%20takes%20an%20instance%20of%20HTMLCanvas%20as%20parameter.%20%0AThe%20%60header%60%20h1%20kept%20as%20an%20instance%20variable%2C%20so%20when%20the%20count%20value%20change%2C%20we%20can%20update%20it%27%27s%20contents%20accordingly.%0A%0A%20%20%20%20renderOn%3A%20html%0A%20%20%20%20%20%20%20%20header%20%3A%3D%20html%20h1%20%0A%20%20%20%20%20%20%20%20%20%20%20%20with%3A%20count%20asString%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20yourself.%0A%20%20%20%20%20%20%20%20html%20button%0A%20%20%20%20%20%20%20%20%20%20%20%20with%3A%20%27%27++%27%27%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20onClick%3A%20%5Bself%20increase%5D.%0A%20%20%20%20%20%20%20%20html%20button%0A%20%20%20%20%20%20%20%20%20%20%20%20with%3A%20%27%27--%27%27%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20onClick%3A%20%5Bself%20decrease%5D%0A%0AThe%20counter%20is%20almost%20ready.%20All%20we%20need%20now%20is%20to%20implement%20the%20two%20action%20methods%20%60%23increase%60%20and%20%60%23decrease%60%20to%20change%20the%20state%20%0Aof%20our%20counter%20and%20update%20its%20header.%0A%0A%20%20%20%20increase%0A%20%20%20%20%20%20%20%20count%20%3A%3D%20count%20+%201.%0A%20%20%20%20%20%20%20%20header%20contents%3A%20%5B%3Ahtml%20%7C%20html%20with%3A%20count%20asString%5D%0A%0A%20%20%20%20decrease%0A%20%20%20%20%20%20%20%20count%20%3A%3D%20count%20-%201.%0A%20%20%20%20%20%20%20%20header%20contents%3A%20%5B%3Ahtml%20%7C%20html%20with%3A%20count%20asString%5D%0A%0A%0AThat%27%27s%20it%21%20We%20can%20now%20display%20an%20instance%20of%20TCounter%20by%20rendering%20it%20on%20the%20page%20using%20jQuery%3A%0A%0A%20%20%20%20TCounter%20new%20appendToJQuery%3A%20%27%27body%27%27%20asJQuery%0A%0A%27'),
  1272. messageSends: ["title:", "contents:", "new"],
  1273. referencedClasses: ["DocChapter"]
  1274. }),
  1275. smalltalk.TutorialsChapter);