Documentation.js 73 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619
  1. smalltalk.addPackage('Documentation', {});
  2. smalltalk.addClass('ChapterSelectionAnnouncement', smalltalk.Object, ['id'], 'Documentation');
  3. smalltalk.addMethod(
  4. "_id",
  5. smalltalk.method({
  6. selector: "id",
  7. category: 'accessing',
  8. fn: function (){
  9. var self=this;
  10. return smalltalk.withContext(function($ctx1) { var $1;
  11. $1=self["@id"];
  12. return $1;
  13. }, function($ctx1) {$ctx1.fill(self,"id",{}, smalltalk.ChapterSelectionAnnouncement)})},
  14. args: [],
  15. source: "id\x0a\x09^id",
  16. messageSends: [],
  17. referencedClasses: []
  18. }),
  19. smalltalk.ChapterSelectionAnnouncement);
  20. smalltalk.addMethod(
  21. "_id_",
  22. smalltalk.method({
  23. selector: "id:",
  24. category: 'accessing',
  25. fn: function (aString){
  26. var self=this;
  27. return smalltalk.withContext(function($ctx1) { self["@id"]=aString;
  28. return self}, function($ctx1) {$ctx1.fill(self,"id:",{aString:aString}, smalltalk.ChapterSelectionAnnouncement)})},
  29. args: ["aString"],
  30. source: "id: aString\x0a\x09id := aString",
  31. messageSends: [],
  32. referencedClasses: []
  33. }),
  34. smalltalk.ChapterSelectionAnnouncement);
  35. smalltalk.addClass('ClassSelectionAnnouncement', smalltalk.Object, ['theClass'], 'Documentation');
  36. smalltalk.addMethod(
  37. "_theClass",
  38. smalltalk.method({
  39. selector: "theClass",
  40. category: 'accessing',
  41. fn: function (){
  42. var self=this;
  43. return smalltalk.withContext(function($ctx1) { var $1;
  44. $1=self["@theClass"];
  45. return $1;
  46. }, function($ctx1) {$ctx1.fill(self,"theClass",{}, smalltalk.ClassSelectionAnnouncement)})},
  47. args: [],
  48. source: "theClass\x0a\x09^theClass",
  49. messageSends: [],
  50. referencedClasses: []
  51. }),
  52. smalltalk.ClassSelectionAnnouncement);
  53. smalltalk.addMethod(
  54. "_theClass_",
  55. smalltalk.method({
  56. selector: "theClass:",
  57. category: 'accessing',
  58. fn: function (aClass){
  59. var self=this;
  60. return smalltalk.withContext(function($ctx1) { self["@theClass"]=aClass;
  61. return self}, function($ctx1) {$ctx1.fill(self,"theClass:",{aClass:aClass}, smalltalk.ClassSelectionAnnouncement)})},
  62. args: ["aClass"],
  63. source: "theClass: aClass\x0a\x09theClass := aClass",
  64. messageSends: [],
  65. referencedClasses: []
  66. }),
  67. smalltalk.ClassSelectionAnnouncement);
  68. smalltalk.addMethod(
  69. "_on_",
  70. smalltalk.method({
  71. selector: "on:",
  72. category: 'instance creation',
  73. fn: function (aClass){
  74. var self=this;
  75. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  76. $2=_st(self)._new();
  77. _st($2)._theClass_(aClass);
  78. $3=_st($2)._yourself();
  79. $1=$3;
  80. return $1;
  81. }, function($ctx1) {$ctx1.fill(self,"on:",{aClass:aClass}, smalltalk.ClassSelectionAnnouncement.klass)})},
  82. args: ["aClass"],
  83. source: "on: aClass\x0a\x09^self new\x0a\x09\x09theClass: aClass;\x0a\x09\x09yourself",
  84. messageSends: ["theClass:", "new", "yourself"],
  85. referencedClasses: []
  86. }),
  87. smalltalk.ClassSelectionAnnouncement.klass);
  88. smalltalk.addClass('DocChapter', smalltalk.Widget, ['title', 'contents', 'parent', 'level'], 'Documentation');
  89. smalltalk.addMethod(
  90. "_announcer",
  91. smalltalk.method({
  92. selector: "announcer",
  93. category: 'accessing',
  94. fn: function (){
  95. var self=this;
  96. return smalltalk.withContext(function($ctx1) { var $1;
  97. $1=_st(_st((smalltalk.DocumentationBuilder || DocumentationBuilder))._current())._announcer();
  98. return $1;
  99. }, function($ctx1) {$ctx1.fill(self,"announcer",{}, smalltalk.DocChapter)})},
  100. args: [],
  101. source: "announcer\x0a\x09^DocumentationBuilder current announcer",
  102. messageSends: ["announcer", "current"],
  103. referencedClasses: ["DocumentationBuilder"]
  104. }),
  105. smalltalk.DocChapter);
  106. smalltalk.addMethod(
  107. "_chapters",
  108. smalltalk.method({
  109. selector: "chapters",
  110. category: 'accessing',
  111. fn: function (){
  112. var self=this;
  113. return smalltalk.withContext(function($ctx1) { return [];
  114. }, function($ctx1) {$ctx1.fill(self,"chapters",{}, smalltalk.DocChapter)})},
  115. args: [],
  116. source: "chapters\x0a\x09\x22A doc chapter can contain sub chapters\x22\x0a\x09^#()",
  117. messageSends: [],
  118. referencedClasses: []
  119. }),
  120. smalltalk.DocChapter);
  121. smalltalk.addMethod(
  122. "_contents",
  123. smalltalk.method({
  124. selector: "contents",
  125. category: 'accessing',
  126. fn: function (){
  127. var self=this;
  128. return smalltalk.withContext(function($ctx1) { var $2,$1;
  129. $2=self["@contents"];
  130. if(($receiver = $2) == nil || $receiver == undefined){
  131. $1="";
  132. } else {
  133. $1=$2;
  134. };
  135. return $1;
  136. }, function($ctx1) {$ctx1.fill(self,"contents",{}, smalltalk.DocChapter)})},
  137. args: [],
  138. source: "contents\x0a\x09^contents ifNil: ['']",
  139. messageSends: ["ifNil:"],
  140. referencedClasses: []
  141. }),
  142. smalltalk.DocChapter);
  143. smalltalk.addMethod(
  144. "_contents_",
  145. smalltalk.method({
  146. selector: "contents:",
  147. category: 'accessing',
  148. fn: function (aString){
  149. var self=this;
  150. return smalltalk.withContext(function($ctx1) { self["@contents"]=aString;
  151. return self}, function($ctx1) {$ctx1.fill(self,"contents:",{aString:aString}, smalltalk.DocChapter)})},
  152. args: ["aString"],
  153. source: "contents: aString\x0a\x09contents := aString",
  154. messageSends: [],
  155. referencedClasses: []
  156. }),
  157. smalltalk.DocChapter);
  158. smalltalk.addMethod(
  159. "_cssClass",
  160. smalltalk.method({
  161. selector: "cssClass",
  162. category: 'accessing',
  163. fn: function (){
  164. var self=this;
  165. return smalltalk.withContext(function($ctx1) { return "doc_chapter";
  166. }, function($ctx1) {$ctx1.fill(self,"cssClass",{}, smalltalk.DocChapter)})},
  167. args: [],
  168. source: "cssClass\x0a\x09^'doc_chapter'",
  169. messageSends: [],
  170. referencedClasses: []
  171. }),
  172. smalltalk.DocChapter);
  173. smalltalk.addMethod(
  174. "_displayChapter_",
  175. smalltalk.method({
  176. selector: "displayChapter:",
  177. category: 'actions',
  178. fn: function (aChapter){
  179. var self=this;
  180. return smalltalk.withContext(function($ctx1) { _st(_st(_st((smalltalk.DocumentationBuilder || DocumentationBuilder))._current())._widget())._displayChapter_(aChapter);
  181. return self}, function($ctx1) {$ctx1.fill(self,"displayChapter:",{aChapter:aChapter}, smalltalk.DocChapter)})},
  182. args: ["aChapter"],
  183. source: "displayChapter: aChapter\x0a\x09DocumentationBuilder current widget displayChapter: aChapter",
  184. messageSends: ["displayChapter:", "widget", "current"],
  185. referencedClasses: ["DocumentationBuilder"]
  186. }),
  187. smalltalk.DocChapter);
  188. smalltalk.addMethod(
  189. "_htmlContents",
  190. smalltalk.method({
  191. selector: "htmlContents",
  192. category: 'accessing',
  193. fn: function (){
  194. var self=this;
  195. return smalltalk.withContext(function($ctx1) { var $1;
  196. $1=_st(_st(_st((smalltalk.Showdown || Showdown))._at_(smalltalk.symbolFor("converter")))._new())._makeHtml_(_st(self)._contents());
  197. return $1;
  198. }, function($ctx1) {$ctx1.fill(self,"htmlContents",{}, smalltalk.DocChapter)})},
  199. args: [],
  200. source: "htmlContents\x0a\x09^(Showdown at: #converter) new makeHtml: self contents",
  201. messageSends: ["makeHtml:", "contents", "new", "at:"],
  202. referencedClasses: ["Showdown"]
  203. }),
  204. smalltalk.DocChapter);
  205. smalltalk.addMethod(
  206. "_id",
  207. smalltalk.method({
  208. selector: "id",
  209. category: 'accessing',
  210. fn: function (){
  211. var self=this;
  212. return smalltalk.withContext(function($ctx1) { var $1;
  213. $1=_st(_st(self)._title())._replace_with_(" ","-");
  214. return $1;
  215. }, function($ctx1) {$ctx1.fill(self,"id",{}, smalltalk.DocChapter)})},
  216. args: [],
  217. source: "id\x0a\x09\x22The id is used in url fragments. \x0a\x09It must be unique amoung all chapters\x22\x0a\x09^self title replace: ' ' with: '-'",
  218. messageSends: ["replace:with:", "title"],
  219. referencedClasses: []
  220. }),
  221. smalltalk.DocChapter);
  222. smalltalk.addMethod(
  223. "_initialize",
  224. smalltalk.method({
  225. selector: "initialize",
  226. category: 'initialization',
  227. fn: function (){
  228. var self=this;
  229. return smalltalk.withContext(function($ctx1) { smalltalk.Widget.fn.prototype._initialize.apply(_st(self), []);
  230. _st(self)._subscribe();
  231. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.DocChapter)})},
  232. args: [],
  233. source: "initialize\x0a\x09super initialize.\x0a\x09self subscribe",
  234. messageSends: ["initialize", "subscribe"],
  235. referencedClasses: []
  236. }),
  237. smalltalk.DocChapter);
  238. smalltalk.addMethod(
  239. "_level",
  240. smalltalk.method({
  241. selector: "level",
  242. category: 'accessing',
  243. fn: function (){
  244. var self=this;
  245. return smalltalk.withContext(function($ctx1) { var $2,$1;
  246. $2=_st(self)._parent();
  247. if(($receiver = $2) == nil || $receiver == undefined){
  248. $1=(1);
  249. } else {
  250. $1=_st(_st(_st(self)._parent())._level()).__plus((1));
  251. };
  252. return $1;
  253. }, function($ctx1) {$ctx1.fill(self,"level",{}, smalltalk.DocChapter)})},
  254. args: [],
  255. source: "level\x0a\x09^self parent ifNil: [1] ifNotNil: [self parent level +1]",
  256. messageSends: ["ifNil:ifNotNil:", "+", "level", "parent"],
  257. referencedClasses: []
  258. }),
  259. smalltalk.DocChapter);
  260. smalltalk.addMethod(
  261. "_level_",
  262. smalltalk.method({
  263. selector: "level:",
  264. category: 'accessing',
  265. fn: function (anInteger){
  266. var self=this;
  267. return smalltalk.withContext(function($ctx1) { self["@level"]=anInteger;
  268. return self}, function($ctx1) {$ctx1.fill(self,"level:",{anInteger:anInteger}, smalltalk.DocChapter)})},
  269. args: ["anInteger"],
  270. source: "level: anInteger\x0a\x09level := anInteger",
  271. messageSends: [],
  272. referencedClasses: []
  273. }),
  274. smalltalk.DocChapter);
  275. smalltalk.addMethod(
  276. "_parent",
  277. smalltalk.method({
  278. selector: "parent",
  279. category: 'accessing',
  280. fn: function (){
  281. var self=this;
  282. return smalltalk.withContext(function($ctx1) { var $1;
  283. $1=self["@parent"];
  284. return $1;
  285. }, function($ctx1) {$ctx1.fill(self,"parent",{}, smalltalk.DocChapter)})},
  286. args: [],
  287. source: "parent\x0a\x09^parent",
  288. messageSends: [],
  289. referencedClasses: []
  290. }),
  291. smalltalk.DocChapter);
  292. smalltalk.addMethod(
  293. "_parent_",
  294. smalltalk.method({
  295. selector: "parent:",
  296. category: 'accessing',
  297. fn: function (aChapter){
  298. var self=this;
  299. return smalltalk.withContext(function($ctx1) { self["@parent"]=aChapter;
  300. return self}, function($ctx1) {$ctx1.fill(self,"parent:",{aChapter:aChapter}, smalltalk.DocChapter)})},
  301. args: ["aChapter"],
  302. source: "parent: aChapter\x0a\x09parent := aChapter",
  303. messageSends: [],
  304. referencedClasses: []
  305. }),
  306. smalltalk.DocChapter);
  307. smalltalk.addMethod(
  308. "_renderDocOn_",
  309. smalltalk.method({
  310. selector: "renderDocOn:",
  311. category: 'rendering',
  312. fn: function (html){
  313. var self=this;
  314. var div;
  315. return smalltalk.withContext(function($ctx1) { _st(_st(html)._h1())._with_(_st(self)._title());
  316. _st(self)._renderNavigationOn_(html);
  317. div=_st(_st(html)._div())._class_("contents");
  318. _st(_st(div)._asJQuery())._html_(_st(self)._htmlContents());
  319. return self}, function($ctx1) {$ctx1.fill(self,"renderDocOn:",{html:html,div:div}, smalltalk.DocChapter)})},
  320. args: ["html"],
  321. source: "renderDocOn: html\x0a\x09| div |\x0a\x09html h1 with: self title.\x0a\x09self renderNavigationOn: html.\x0a\x09div := html div class: 'contents'.\x0a\x09div asJQuery html: self htmlContents",
  322. messageSends: ["with:", "title", "h1", "renderNavigationOn:", "class:", "div", "html:", "htmlContents", "asJQuery"],
  323. referencedClasses: []
  324. }),
  325. smalltalk.DocChapter);
  326. smalltalk.addMethod(
  327. "_renderLinksOn_",
  328. smalltalk.method({
  329. selector: "renderLinksOn:",
  330. category: 'rendering',
  331. fn: function (html){
  332. var self=this;
  333. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$2;
  334. $1=_st(html)._ul();
  335. _st($1)._class_("links");
  336. $2=_st($1)._with_((function(){
  337. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._chapters())._do_((function(each){
  338. return smalltalk.withContext(function($ctx3) { return _st(_st(html)._li())._with_((function(){
  339. return smalltalk.withContext(function($ctx4) { $3=_st(html)._a();
  340. _st($3)._with_(_st(each)._title());
  341. $4=_st($3)._onClick_((function(){
  342. return smalltalk.withContext(function($ctx5) { return _st(self)._selectChapter_(each);
  343. }, function($ctx5) {$ctx5.fillBlock({},$ctx1)})}));
  344. return $4;
  345. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  346. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})}));
  347. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  348. return self}, function($ctx1) {$ctx1.fill(self,"renderLinksOn:",{html:html}, smalltalk.DocChapter)})},
  349. args: ["html"],
  350. source: "renderLinksOn: html\x0a\x09html ul \x0a\x09\x09class: 'links';\x0a\x09\x09with: [\x0a\x09\x09\x09self chapters do: [:each |\x0a\x09\x09\x09\x09html li with: [\x0a\x09\x09\x09\x09\x09html a\x0a\x09\x09\x09\x09\x09\x09with: each title;\x0a\x09\x09\x09\x09\x09\x09onClick: [self selectChapter: each]]]]",
  351. messageSends: ["class:", "ul", "with:", "do:", "title", "a", "onClick:", "selectChapter:", "li", "chapters"],
  352. referencedClasses: []
  353. }),
  354. smalltalk.DocChapter);
  355. smalltalk.addMethod(
  356. "_renderNavigationOn_",
  357. smalltalk.method({
  358. selector: "renderNavigationOn:",
  359. category: 'rendering',
  360. fn: function (html){
  361. var self=this;
  362. return smalltalk.withContext(function($ctx1) { var $1,$2,$4,$5,$3;
  363. $1=_st(self)._parent();
  364. if(($receiver = $1) == nil || $receiver == undefined){
  365. $1;
  366. } else {
  367. $2=_st(html)._div();
  368. _st($2)._class_("navigation");
  369. $3=_st($2)._with_((function(){
  370. return smalltalk.withContext(function($ctx2) { $4=_st(html)._a();
  371. _st($4)._with_(_st("← back to ").__comma(_st(_st(self)._parent())._title()));
  372. $5=_st($4)._onClick_((function(){
  373. return smalltalk.withContext(function($ctx3) { return _st(self)._selectChapter_(_st(self)._parent());
  374. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  375. return $5;
  376. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  377. $3;
  378. };
  379. return self}, function($ctx1) {$ctx1.fill(self,"renderNavigationOn:",{html:html}, smalltalk.DocChapter)})},
  380. args: ["html"],
  381. source: "renderNavigationOn: html\x0a\x09self parent ifNotNil: [\x0a\x09\x09html div \x0a\x09\x09\x09class: 'navigation'; with: [\x0a\x09\x09\x09\x09html a\x0a\x09\x09\x09\x09\x09with: '← back to ', self parent title;\x0a\x09\x09\x09\x09\x09onClick: [self selectChapter: self parent]]]",
  382. messageSends: ["ifNotNil:", "class:", "div", "with:", ",", "title", "parent", "a", "onClick:", "selectChapter:"],
  383. referencedClasses: []
  384. }),
  385. smalltalk.DocChapter);
  386. smalltalk.addMethod(
  387. "_renderOn_",
  388. smalltalk.method({
  389. selector: "renderOn:",
  390. category: 'rendering',
  391. fn: function (html){
  392. var self=this;
  393. return smalltalk.withContext(function($ctx1) { var $1,$2;
  394. $1=_st(html)._div();
  395. _st($1)._class_(_st(self)._cssClass());
  396. $2=_st($1)._with_((function(){
  397. return smalltalk.withContext(function($ctx2) { _st(self)._renderDocOn_(html);
  398. return _st(self)._renderLinksOn_(html);
  399. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  400. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html}, smalltalk.DocChapter)})},
  401. args: ["html"],
  402. source: "renderOn: html\x0a\x09html div \x0a\x09\x09class: self cssClass;\x0a\x09\x09with: [\x0a\x09\x09\x09self renderDocOn: html.\x0a\x09\x09\x09self renderLinksOn: html]",
  403. messageSends: ["class:", "cssClass", "div", "with:", "renderDocOn:", "renderLinksOn:"],
  404. referencedClasses: []
  405. }),
  406. smalltalk.DocChapter);
  407. smalltalk.addMethod(
  408. "_selectChapter_",
  409. smalltalk.method({
  410. selector: "selectChapter:",
  411. category: 'actions',
  412. fn: function (aChapter){
  413. var self=this;
  414. return smalltalk.withContext(function($ctx1) { _st(_st(document)._location())._hash_(_st(aChapter)._id());
  415. return self}, function($ctx1) {$ctx1.fill(self,"selectChapter:",{aChapter:aChapter}, smalltalk.DocChapter)})},
  416. args: ["aChapter"],
  417. source: "selectChapter: aChapter\x0a\x09document location hash: aChapter id",
  418. messageSends: ["hash:", "id", "location"],
  419. referencedClasses: []
  420. }),
  421. smalltalk.DocChapter);
  422. smalltalk.addMethod(
  423. "_selectClass_",
  424. smalltalk.method({
  425. selector: "selectClass:",
  426. category: 'actions',
  427. fn: function (aClass){
  428. var self=this;
  429. return smalltalk.withContext(function($ctx1) { _st(_st(_st((smalltalk.DocumentationBuilder || DocumentationBuilder))._current())._announcer())._announce_(_st((smalltalk.ClassSelectionAnnouncement || ClassSelectionAnnouncement))._on_(aClass));
  430. return self}, function($ctx1) {$ctx1.fill(self,"selectClass:",{aClass:aClass}, smalltalk.DocChapter)})},
  431. args: ["aClass"],
  432. source: "selectClass: aClass\x0a\x09DocumentationBuilder current announcer announce: (ClassSelectionAnnouncement on: aClass)",
  433. messageSends: ["announce:", "on:", "announcer", "current"],
  434. referencedClasses: ["ClassSelectionAnnouncement", "DocumentationBuilder"]
  435. }),
  436. smalltalk.DocChapter);
  437. smalltalk.addMethod(
  438. "_subscribe",
  439. smalltalk.method({
  440. selector: "subscribe",
  441. category: 'subscriptions',
  442. fn: function (){
  443. var self=this;
  444. return smalltalk.withContext(function($ctx1) { var $1;
  445. _st(_st(self)._announcer())._on_do_((smalltalk.ChapterSelectionAnnouncement || ChapterSelectionAnnouncement),(function(ann){
  446. return smalltalk.withContext(function($ctx2) { $1=_st(_st(ann)._id()).__eq(_st(self)._id());
  447. if(smalltalk.assert($1)){
  448. return _st(self)._displayChapter_(self);
  449. };
  450. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  451. return self}, function($ctx1) {$ctx1.fill(self,"subscribe",{}, smalltalk.DocChapter)})},
  452. args: [],
  453. source: "subscribe\x0a\x09self announcer on: ChapterSelectionAnnouncement do: [:ann |\x0a\x09\x09ann id = self id ifTrue: [self displayChapter: self]]",
  454. messageSends: ["on:do:", "ifTrue:", "displayChapter:", "=", "id", "announcer"],
  455. referencedClasses: ["ChapterSelectionAnnouncement"]
  456. }),
  457. smalltalk.DocChapter);
  458. smalltalk.addMethod(
  459. "_title",
  460. smalltalk.method({
  461. selector: "title",
  462. category: 'accessing',
  463. fn: function (){
  464. var self=this;
  465. return smalltalk.withContext(function($ctx1) { var $2,$1;
  466. $2=self["@title"];
  467. if(($receiver = $2) == nil || $receiver == undefined){
  468. $1="";
  469. } else {
  470. $1=$2;
  471. };
  472. return $1;
  473. }, function($ctx1) {$ctx1.fill(self,"title",{}, smalltalk.DocChapter)})},
  474. args: [],
  475. source: "title\x0a\x09^title ifNil: ['']",
  476. messageSends: ["ifNil:"],
  477. referencedClasses: []
  478. }),
  479. smalltalk.DocChapter);
  480. smalltalk.addMethod(
  481. "_title_",
  482. smalltalk.method({
  483. selector: "title:",
  484. category: 'accessing',
  485. fn: function (aString){
  486. var self=this;
  487. return smalltalk.withContext(function($ctx1) { self["@title"]=aString;
  488. return self}, function($ctx1) {$ctx1.fill(self,"title:",{aString:aString}, smalltalk.DocChapter)})},
  489. args: ["aString"],
  490. source: "title: aString\x0a\x09title := aString",
  491. messageSends: [],
  492. referencedClasses: []
  493. }),
  494. smalltalk.DocChapter);
  495. smalltalk.addClass('ClassDocChapter', smalltalk.DocChapter, ['theClass'], 'Documentation');
  496. smalltalk.addMethod(
  497. "_contents",
  498. smalltalk.method({
  499. selector: "contents",
  500. category: 'accessing',
  501. fn: function (){
  502. var self=this;
  503. return smalltalk.withContext(function($ctx1) { var $2,$1;
  504. $2=_st(_st(_st(self)._theClass())._comment())._isEmpty();
  505. if(smalltalk.assert($2)){
  506. $1=_st(_st(_st(self)._theClass())._name()).__comma(" is not documented yet.");
  507. } else {
  508. $1=_st(_st(self)._theClass())._comment();
  509. };
  510. return $1;
  511. }, function($ctx1) {$ctx1.fill(self,"contents",{}, smalltalk.ClassDocChapter)})},
  512. args: [],
  513. source: "contents\x0a\x09^self theClass comment isEmpty\x0a\x09\x09ifTrue: [self theClass name, ' is not documented yet.']\x0a\x09\x09ifFalse: [self theClass comment]",
  514. messageSends: ["ifTrue:ifFalse:", ",", "name", "theClass", "comment", "isEmpty"],
  515. referencedClasses: []
  516. }),
  517. smalltalk.ClassDocChapter);
  518. smalltalk.addMethod(
  519. "_cssClass",
  520. smalltalk.method({
  521. selector: "cssClass",
  522. category: 'accessing',
  523. fn: function (){
  524. var self=this;
  525. return smalltalk.withContext(function($ctx1) { var $1;
  526. $1=_st("doc_class ").__comma(smalltalk.DocChapter.fn.prototype._cssClass.apply(_st(self), []));
  527. return $1;
  528. }, function($ctx1) {$ctx1.fill(self,"cssClass",{}, smalltalk.ClassDocChapter)})},
  529. args: [],
  530. source: "cssClass\x0a\x09^'doc_class ', super cssClass",
  531. messageSends: [",", "cssClass"],
  532. referencedClasses: []
  533. }),
  534. smalltalk.ClassDocChapter);
  535. smalltalk.addMethod(
  536. "_initializeWithClass_",
  537. smalltalk.method({
  538. selector: "initializeWithClass:",
  539. category: 'accessing',
  540. fn: function (aClass){
  541. var self=this;
  542. return smalltalk.withContext(function($ctx1) { self["@theClass"]=aClass;
  543. return self}, function($ctx1) {$ctx1.fill(self,"initializeWithClass:",{aClass:aClass}, smalltalk.ClassDocChapter)})},
  544. args: ["aClass"],
  545. source: "initializeWithClass: aClass\x0a\x09theClass := aClass",
  546. messageSends: [],
  547. referencedClasses: []
  548. }),
  549. smalltalk.ClassDocChapter);
  550. smalltalk.addMethod(
  551. "_renderLinksOn_",
  552. smalltalk.method({
  553. selector: "renderLinksOn:",
  554. category: 'rendering',
  555. fn: function (html){
  556. var self=this;
  557. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$2;
  558. $1=_st(html)._ul();
  559. _st($1)._class_("links");
  560. $2=_st($1)._with_((function(){
  561. return smalltalk.withContext(function($ctx2) { return _st(_st(html)._li())._with_((function(){
  562. return smalltalk.withContext(function($ctx3) { $3=_st(html)._a();
  563. _st($3)._with_("Browse this class");
  564. $4=_st($3)._onClick_((function(){
  565. return smalltalk.withContext(function($ctx4) { return _st((smalltalk.Browser || Browser))._openOn_(_st(self)._theClass());
  566. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  567. return $4;
  568. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  569. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  570. return self}, function($ctx1) {$ctx1.fill(self,"renderLinksOn:",{html:html}, smalltalk.ClassDocChapter)})},
  571. args: ["html"],
  572. source: "renderLinksOn: html\x0a\x09html ul \x0a\x09\x09class: 'links';\x0a\x09\x09with: [\x0a\x09\x09\x09html li with: [html a\x0a\x09\x09\x09\x09with: 'Browse this class';\x0a\x09\x09\x09\x09onClick: [Browser openOn: self theClass]]]",
  573. messageSends: ["class:", "ul", "with:", "a", "onClick:", "openOn:", "theClass", "li"],
  574. referencedClasses: ["Browser"]
  575. }),
  576. smalltalk.ClassDocChapter);
  577. smalltalk.addMethod(
  578. "_subscribe",
  579. smalltalk.method({
  580. selector: "subscribe",
  581. category: 'subscriptions',
  582. fn: function (){
  583. var self=this;
  584. return smalltalk.withContext(function($ctx1) { var $1;
  585. smalltalk.DocChapter.fn.prototype._subscribe.apply(_st(self), []);
  586. _st(_st(self)._announcer())._on_do_((smalltalk.ClassSelectionAnnouncement || ClassSelectionAnnouncement),(function(ann){
  587. return smalltalk.withContext(function($ctx2) { $1=_st(_st(ann)._theClass()).__eq(_st(self)._theClass());
  588. if(smalltalk.assert($1)){
  589. return _st(self)._selectChapter_(self);
  590. };
  591. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  592. return self}, function($ctx1) {$ctx1.fill(self,"subscribe",{}, smalltalk.ClassDocChapter)})},
  593. args: [],
  594. source: "subscribe\x0a\x09super subscribe.\x0a\x09self announcer \x0a\x09\x09on: ClassSelectionAnnouncement do: [:ann |\x0a\x09\x09\x09ann theClass = self theClass ifTrue: [\x0a\x09\x09\x09\x09self selectChapter: self]]",
  595. messageSends: ["subscribe", "on:do:", "ifTrue:", "selectChapter:", "=", "theClass", "announcer"],
  596. referencedClasses: ["ClassSelectionAnnouncement"]
  597. }),
  598. smalltalk.ClassDocChapter);
  599. smalltalk.addMethod(
  600. "_theClass",
  601. smalltalk.method({
  602. selector: "theClass",
  603. category: 'accessing',
  604. fn: function (){
  605. var self=this;
  606. return smalltalk.withContext(function($ctx1) { var $1;
  607. $1=self["@theClass"];
  608. return $1;
  609. }, function($ctx1) {$ctx1.fill(self,"theClass",{}, smalltalk.ClassDocChapter)})},
  610. args: [],
  611. source: "theClass\x0a\x09^theClass",
  612. messageSends: [],
  613. referencedClasses: []
  614. }),
  615. smalltalk.ClassDocChapter);
  616. smalltalk.addMethod(
  617. "_title",
  618. smalltalk.method({
  619. selector: "title",
  620. category: 'accessing',
  621. fn: function (){
  622. var self=this;
  623. return smalltalk.withContext(function($ctx1) { var $1;
  624. $1=_st(_st(self)._theClass())._name();
  625. return $1;
  626. }, function($ctx1) {$ctx1.fill(self,"title",{}, smalltalk.ClassDocChapter)})},
  627. args: [],
  628. source: "title\x0a\x09^self theClass name",
  629. messageSends: ["name", "theClass"],
  630. referencedClasses: []
  631. }),
  632. smalltalk.ClassDocChapter);
  633. smalltalk.addMethod(
  634. "_on_",
  635. smalltalk.method({
  636. selector: "on:",
  637. category: 'accessing',
  638. fn: function (aClass){
  639. var self=this;
  640. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  641. $2=_st(self)._basicNew();
  642. _st($2)._initializeWithClass_(aClass);
  643. _st($2)._initialize();
  644. $3=_st($2)._yourself();
  645. $1=$3;
  646. return $1;
  647. }, function($ctx1) {$ctx1.fill(self,"on:",{aClass:aClass}, smalltalk.ClassDocChapter.klass)})},
  648. args: ["aClass"],
  649. source: "on: aClass\x0a\x09^self basicNew\x0a\x09\x09initializeWithClass: aClass;\x0a\x09\x09initialize;\x0a\x09\x09yourself",
  650. messageSends: ["initializeWithClass:", "basicNew", "initialize", "yourself"],
  651. referencedClasses: []
  652. }),
  653. smalltalk.ClassDocChapter.klass);
  654. smalltalk.addClass('ClassesIndexChapter', smalltalk.DocChapter, [], 'Documentation');
  655. smalltalk.addMethod(
  656. "_alphabet",
  657. smalltalk.method({
  658. selector: "alphabet",
  659. category: 'accessing',
  660. fn: function (){
  661. var self=this;
  662. return smalltalk.withContext(function($ctx1) { return "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
  663. }, function($ctx1) {$ctx1.fill(self,"alphabet",{}, smalltalk.ClassesIndexChapter)})},
  664. args: [],
  665. source: "alphabet\x0a\x09^'ABCDEFGHIJKLMNOPQRSTUVWXYZ'",
  666. messageSends: [],
  667. referencedClasses: []
  668. }),
  669. smalltalk.ClassesIndexChapter);
  670. smalltalk.addMethod(
  671. "_cssClass",
  672. smalltalk.method({
  673. selector: "cssClass",
  674. category: 'accessing',
  675. fn: function (){
  676. var self=this;
  677. return smalltalk.withContext(function($ctx1) { var $1;
  678. $1=_st("index_doc ").__comma(smalltalk.DocChapter.fn.prototype._cssClass.apply(_st(self), []));
  679. return $1;
  680. }, function($ctx1) {$ctx1.fill(self,"cssClass",{}, smalltalk.ClassesIndexChapter)})},
  681. args: [],
  682. source: "cssClass\x0a\x09^'index_doc ', super cssClass",
  683. messageSends: [",", "cssClass"],
  684. referencedClasses: []
  685. }),
  686. smalltalk.ClassesIndexChapter);
  687. smalltalk.addMethod(
  688. "_renderDocOn_",
  689. smalltalk.method({
  690. selector: "renderDocOn:",
  691. category: 'rendering',
  692. fn: function (html){
  693. var self=this;
  694. return smalltalk.withContext(function($ctx1) { var $1,$2;
  695. _st(_st(html)._h1())._with_(_st(self)._title());
  696. _st(_st(self)._alphabet())._do_((function(letter){
  697. var classes;
  698. return smalltalk.withContext(function($ctx2) { classes=_st(_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._classes())._select_((function(each){
  699. return smalltalk.withContext(function($ctx3) { return _st(_st(_st(each)._name())._first()).__eq(letter);
  700. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})}));
  701. classes;
  702. _st(classes)._ifNotEmpty_((function(){
  703. return smalltalk.withContext(function($ctx3) { return _st(_st(html)._h2())._with_(letter);
  704. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  705. return _st(_st(html)._ul())._with_((function(){
  706. return smalltalk.withContext(function($ctx3) { return _st(_st(classes)._sorted_((function(a,b){
  707. return smalltalk.withContext(function($ctx4) { return _st(_st(a)._name()).__lt(_st(b)._name());
  708. }, function($ctx4) {$ctx4.fillBlock({a:a,b:b},$ctx1)})})))._do_((function(each){
  709. return smalltalk.withContext(function($ctx4) { return _st(_st(html)._li())._with_((function(){
  710. return smalltalk.withContext(function($ctx5) { $1=_st(html)._a();
  711. _st($1)._with_(_st(each)._name());
  712. $2=_st($1)._onClick_((function(){
  713. return smalltalk.withContext(function($ctx6) { return _st(self)._selectClass_(each);
  714. }, function($ctx6) {$ctx6.fillBlock({},$ctx1)})}));
  715. return $2;
  716. }, function($ctx5) {$ctx5.fillBlock({},$ctx1)})}));
  717. }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx1)})}));
  718. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  719. }, function($ctx2) {$ctx2.fillBlock({letter:letter,classes:classes},$ctx1)})}));
  720. return self}, function($ctx1) {$ctx1.fill(self,"renderDocOn:",{html:html}, smalltalk.ClassesIndexChapter)})},
  721. args: ["html"],
  722. source: "renderDocOn: html\x0a\x09html h1 with: self title.\x0a\x09self alphabet do: [:letter || classes |\x0a\x09\x09classes := Smalltalk current classes select: [:each | each name first = letter].\x0a\x09\x09classes ifNotEmpty: [html h2 with: letter].\x0a\x09\x09html ul with: [\x0a\x09\x09\x09(classes sorted: [:a :b | a name < b name]) \x0a\x09\x09\x09\x09do: [:each |\x0a\x09\x09\x09\x09\x09html li with: [html a \x0a\x09\x09\x09\x09\x09\x09with: each name;\x0a\x09\x09\x09\x09\x09\x09onClick: [self selectClass: each]]]]]",
  723. messageSends: ["with:", "title", "h1", "do:", "select:", "=", "first", "name", "classes", "current", "ifNotEmpty:", "h2", "a", "onClick:", "selectClass:", "li", "sorted:", "<", "ul", "alphabet"],
  724. referencedClasses: ["Smalltalk"]
  725. }),
  726. smalltalk.ClassesIndexChapter);
  727. smalltalk.addMethod(
  728. "_title",
  729. smalltalk.method({
  730. selector: "title",
  731. category: 'accessing',
  732. fn: function (){
  733. var self=this;
  734. return smalltalk.withContext(function($ctx1) { return "Smalltalk classes by index";
  735. }, function($ctx1) {$ctx1.fill(self,"title",{}, smalltalk.ClassesIndexChapter)})},
  736. args: [],
  737. source: "title\x0a\x09^'Smalltalk classes by index'",
  738. messageSends: [],
  739. referencedClasses: []
  740. }),
  741. smalltalk.ClassesIndexChapter);
  742. smalltalk.addClass('PackageDocChapter', smalltalk.DocChapter, ['package', 'chapters'], 'Documentation');
  743. smalltalk.addMethod(
  744. "_chapters",
  745. smalltalk.method({
  746. selector: "chapters",
  747. category: 'accessing',
  748. fn: function (){
  749. var self=this;
  750. return smalltalk.withContext(function($ctx1) { var $1;
  751. $1=self["@chapters"];
  752. return $1;
  753. }, function($ctx1) {$ctx1.fill(self,"chapters",{}, smalltalk.PackageDocChapter)})},
  754. args: [],
  755. source: "chapters\x0a\x09^chapters",
  756. messageSends: [],
  757. referencedClasses: []
  758. }),
  759. smalltalk.PackageDocChapter);
  760. smalltalk.addMethod(
  761. "_contents",
  762. smalltalk.method({
  763. selector: "contents",
  764. category: 'accessing',
  765. fn: function (){
  766. var self=this;
  767. return smalltalk.withContext(function($ctx1) { var $1;
  768. $1=_st(_st("Classes in package ").__comma(_st(_st(self)._package())._name())).__comma(":");
  769. return $1;
  770. }, function($ctx1) {$ctx1.fill(self,"contents",{}, smalltalk.PackageDocChapter)})},
  771. args: [],
  772. source: "contents\x0a\x09^'Classes in package ', self package name, ':'",
  773. messageSends: [",", "name", "package"],
  774. referencedClasses: []
  775. }),
  776. smalltalk.PackageDocChapter);
  777. smalltalk.addMethod(
  778. "_initializeWithPackage_",
  779. smalltalk.method({
  780. selector: "initializeWithPackage:",
  781. category: 'initialization',
  782. fn: function (aPackage){
  783. var self=this;
  784. return smalltalk.withContext(function($ctx1) { var $1,$2;
  785. self["@package"]=aPackage;
  786. self["@chapters"]=_st(_st(_st(aPackage)._classes())._sorted_((function(a,b){
  787. return smalltalk.withContext(function($ctx2) { return _st(_st(a)._name()).__lt(_st(b)._name());
  788. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1)})})))._collect_((function(each){
  789. return smalltalk.withContext(function($ctx2) { $1=_st((smalltalk.ClassDocChapter || ClassDocChapter))._on_(each);
  790. _st($1)._parent_(self);
  791. $2=_st($1)._yourself();
  792. return $2;
  793. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  794. return self}, function($ctx1) {$ctx1.fill(self,"initializeWithPackage:",{aPackage:aPackage}, smalltalk.PackageDocChapter)})},
  795. args: ["aPackage"],
  796. source: "initializeWithPackage: aPackage\x0a\x09package := aPackage.\x0a\x09chapters := (aPackage classes sorted: [:a :b | a name < b name]) collect: [:each |\x0a\x09\x09(ClassDocChapter on: each)\x0a\x09\x09\x09parent: self;\x0a\x09\x09\x09yourself]",
  797. messageSends: ["collect:", "parent:", "on:", "yourself", "sorted:", "<", "name", "classes"],
  798. referencedClasses: ["ClassDocChapter"]
  799. }),
  800. smalltalk.PackageDocChapter);
  801. smalltalk.addMethod(
  802. "_package",
  803. smalltalk.method({
  804. selector: "package",
  805. category: 'accessing',
  806. fn: function (){
  807. var self=this;
  808. return smalltalk.withContext(function($ctx1) { var $1;
  809. $1=self["@package"];
  810. return $1;
  811. }, function($ctx1) {$ctx1.fill(self,"package",{}, smalltalk.PackageDocChapter)})},
  812. args: [],
  813. source: "package\x0a\x09^package",
  814. messageSends: [],
  815. referencedClasses: []
  816. }),
  817. smalltalk.PackageDocChapter);
  818. smalltalk.addMethod(
  819. "_title",
  820. smalltalk.method({
  821. selector: "title",
  822. category: 'accessing',
  823. fn: function (){
  824. var self=this;
  825. return smalltalk.withContext(function($ctx1) { var $1;
  826. $1=_st("Package ").__comma(_st(_st(self)._package())._name());
  827. return $1;
  828. }, function($ctx1) {$ctx1.fill(self,"title",{}, smalltalk.PackageDocChapter)})},
  829. args: [],
  830. source: "title\x0a\x09^'Package ', self package name",
  831. messageSends: [",", "name", "package"],
  832. referencedClasses: []
  833. }),
  834. smalltalk.PackageDocChapter);
  835. smalltalk.addMethod(
  836. "_on_",
  837. smalltalk.method({
  838. selector: "on:",
  839. category: 'instance creation',
  840. fn: function (aPackage){
  841. var self=this;
  842. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  843. $2=_st(self)._basicNew();
  844. _st($2)._initializeWithPackage_(aPackage);
  845. _st($2)._initialize();
  846. $3=_st($2)._yourself();
  847. $1=$3;
  848. return $1;
  849. }, function($ctx1) {$ctx1.fill(self,"on:",{aPackage:aPackage}, smalltalk.PackageDocChapter.klass)})},
  850. args: ["aPackage"],
  851. source: "on: aPackage\x0a\x09^self basicNew\x0a\x09\x09initializeWithPackage: aPackage;\x0a\x09\x09initialize;\x0a\x09\x09yourself",
  852. messageSends: ["initializeWithPackage:", "basicNew", "initialize", "yourself"],
  853. referencedClasses: []
  854. }),
  855. smalltalk.PackageDocChapter.klass);
  856. smalltalk.addClass('TutorialsChapter', smalltalk.DocChapter, [], 'Documentation');
  857. smalltalk.addMethod(
  858. "_contents",
  859. smalltalk.method({
  860. selector: "contents",
  861. category: 'accessing',
  862. fn: function (){
  863. var self=this;
  864. return smalltalk.withContext(function($ctx1) { return "You can find a list of [Tutorials](https://github.com/amber-smalltalk/amber/wiki/Tutorials) on the [Github wiki](https://github.com/amber-smalltalk/amber/wiki). If you are new to Smalltalk, you can also learn Amber online with [ProfStef](http://www.amber-lang.net/learn.html).";
  865. }, function($ctx1) {$ctx1.fill(self,"contents",{}, smalltalk.TutorialsChapter)})},
  866. args: [],
  867. source: "contents\x0a\x09^'You can find a list of [Tutorials](https://github.com/amber-smalltalk/amber/wiki/Tutorials) on the [Github wiki](https://github.com/amber-smalltalk/amber/wiki). If you are new to Smalltalk, you can also learn Amber online with [ProfStef](http://www.amber-lang.net/learn.html).'",
  868. messageSends: [],
  869. referencedClasses: []
  870. }),
  871. smalltalk.TutorialsChapter);
  872. smalltalk.addMethod(
  873. "_title",
  874. smalltalk.method({
  875. selector: "title",
  876. category: 'accessing',
  877. fn: function (){
  878. var self=this;
  879. return smalltalk.withContext(function($ctx1) { return "Tutorials";
  880. }, function($ctx1) {$ctx1.fill(self,"title",{}, smalltalk.TutorialsChapter)})},
  881. args: [],
  882. source: "title\x0a\x09^'Tutorials'",
  883. messageSends: [],
  884. referencedClasses: []
  885. }),
  886. smalltalk.TutorialsChapter);
  887. smalltalk.addClass('DocumentationBuilder', smalltalk.Object, ['chapters', 'announcer', 'widget'], 'Documentation');
  888. smalltalk.addMethod(
  889. "_announcer",
  890. smalltalk.method({
  891. selector: "announcer",
  892. category: 'accessing',
  893. fn: function (){
  894. var self=this;
  895. return smalltalk.withContext(function($ctx1) { var $2,$1;
  896. $2=self["@announcer"];
  897. if(($receiver = $2) == nil || $receiver == undefined){
  898. self["@announcer"]=_st((smalltalk.Announcer || Announcer))._new();
  899. $1=self["@announcer"];
  900. } else {
  901. $1=$2;
  902. };
  903. return $1;
  904. }, function($ctx1) {$ctx1.fill(self,"announcer",{}, smalltalk.DocumentationBuilder)})},
  905. args: [],
  906. source: "announcer\x0a\x09^announcer ifNil: [announcer := Announcer new]",
  907. messageSends: ["ifNil:", "new"],
  908. referencedClasses: ["Announcer"]
  909. }),
  910. smalltalk.DocumentationBuilder);
  911. smalltalk.addMethod(
  912. "_build",
  913. smalltalk.method({
  914. selector: "build",
  915. category: 'building',
  916. fn: function (){
  917. var self=this;
  918. return smalltalk.withContext(function($ctx1) { _st(self)._buildOnJQuery_(_st("body")._asJQuery());
  919. return self}, function($ctx1) {$ctx1.fill(self,"build",{}, smalltalk.DocumentationBuilder)})},
  920. args: [],
  921. source: "build\x0a\x09self buildOnJQuery: ('body' asJQuery)",
  922. messageSends: ["buildOnJQuery:", "asJQuery"],
  923. referencedClasses: []
  924. }),
  925. smalltalk.DocumentationBuilder);
  926. smalltalk.addMethod(
  927. "_buildChapters",
  928. smalltalk.method({
  929. selector: "buildChapters",
  930. category: 'building',
  931. fn: function (){
  932. var self=this;
  933. return smalltalk.withContext(function($ctx1) { var $1;
  934. $1=_st(_st(_st(_st(_st(_st(self)._class())._methodDictionary())._values())._sorted_((function(a,b){
  935. return smalltalk.withContext(function($ctx2) { return _st(_st(a)._selector()).__lt(_st(b)._selector());
  936. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1)})})))._select_((function(each){
  937. return smalltalk.withContext(function($ctx2) { return _st(_st(each)._category()).__eq("chapters");
  938. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._collect_((function(each){
  939. return smalltalk.withContext(function($ctx2) { return _st(self)._perform_(_st(each)._selector());
  940. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  941. return $1;
  942. }, function($ctx1) {$ctx1.fill(self,"buildChapters",{}, smalltalk.DocumentationBuilder)})},
  943. args: [],
  944. source: "buildChapters\x0a\x09^((self class methodDictionary values sorted: [:a :b | a selector < b selector])\x0a\x09\x09select: [:each | each category = 'chapters'])\x0a\x09\x09collect: [:each | self perform: each selector]",
  945. messageSends: ["collect:", "perform:", "selector", "select:", "=", "category", "sorted:", "<", "values", "methodDictionary", "class"],
  946. referencedClasses: []
  947. }),
  948. smalltalk.DocumentationBuilder);
  949. smalltalk.addMethod(
  950. "_buildOn_",
  951. smalltalk.method({
  952. selector: "buildOn:",
  953. category: 'building',
  954. fn: function (aCanvas){
  955. var self=this;
  956. return smalltalk.withContext(function($ctx1) { var $1,$2;
  957. _st(aCanvas)._with_(_st(self)._widget());
  958. $1=self;
  959. _st($1)._checkHashChange();
  960. $2=_st($1)._checkHash();
  961. return self}, function($ctx1) {$ctx1.fill(self,"buildOn:",{aCanvas:aCanvas}, smalltalk.DocumentationBuilder)})},
  962. args: ["aCanvas"],
  963. source: "buildOn: aCanvas\x0a\x09aCanvas with: self widget.\x0a\x09self \x0a\x09\x09checkHashChange;\x0a\x09\x09checkHash",
  964. messageSends: ["with:", "widget", "checkHashChange", "checkHash"],
  965. referencedClasses: []
  966. }),
  967. smalltalk.DocumentationBuilder);
  968. smalltalk.addMethod(
  969. "_buildOnJQuery_",
  970. smalltalk.method({
  971. selector: "buildOnJQuery:",
  972. category: 'building',
  973. fn: function (aJQuery){
  974. var self=this;
  975. return smalltalk.withContext(function($ctx1) { _st(self)._buildOn_(_st((smalltalk.HTMLCanvas || HTMLCanvas))._onJQuery_(aJQuery));
  976. return self}, function($ctx1) {$ctx1.fill(self,"buildOnJQuery:",{aJQuery:aJQuery}, smalltalk.DocumentationBuilder)})},
  977. args: ["aJQuery"],
  978. source: "buildOnJQuery: aJQuery\x0a\x09self buildOn: (HTMLCanvas onJQuery: aJQuery)",
  979. messageSends: ["buildOn:", "onJQuery:"],
  980. referencedClasses: ["HTMLCanvas"]
  981. }),
  982. smalltalk.DocumentationBuilder);
  983. smalltalk.addMethod(
  984. "_ch1introduction",
  985. smalltalk.method({
  986. selector: "ch1introduction",
  987. category: 'chapters',
  988. fn: function (){
  989. var self=this;
  990. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  991. $2=_st((smalltalk.DocChapter || DocChapter))._new();
  992. _st($2)._title_("Introduction");
  993. $3=_st($2)._contents_("\x0a\x0a##Amber Smalltalk in a nutshell\x0a\x0aAmber is an implementation of the Smalltalk-80 language. It is designed to make client-side web development **faster, easier and more fun** as it allows developers to write HTML5 applications in a live Smalltalk environment!\x0a\x0aAmber is written in itself, including the IDE and the compiler and it runs **directly inside your browser**. The IDE is fairly complete with a class browser, workspace, transcript, unit test runner, object inspectors, cross reference tools and even a debugger.\x0a\x0aNoteworthy features:\x0a\x0a- Amber is semantically and syntactically very close to [Pharo Smalltalk](http://www.pharo-project.org). Pharo is considered the reference implementation.\x0a- Amber **seamlessly interacts with JavaScript** and can use its full eco system of libraries without any glue code needed.\x0a- Amber **has no dependencies** and can be used in any JavaScript runtime, not only inside browsers. An important example is [Node.js](http://nodejs.org).\x0a- Amber is a live Smalltalk that **compiles incrementally into efficient JavaScript** often mapping one-to-one with JavaScript equivalents.\x0a- Amber has a **Seaside influenced canvas library** to dynamically generate HTML.\x0a\x0a## Why Amber?\x0a\x0a- JavaScript is quite a broken language with lots of traps and odd quirks. It is the assembler of the Internet which is cool, but we don't want to write in it.\x0a- Amber is a language and environment built for the web. With Amber, client-side web development finally gets the power and productivity that exists in other Smalltalk dialects.\x0a- Smalltalk has a simple class model with a lightweight syntax for closures, it is in many ways a perfect match for the Good Parts of JavaScript. \x0a Smalltalk stands head and shoulders above most other languages for clarity, conciseness, and human-friendliness.\x0a As a language, it is immensely clean and mature, both syntactically and semantically. It is a pure OO language, with objects all the way down.\x0a- Having a true live & incremental development environment where you can build your application interactively in the browser is unbeatable.\x0a\x0a## Disclaimer\x0a\x0aThis documentation doesn't aim to teach Smalltalk. \x0aKnowledge of Smalltalk is needed to understand the topics covered in this documentation. \x0aIf you want to learn the Smalltalk language, you can read the excellent [Pharo By Example](http://www.pharobyexample.org) book.\x0a");
  994. $1=$3;
  995. return $1;
  996. }, function($ctx1) {$ctx1.fill(self,"ch1introduction",{}, smalltalk.DocumentationBuilder)})},
  997. args: [],
  998. source: "ch1introduction\x0a\x09^DocChapter new\x0a\x09\x09title: 'Introduction';\x0a\x09\x09contents: '\x0a\x0a##Amber Smalltalk in a nutshell\x0a\x0aAmber is an implementation of the Smalltalk-80 language. It is designed to make client-side web development **faster, easier and more fun** as it allows developers to write HTML5 applications in a live Smalltalk environment!\x0a\x0aAmber is written in itself, including the IDE and the compiler and it runs **directly inside your browser**. The IDE is fairly complete with a class browser, workspace, transcript, unit test runner, object inspectors, cross reference tools and even a debugger.\x0a\x0aNoteworthy features:\x0a\x0a- Amber is semantically and syntactically very close to [Pharo Smalltalk](http://www.pharo-project.org). Pharo is considered the reference implementation.\x0a- Amber **seamlessly interacts with JavaScript** and can use its full eco system of libraries without any glue code needed.\x0a- Amber **has no dependencies** and can be used in any JavaScript runtime, not only inside browsers. An important example is [Node.js](http://nodejs.org).\x0a- Amber is a live Smalltalk that **compiles incrementally into efficient JavaScript** often mapping one-to-one with JavaScript equivalents.\x0a- Amber has a **Seaside influenced canvas library** to dynamically generate HTML.\x0a\x0a## Why Amber?\x0a\x0a- JavaScript is quite a broken language with lots of traps and odd quirks. It is the assembler of the Internet which is cool, but we don''t want to write in it.\x0a- Amber is a language and environment built for the web. With Amber, client-side web development finally gets the power and productivity that exists in other Smalltalk dialects.\x0a- Smalltalk has a simple class model with a lightweight syntax for closures, it is in many ways a perfect match for the Good Parts of JavaScript. \x0a Smalltalk stands head and shoulders above most other languages for clarity, conciseness, and human-friendliness.\x0a As a language, it is immensely clean and mature, both syntactically and semantically. It is a pure OO language, with objects all the way down.\x0a- Having a true live & incremental development environment where you can build your application interactively in the browser is unbeatable.\x0a\x0a## Disclaimer\x0a\x0aThis documentation doesn''t aim to teach Smalltalk. \x0aKnowledge of Smalltalk is needed to understand the topics covered in this documentation. \x0aIf you want to learn the Smalltalk language, you can read the excellent [Pharo By Example](http://www.pharobyexample.org) book.\x0a'",
  999. messageSends: ["title:", "new", "contents:"],
  1000. referencedClasses: ["DocChapter"]
  1001. }),
  1002. smalltalk.DocumentationBuilder);
  1003. smalltalk.addMethod(
  1004. "_ch2differencesWithOtherSmalltalks",
  1005. smalltalk.method({
  1006. selector: "ch2differencesWithOtherSmalltalks",
  1007. category: 'chapters',
  1008. fn: function (){
  1009. var self=this;
  1010. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  1011. $2=_st((smalltalk.DocChapter || DocChapter))._new();
  1012. _st($2)._title_("Differences with other Smalltalks");
  1013. $3=_st($2)._contents_("\x0aAmber has some differences with other Smalltalk implementations. This makes porting code a non-trivial thing, but still quite manageable.\x0aBecause it maps Smalltalk constructs one-to-one with the JavaScript equivalent, including Smalltalk classes to JavaScript constructors, the core class library is simplified compared to Pharo Smalltalk.\x0aAnd since we want Amber to be useful in building lean browser apps we can't let it bloat too much.\x0a\x0aBut apart from missing things other Smalltalks may have, there are also things that are plain different:\x0a\x0a- The collection class hierarchy is much simpler compared to most Smalltalk implementations. In part this is because we want to map reasonably well with JavaScript counter parts.\x0a- As of today, there is no SortedCollection. The size of arrays is dynamic, and they behave like an ordered collection. They can also be sorted with the `#sort*` methods.\x0a- The `Date` class behaves like the `Date` and `TimeStamp` classes in Pharo Smalltalk. Therefore both `Date today` and `Date now` are valid in Amber.\x0a- Amber does not have class Character, but `String` does implement some of Character behavior so a single character String can work as a Character.\x0a- Amber does support **class instance variables**, but not class variables.\x0a- Amber only has global classes and packages, but not arbitrary objects. Use classes instead like `Smalltalk current` instead of `Smalltalk` etc.\x0a- Amber does not support pool dictionaries.\x0a- Amber uses **< ...javascript code... >** to inline JavaScript code and does not have pragmas.\x0a- Amber does not have class categories. The left side in the browser lists real Packages, but they feel much the same.\x0a");
  1014. $1=$3;
  1015. return $1;
  1016. }, function($ctx1) {$ctx1.fill(self,"ch2differencesWithOtherSmalltalks",{}, smalltalk.DocumentationBuilder)})},
  1017. args: [],
  1018. source: "ch2differencesWithOtherSmalltalks\x0a\x09^DocChapter new\x0a\x09\x09title: 'Differences with other Smalltalks';\x0a\x09\x09contents: '\x0aAmber has some differences with other Smalltalk implementations. This makes porting code a non-trivial thing, but still quite manageable.\x0aBecause it maps Smalltalk constructs one-to-one with the JavaScript equivalent, including Smalltalk classes to JavaScript constructors, the core class library is simplified compared to Pharo Smalltalk.\x0aAnd since we want Amber to be useful in building lean browser apps we can''t let it bloat too much.\x0a\x0aBut apart from missing things other Smalltalks may have, there are also things that are plain different:\x0a\x0a- The collection class hierarchy is much simpler compared to most Smalltalk implementations. In part this is because we want to map reasonably well with JavaScript counter parts.\x0a- As of today, there is no SortedCollection. The size of arrays is dynamic, and they behave like an ordered collection. They can also be sorted with the `#sort*` methods.\x0a- The `Date` class behaves like the `Date` and `TimeStamp` classes in Pharo Smalltalk. Therefore both `Date today` and `Date now` are valid in Amber.\x0a- Amber does not have class Character, but `String` does implement some of Character behavior so a single character String can work as a Character.\x0a- Amber does support **class instance variables**, but not class variables.\x0a- Amber only has global classes and packages, but not arbitrary objects. Use classes instead like `Smalltalk current` instead of `Smalltalk` etc.\x0a- Amber does not support pool dictionaries.\x0a- Amber uses **< ...javascript code... >** to inline JavaScript code and does not have pragmas.\x0a- Amber does not have class categories. The left side in the browser lists real Packages, but they feel much the same.\x0a'",
  1019. messageSends: ["title:", "new", "contents:"],
  1020. referencedClasses: ["DocChapter"]
  1021. }),
  1022. smalltalk.DocumentationBuilder);
  1023. smalltalk.addMethod(
  1024. "_ch3GettingStarted",
  1025. smalltalk.method({
  1026. selector: "ch3GettingStarted",
  1027. category: 'chapters',
  1028. fn: function (){
  1029. var self=this;
  1030. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  1031. $2=_st((smalltalk.DocChapter || DocChapter))._new();
  1032. _st($2)._title_("Getting started");
  1033. $3=_st($2)._contents_("\x0aTo get started hacking in Amber you can basically take three routes, independent of your platform:\x0a\x0a1. Just **try it out directly** at [www.amber-lang.net](http://www.amber-lang.net) - click the **Class browser** button there. But you will **not be able to save any code you write**! \x0a Still, it works fine for looking at the IDE and playing around. Just **don't press F5/reload** - it will lose any code you have written.\x0a2. Download an Amber zip-ball, install [Nodejs](http://www.nodejs.org), fire up the Amber server and then open Amber from localhost - then you **can save code**. Detailed instructions are below!\x0a3. Same as above but install git first and get a proper clone from [http://github.com/NicolasPetton/amber](http://github.com/NicolasPetton/amber) instead of a zip/tar-ball. \x0a If you want to **contribute to Amber itself** this is really what you want to do. In fact, in most cases this is what you want to do. It requires installing git first, but it is quite simple - although we leave this bit as an \x22exercise to the reader\x22 :)\x0a\x0a\x0a## Downloading Amber\x0aCurrently you can download in zip or tar-ball format, either cutting edge or a release. [Downloads are available here](https://github.com/NicolasPetton/amber/archives/amber). \x0a\x0aUnpack wherever you like, but I would rename the directory that is unpacked to something slightly shorter - like say \x22amber\x22. :)\x0aAnd yes, at this point you can double click the index.html file in the amber directory to get the IDE up, but again, **you will not be able to save code**. So please continue below :)\x0a\x0a## Installing Node.js\x0a[Node](http://www.nodejs.org) (for short) is simply the V8 Javascript VM from Google (used in Chrome) hooked together with some hard core C-libraries for doing \x22evented I/O\x22.\x0aBasically it's JavaScript for the server - on asynch steroids. Amber runs fine in Node and we use it for several Amber tools, like amberc (the command line Amber compiler) or the Amber server (see below). \x0aThere are also several Amber-Node examples to look at if you want to play with running Amber programs server side. **In short - you really want to install Nodejs. :)**\x0a\x0a- Installing Node on Linux can be done using your package tool of choice (`apt-get install nodejs` for example) or any other way described at [the download page](http://nodejs.org/#download).\x0a- Installing Node on MacOS or Windows is probably done best by using the [installers available at Nodejs.org](http://nodejs.org/#download).\x0a\x0a## Starting Amber server\x0aNicolas has written a minimal webDAV server that is the easiest way to get up and running Amber with the ability to save code. This little server is written in... Amber! \x0aAnd it runs on top of Node. So to start it up serving your brand new directory tree of sweet Amber you do:\x0a\x0a\x09cd amber\x09(or whatever you called the directory you unpackaged)\x0a\x09./bin/server\x09(in windows you type `node server\x5cserver.js` instead)\x0a\x0aIt should say it is listening on port 4000. If it does, hooray! That means both Node and Amber are good. In Windows you might get a question about opening that port in the local firewall - yep, do it!\x0a\x0a## Firing up Amber\x0aThe Amber IDE is written in... Amber. It uses [jQuery](http://jquery.com) and runs right in your browser as a ... well, a web page. \x0aWe could open it up just using a file url - but the reason we performed the previous steps is so that we can load the IDE web page from a server that can handle PUTs (webDAV) of source code. \x0aAccording to web security Amber can only do PUT back to the same server it was loaded from. Thus we instead want to open it [through our little server now listening on port 4000](http://localhost:4000/index.html).\x0aClicking that link and then pressing the **Class browser** should get your Amber IDE running with the ability to commit modified packages locally.\x0a\x0aTo verify that you can indeed commit now - just select a Package in the browser, like say \x22Examples\x22 and press the **Commit** button below. **If all goes well nothing happens :)**. \x0aSo in order to really know if it worked we can check the modified date on the files **amber/st/Examples.st**, **amber/js/Examples.js** and **amber/js/Examples.deploy.js** - they should be brand new.\x0a\x0aNOTE: We can use any webDAV server and Apache2 has been used earlier and works fine. But the Amber server is smaller and simpler to start.\x0a");
  1034. $1=$3;
  1035. return $1;
  1036. }, function($ctx1) {$ctx1.fill(self,"ch3GettingStarted",{}, smalltalk.DocumentationBuilder)})},
  1037. args: [],
  1038. source: "ch3GettingStarted\x0a\x09^DocChapter new\x0a\x09\x09title: 'Getting started';\x0a\x09\x09contents: '\x0aTo get started hacking in Amber you can basically take three routes, independent of your platform:\x0a\x0a1. Just **try it out directly** at [www.amber-lang.net](http://www.amber-lang.net) - click the **Class browser** button there. But you will **not be able to save any code you write**! \x0a Still, it works fine for looking at the IDE and playing around. Just **don''t press F5/reload** - it will lose any code you have written.\x0a2. Download an Amber zip-ball, install [Nodejs](http://www.nodejs.org), fire up the Amber server and then open Amber from localhost - then you **can save code**. Detailed instructions are below!\x0a3. Same as above but install git first and get a proper clone from [http://github.com/NicolasPetton/amber](http://github.com/NicolasPetton/amber) instead of a zip/tar-ball. \x0a If you want to **contribute to Amber itself** this is really what you want to do. In fact, in most cases this is what you want to do. It requires installing git first, but it is quite simple - although we leave this bit as an \x22exercise to the reader\x22 :)\x0a\x0a\x0a## Downloading Amber\x0aCurrently you can download in zip or tar-ball format, either cutting edge or a release. [Downloads are available here](https://github.com/NicolasPetton/amber/archives/amber). \x0a\x0aUnpack wherever you like, but I would rename the directory that is unpacked to something slightly shorter - like say \x22amber\x22. :)\x0aAnd yes, at this point you can double click the index.html file in the amber directory to get the IDE up, but again, **you will not be able to save code**. So please continue below :)\x0a\x0a## Installing Node.js\x0a[Node](http://www.nodejs.org) (for short) is simply the V8 Javascript VM from Google (used in Chrome) hooked together with some hard core C-libraries for doing \x22evented I/O\x22.\x0aBasically it''s JavaScript for the server - on asynch steroids. Amber runs fine in Node and we use it for several Amber tools, like amberc (the command line Amber compiler) or the Amber server (see below). \x0aThere are also several Amber-Node examples to look at if you want to play with running Amber programs server side. **In short - you really want to install Nodejs. :)**\x0a\x0a- Installing Node on Linux can be done using your package tool of choice (`apt-get install nodejs` for example) or any other way described at [the download page](http://nodejs.org/#download).\x0a- Installing Node on MacOS or Windows is probably done best by using the [installers available at Nodejs.org](http://nodejs.org/#download).\x0a\x0a## Starting Amber server\x0aNicolas has written a minimal webDAV server that is the easiest way to get up and running Amber with the ability to save code. This little server is written in... Amber! \x0aAnd it runs on top of Node. So to start it up serving your brand new directory tree of sweet Amber you do:\x0a\x0a\x09cd amber\x09(or whatever you called the directory you unpackaged)\x0a\x09./bin/server\x09(in windows you type `node server\x5cserver.js` instead)\x0a\x0aIt should say it is listening on port 4000. If it does, hooray! That means both Node and Amber are good. In Windows you might get a question about opening that port in the local firewall - yep, do it!\x0a\x0a## Firing up Amber\x0aThe Amber IDE is written in... Amber. It uses [jQuery](http://jquery.com) and runs right in your browser as a ... well, a web page. \x0aWe could open it up just using a file url - but the reason we performed the previous steps is so that we can load the IDE web page from a server that can handle PUTs (webDAV) of source code. \x0aAccording to web security Amber can only do PUT back to the same server it was loaded from. Thus we instead want to open it [through our little server now listening on port 4000](http://localhost:4000/index.html).\x0aClicking that link and then pressing the **Class browser** should get your Amber IDE running with the ability to commit modified packages locally.\x0a\x0aTo verify that you can indeed commit now - just select a Package in the browser, like say \x22Examples\x22 and press the **Commit** button below. **If all goes well nothing happens :)**. \x0aSo in order to really know if it worked we can check the modified date on the files **amber/st/Examples.st**, **amber/js/Examples.js** and **amber/js/Examples.deploy.js** - they should be brand new.\x0a\x0aNOTE: We can use any webDAV server and Apache2 has been used earlier and works fine. But the Amber server is smaller and simpler to start.\x0a'",
  1039. messageSends: ["title:", "new", "contents:"],
  1040. referencedClasses: ["DocChapter"]
  1041. }),
  1042. smalltalk.DocumentationBuilder);
  1043. smalltalk.addMethod(
  1044. "_ch4Tutorials",
  1045. smalltalk.method({
  1046. selector: "ch4Tutorials",
  1047. category: 'chapters',
  1048. fn: function (){
  1049. var self=this;
  1050. return smalltalk.withContext(function($ctx1) { var $1;
  1051. $1=_st((smalltalk.TutorialsChapter || TutorialsChapter))._new();
  1052. return $1;
  1053. }, function($ctx1) {$ctx1.fill(self,"ch4Tutorials",{}, smalltalk.DocumentationBuilder)})},
  1054. args: [],
  1055. source: "ch4Tutorials\x0a\x09^TutorialsChapter new",
  1056. messageSends: ["new"],
  1057. referencedClasses: ["TutorialsChapter"]
  1058. }),
  1059. smalltalk.DocumentationBuilder);
  1060. smalltalk.addMethod(
  1061. "_ch5Index",
  1062. smalltalk.method({
  1063. selector: "ch5Index",
  1064. category: 'chapters',
  1065. fn: function (){
  1066. var self=this;
  1067. return smalltalk.withContext(function($ctx1) { var $1;
  1068. $1=_st((smalltalk.ClassesIndexChapter || ClassesIndexChapter))._new();
  1069. return $1;
  1070. }, function($ctx1) {$ctx1.fill(self,"ch5Index",{}, smalltalk.DocumentationBuilder)})},
  1071. args: [],
  1072. source: "ch5Index\x0a\x09^ClassesIndexChapter new",
  1073. messageSends: ["new"],
  1074. referencedClasses: ["ClassesIndexChapter"]
  1075. }),
  1076. smalltalk.DocumentationBuilder);
  1077. smalltalk.addMethod(
  1078. "_ch6KernelObjects",
  1079. smalltalk.method({
  1080. selector: "ch6KernelObjects",
  1081. category: 'chapters',
  1082. fn: function (){
  1083. var self=this;
  1084. return smalltalk.withContext(function($ctx1) { var $1;
  1085. $1=_st((smalltalk.PackageDocChapter || PackageDocChapter))._on_(_st((smalltalk.Package || Package))._named_("Kernel-Objects"));
  1086. return $1;
  1087. }, function($ctx1) {$ctx1.fill(self,"ch6KernelObjects",{}, smalltalk.DocumentationBuilder)})},
  1088. args: [],
  1089. source: "ch6KernelObjects\x0a\x09^PackageDocChapter on: (Package named: 'Kernel-Objects')",
  1090. messageSends: ["on:", "named:"],
  1091. referencedClasses: ["Package", "PackageDocChapter"]
  1092. }),
  1093. smalltalk.DocumentationBuilder);
  1094. smalltalk.addMethod(
  1095. "_ch7KernelClasses",
  1096. smalltalk.method({
  1097. selector: "ch7KernelClasses",
  1098. category: 'chapters',
  1099. fn: function (){
  1100. var self=this;
  1101. return smalltalk.withContext(function($ctx1) { var $1;
  1102. $1=_st((smalltalk.PackageDocChapter || PackageDocChapter))._on_(_st((smalltalk.Package || Package))._named_("Kernel-Classes"));
  1103. return $1;
  1104. }, function($ctx1) {$ctx1.fill(self,"ch7KernelClasses",{}, smalltalk.DocumentationBuilder)})},
  1105. args: [],
  1106. source: "ch7KernelClasses\x0a\x09^PackageDocChapter on: (Package named: 'Kernel-Classes')",
  1107. messageSends: ["on:", "named:"],
  1108. referencedClasses: ["Package", "PackageDocChapter"]
  1109. }),
  1110. smalltalk.DocumentationBuilder);
  1111. smalltalk.addMethod(
  1112. "_ch8KernelCollection",
  1113. smalltalk.method({
  1114. selector: "ch8KernelCollection",
  1115. category: 'chapters',
  1116. fn: function (){
  1117. var self=this;
  1118. return smalltalk.withContext(function($ctx1) { var $1;
  1119. $1=_st((smalltalk.PackageDocChapter || PackageDocChapter))._on_(_st((smalltalk.Package || Package))._named_("Kernel-Collections"));
  1120. return $1;
  1121. }, function($ctx1) {$ctx1.fill(self,"ch8KernelCollection",{}, smalltalk.DocumentationBuilder)})},
  1122. args: [],
  1123. source: "ch8KernelCollection\x0a\x09^PackageDocChapter on: (Package named: 'Kernel-Collections')",
  1124. messageSends: ["on:", "named:"],
  1125. referencedClasses: ["Package", "PackageDocChapter"]
  1126. }),
  1127. smalltalk.DocumentationBuilder);
  1128. smalltalk.addMethod(
  1129. "_ch9KernelMethods",
  1130. smalltalk.method({
  1131. selector: "ch9KernelMethods",
  1132. category: 'chapters',
  1133. fn: function (){
  1134. var self=this;
  1135. return smalltalk.withContext(function($ctx1) { var $1;
  1136. $1=_st((smalltalk.PackageDocChapter || PackageDocChapter))._on_(_st((smalltalk.Package || Package))._named_("Kernel-Methods"));
  1137. return $1;
  1138. }, function($ctx1) {$ctx1.fill(self,"ch9KernelMethods",{}, smalltalk.DocumentationBuilder)})},
  1139. args: [],
  1140. source: "ch9KernelMethods\x0a\x09^PackageDocChapter on: (Package named: 'Kernel-Methods')",
  1141. messageSends: ["on:", "named:"],
  1142. referencedClasses: ["Package", "PackageDocChapter"]
  1143. }),
  1144. smalltalk.DocumentationBuilder);
  1145. smalltalk.addMethod(
  1146. "_chapters",
  1147. smalltalk.method({
  1148. selector: "chapters",
  1149. category: 'accessing',
  1150. fn: function (){
  1151. var self=this;
  1152. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1153. $2=self["@chapters"];
  1154. if(($receiver = $2) == nil || $receiver == undefined){
  1155. self["@chapters"]=_st(self)._buildChapters();
  1156. $1=self["@chapters"];
  1157. } else {
  1158. $1=$2;
  1159. };
  1160. return $1;
  1161. }, function($ctx1) {$ctx1.fill(self,"chapters",{}, smalltalk.DocumentationBuilder)})},
  1162. args: [],
  1163. source: "chapters\x0a\x09^chapters ifNil: [chapters := self buildChapters]",
  1164. messageSends: ["ifNil:", "buildChapters"],
  1165. referencedClasses: []
  1166. }),
  1167. smalltalk.DocumentationBuilder);
  1168. smalltalk.addMethod(
  1169. "_checkHash",
  1170. smalltalk.method({
  1171. selector: "checkHash",
  1172. category: 'routing',
  1173. fn: function (){
  1174. var self=this;
  1175. var hash,presentation;
  1176. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1177. hash=_st(_st(_st(document)._location())._hash())._replace_with_("^#","");
  1178. $1=_st((smalltalk.ChapterSelectionAnnouncement || ChapterSelectionAnnouncement))._new();
  1179. _st($1)._id_(hash);
  1180. $2=_st($1)._yourself();
  1181. _st(_st(self)._announcer())._announce_($2);
  1182. return self}, function($ctx1) {$ctx1.fill(self,"checkHash",{hash:hash,presentation:presentation}, smalltalk.DocumentationBuilder)})},
  1183. args: [],
  1184. source: "checkHash\x0a\x09| hash presentation |\x0a\x09hash := document location hash replace: '^#' with: ''.\x0a\x09self announcer announce: (ChapterSelectionAnnouncement new \x0a\x09\x09id: hash; \x0a\x09\x09yourself)",
  1185. messageSends: ["replace:with:", "hash", "location", "announce:", "id:", "new", "yourself", "announcer"],
  1186. referencedClasses: ["ChapterSelectionAnnouncement"]
  1187. }),
  1188. smalltalk.DocumentationBuilder);
  1189. smalltalk.addMethod(
  1190. "_checkHashChange",
  1191. smalltalk.method({
  1192. selector: "checkHashChange",
  1193. category: 'routing',
  1194. fn: function (){
  1195. var self=this;
  1196. return smalltalk.withContext(function($ctx1) { _st(_st(window)._jQuery_(window))._bind_do_("hashchange",(function(){
  1197. return smalltalk.withContext(function($ctx2) { return _st(self)._checkHash();
  1198. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1199. return self}, function($ctx1) {$ctx1.fill(self,"checkHashChange",{}, smalltalk.DocumentationBuilder)})},
  1200. args: [],
  1201. source: "checkHashChange\x0a\x09(window jQuery: window) bind: 'hashchange' do: [self checkHash]",
  1202. messageSends: ["bind:do:", "checkHash", "jQuery:"],
  1203. referencedClasses: []
  1204. }),
  1205. smalltalk.DocumentationBuilder);
  1206. smalltalk.addMethod(
  1207. "_update",
  1208. smalltalk.method({
  1209. selector: "update",
  1210. category: 'updating',
  1211. fn: function (){
  1212. var self=this;
  1213. return smalltalk.withContext(function($ctx1) { self["@chapters"]=nil;
  1214. self["@announcer"]=nil;
  1215. self["@widget"]=nil;
  1216. _st(_st(window)._jQuery_(".documentation"))._remove();
  1217. _st(self)._build();
  1218. return self}, function($ctx1) {$ctx1.fill(self,"update",{}, smalltalk.DocumentationBuilder)})},
  1219. args: [],
  1220. source: "update\x0a\x09chapters := nil.\x0a\x09announcer := nil.\x0a\x09widget := nil.\x0a\x09(window jQuery: '.documentation') remove.\x0a\x09self build",
  1221. messageSends: ["remove", "jQuery:", "build"],
  1222. referencedClasses: []
  1223. }),
  1224. smalltalk.DocumentationBuilder);
  1225. smalltalk.addMethod(
  1226. "_widget",
  1227. smalltalk.method({
  1228. selector: "widget",
  1229. category: 'accessing',
  1230. fn: function (){
  1231. var self=this;
  1232. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1233. $2=self["@widget"];
  1234. if(($receiver = $2) == nil || $receiver == undefined){
  1235. self["@widget"]=_st((smalltalk.DocumentationWidget || DocumentationWidget))._on_(self);
  1236. $1=self["@widget"];
  1237. } else {
  1238. $1=$2;
  1239. };
  1240. return $1;
  1241. }, function($ctx1) {$ctx1.fill(self,"widget",{}, smalltalk.DocumentationBuilder)})},
  1242. args: [],
  1243. source: "widget\x0a\x09^widget ifNil: [widget := DocumentationWidget on: self]",
  1244. messageSends: ["ifNil:", "on:"],
  1245. referencedClasses: ["DocumentationWidget"]
  1246. }),
  1247. smalltalk.DocumentationBuilder);
  1248. smalltalk.DocumentationBuilder.klass.iVarNames = ['current'];
  1249. smalltalk.addMethod(
  1250. "_current",
  1251. smalltalk.method({
  1252. selector: "current",
  1253. category: 'accessing',
  1254. fn: function (){
  1255. var self=this;
  1256. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1257. $2=self["@current"];
  1258. if(($receiver = $2) == nil || $receiver == undefined){
  1259. self["@current"]=_st(self)._new();
  1260. $1=self["@current"];
  1261. } else {
  1262. $1=$2;
  1263. };
  1264. return $1;
  1265. }, function($ctx1) {$ctx1.fill(self,"current",{}, smalltalk.DocumentationBuilder.klass)})},
  1266. args: [],
  1267. source: "current\x0a\x09^current ifNil: [current := self new]",
  1268. messageSends: ["ifNil:", "new"],
  1269. referencedClasses: []
  1270. }),
  1271. smalltalk.DocumentationBuilder.klass);
  1272. smalltalk.addMethod(
  1273. "_initialize",
  1274. smalltalk.method({
  1275. selector: "initialize",
  1276. category: 'initialization',
  1277. fn: function (){
  1278. var self=this;
  1279. return smalltalk.withContext(function($ctx1) { _st(_st(self)._current())._build();
  1280. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.DocumentationBuilder.klass)})},
  1281. args: [],
  1282. source: "initialize\x0a\x09self current build",
  1283. messageSends: ["build", "current"],
  1284. referencedClasses: []
  1285. }),
  1286. smalltalk.DocumentationBuilder.klass);
  1287. smalltalk.addClass('DocumentationWidget', smalltalk.Widget, ['builder', 'selectedChapter', 'chapterDiv'], 'Documentation');
  1288. smalltalk.addMethod(
  1289. "_builder",
  1290. smalltalk.method({
  1291. selector: "builder",
  1292. category: 'accessing',
  1293. fn: function (){
  1294. var self=this;
  1295. return smalltalk.withContext(function($ctx1) { var $1;
  1296. $1=self["@builder"];
  1297. return $1;
  1298. }, function($ctx1) {$ctx1.fill(self,"builder",{}, smalltalk.DocumentationWidget)})},
  1299. args: [],
  1300. source: "builder\x0a\x09^builder",
  1301. messageSends: [],
  1302. referencedClasses: []
  1303. }),
  1304. smalltalk.DocumentationWidget);
  1305. smalltalk.addMethod(
  1306. "_builder_",
  1307. smalltalk.method({
  1308. selector: "builder:",
  1309. category: 'accessing',
  1310. fn: function (aDocumentationBuilder){
  1311. var self=this;
  1312. return smalltalk.withContext(function($ctx1) { self["@builder"]=aDocumentationBuilder;
  1313. return self}, function($ctx1) {$ctx1.fill(self,"builder:",{aDocumentationBuilder:aDocumentationBuilder}, smalltalk.DocumentationWidget)})},
  1314. args: ["aDocumentationBuilder"],
  1315. source: "builder: aDocumentationBuilder\x0a\x09builder := aDocumentationBuilder",
  1316. messageSends: [],
  1317. referencedClasses: []
  1318. }),
  1319. smalltalk.DocumentationWidget);
  1320. smalltalk.addMethod(
  1321. "_chapters",
  1322. smalltalk.method({
  1323. selector: "chapters",
  1324. category: 'accessing',
  1325. fn: function (){
  1326. var self=this;
  1327. return smalltalk.withContext(function($ctx1) { var $1;
  1328. $1=_st(_st(self)._builder())._chapters();
  1329. return $1;
  1330. }, function($ctx1) {$ctx1.fill(self,"chapters",{}, smalltalk.DocumentationWidget)})},
  1331. args: [],
  1332. source: "chapters\x0a\x09^self builder chapters",
  1333. messageSends: ["chapters", "builder"],
  1334. referencedClasses: []
  1335. }),
  1336. smalltalk.DocumentationWidget);
  1337. smalltalk.addMethod(
  1338. "_displayChapter_",
  1339. smalltalk.method({
  1340. selector: "displayChapter:",
  1341. category: 'actions',
  1342. fn: function (aChapter){
  1343. var self=this;
  1344. return smalltalk.withContext(function($ctx1) { _st(self)._selectedChapter_(aChapter);
  1345. _st(self)._updateChapterDiv();
  1346. return self}, function($ctx1) {$ctx1.fill(self,"displayChapter:",{aChapter:aChapter}, smalltalk.DocumentationWidget)})},
  1347. args: ["aChapter"],
  1348. source: "displayChapter: aChapter\x0a\x09self selectedChapter: aChapter.\x0a\x09self updateChapterDiv",
  1349. messageSends: ["selectedChapter:", "updateChapterDiv"],
  1350. referencedClasses: []
  1351. }),
  1352. smalltalk.DocumentationWidget);
  1353. smalltalk.addMethod(
  1354. "_renderChapterMenu_on_",
  1355. smalltalk.method({
  1356. selector: "renderChapterMenu:on:",
  1357. category: 'rendering',
  1358. fn: function (aChapter,html){
  1359. var self=this;
  1360. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1361. $1=_st(html)._a();
  1362. _st($1)._with_(_st(aChapter)._title());
  1363. $2=_st($1)._onClick_((function(){
  1364. return smalltalk.withContext(function($ctx2) { return _st(self)._selectChapter_(aChapter);
  1365. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1366. _st(_st(html)._ol())._with_((function(){
  1367. return smalltalk.withContext(function($ctx2) { return _st(_st(aChapter)._chapters())._do_((function(each){
  1368. return smalltalk.withContext(function($ctx3) { return _st(_st(html)._li())._with_((function(){
  1369. return smalltalk.withContext(function($ctx4) { return _st(self)._renderChapterMenu_on_(each,html);
  1370. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  1371. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})}));
  1372. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1373. return self}, function($ctx1) {$ctx1.fill(self,"renderChapterMenu:on:",{aChapter:aChapter,html:html}, smalltalk.DocumentationWidget)})},
  1374. args: ["aChapter", "html"],
  1375. source: "renderChapterMenu: aChapter on: html\x0a\x09html a\x0a\x09\x09with: aChapter title;\x0a\x09\x09onClick: [\x0a\x09\x09\x09self selectChapter: aChapter].\x0a\x09html ol with: [\x0a\x09\x09\x09aChapter chapters do: [:each |\x0a\x09\x09\x09\x09html li with: [\x0a\x09\x09\x09\x09\x09self renderChapterMenu: each on: html]]]",
  1376. messageSends: ["with:", "title", "a", "onClick:", "selectChapter:", "do:", "renderChapterMenu:on:", "li", "chapters", "ol"],
  1377. referencedClasses: []
  1378. }),
  1379. smalltalk.DocumentationWidget);
  1380. smalltalk.addMethod(
  1381. "_renderMenuOn_",
  1382. smalltalk.method({
  1383. selector: "renderMenuOn:",
  1384. category: 'rendering',
  1385. fn: function (html){
  1386. var self=this;
  1387. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1388. $1=_st(html)._div();
  1389. _st($1)._class_("menu");
  1390. $2=_st($1)._with_((function(){
  1391. return smalltalk.withContext(function($ctx2) { return _st(_st(html)._ol())._with_((function(){
  1392. return smalltalk.withContext(function($ctx3) { return _st(_st(self)._chapters())._do_((function(each){
  1393. return smalltalk.withContext(function($ctx4) { return _st(_st(html)._li())._with_((function(){
  1394. return smalltalk.withContext(function($ctx5) { return _st(self)._renderChapterMenu_on_(each,html);
  1395. }, function($ctx5) {$ctx5.fillBlock({},$ctx1)})}));
  1396. }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx1)})}));
  1397. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  1398. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1399. return self}, function($ctx1) {$ctx1.fill(self,"renderMenuOn:",{html:html}, smalltalk.DocumentationWidget)})},
  1400. args: ["html"],
  1401. source: "renderMenuOn: html\x0a\x09html div \x0a\x09\x09class: 'menu';\x0a\x09\x09with: [\x0a\x09\x09\x09html ol with: [\x0a\x09\x09\x09\x09self chapters do: [:each |\x0a\x09\x09\x09\x09\x09html li with: [\x0a\x09\x09\x09\x09\x09\x09self renderChapterMenu: each on: html]]]]",
  1402. messageSends: ["class:", "div", "with:", "do:", "renderChapterMenu:on:", "li", "chapters", "ol"],
  1403. referencedClasses: []
  1404. }),
  1405. smalltalk.DocumentationWidget);
  1406. smalltalk.addMethod(
  1407. "_renderOn_",
  1408. smalltalk.method({
  1409. selector: "renderOn:",
  1410. category: 'rendering',
  1411. fn: function (html){
  1412. var self=this;
  1413. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1414. $1=_st(html)._div();
  1415. _st($1)._class_("documentation");
  1416. $2=_st($1)._with_((function(){
  1417. return smalltalk.withContext(function($ctx2) { _st(self)._renderMenuOn_(html);
  1418. self["@chapterDiv"]=_st(html)._div();
  1419. self["@chapterDiv"];
  1420. return _st(self)._updateChapterDiv();
  1421. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1422. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html}, smalltalk.DocumentationWidget)})},
  1423. args: ["html"],
  1424. source: "renderOn: html\x0a\x09html div \x0a\x09\x09class: 'documentation';\x0a\x09\x09with: [\x0a\x09\x09\x09self renderMenuOn: html.\x0a\x09\x09\x09chapterDiv := html div.\x0a\x09\x09\x09self updateChapterDiv]",
  1425. messageSends: ["class:", "div", "with:", "renderMenuOn:", "updateChapterDiv"],
  1426. referencedClasses: []
  1427. }),
  1428. smalltalk.DocumentationWidget);
  1429. smalltalk.addMethod(
  1430. "_selectChapter_",
  1431. smalltalk.method({
  1432. selector: "selectChapter:",
  1433. category: 'actions',
  1434. fn: function (aChapter){
  1435. var self=this;
  1436. return smalltalk.withContext(function($ctx1) { _st(_st(document)._location())._hash_(_st(aChapter)._id());
  1437. return self}, function($ctx1) {$ctx1.fill(self,"selectChapter:",{aChapter:aChapter}, smalltalk.DocumentationWidget)})},
  1438. args: ["aChapter"],
  1439. source: "selectChapter: aChapter\x0a\x09document location hash: aChapter id",
  1440. messageSends: ["hash:", "id", "location"],
  1441. referencedClasses: []
  1442. }),
  1443. smalltalk.DocumentationWidget);
  1444. smalltalk.addMethod(
  1445. "_selectedChapter",
  1446. smalltalk.method({
  1447. selector: "selectedChapter",
  1448. category: 'accessing',
  1449. fn: function (){
  1450. var self=this;
  1451. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1452. $2=self["@selectedChapter"];
  1453. if(($receiver = $2) == nil || $receiver == undefined){
  1454. self["@selectedChapter"]=_st(_st(self)._chapters())._first();
  1455. $1=self["@selectedChapter"];
  1456. } else {
  1457. $1=$2;
  1458. };
  1459. return $1;
  1460. }, function($ctx1) {$ctx1.fill(self,"selectedChapter",{}, smalltalk.DocumentationWidget)})},
  1461. args: [],
  1462. source: "selectedChapter\x0a\x09^selectedChapter ifNil: [selectedChapter := self chapters first]",
  1463. messageSends: ["ifNil:", "first", "chapters"],
  1464. referencedClasses: []
  1465. }),
  1466. smalltalk.DocumentationWidget);
  1467. smalltalk.addMethod(
  1468. "_selectedChapter_",
  1469. smalltalk.method({
  1470. selector: "selectedChapter:",
  1471. category: 'accessing',
  1472. fn: function (aChapter){
  1473. var self=this;
  1474. return smalltalk.withContext(function($ctx1) { var $1;
  1475. self["@selectedChapter"]=aChapter;
  1476. $1=self["@selectedChapter"];
  1477. return $1;
  1478. }, function($ctx1) {$ctx1.fill(self,"selectedChapter:",{aChapter:aChapter}, smalltalk.DocumentationWidget)})},
  1479. args: ["aChapter"],
  1480. source: "selectedChapter: aChapter\x0a\x09^selectedChapter := aChapter",
  1481. messageSends: [],
  1482. referencedClasses: []
  1483. }),
  1484. smalltalk.DocumentationWidget);
  1485. smalltalk.addMethod(
  1486. "_updateChapterDiv",
  1487. smalltalk.method({
  1488. selector: "updateChapterDiv",
  1489. category: 'updating',
  1490. fn: function (){
  1491. var self=this;
  1492. return smalltalk.withContext(function($ctx1) { _st(self["@chapterDiv"])._contents_((function(html){
  1493. return smalltalk.withContext(function($ctx2) { return _st(html)._with_(_st(self)._selectedChapter());
  1494. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
  1495. return self}, function($ctx1) {$ctx1.fill(self,"updateChapterDiv",{}, smalltalk.DocumentationWidget)})},
  1496. args: [],
  1497. source: "updateChapterDiv\x0a\x09chapterDiv contents: [:html |\x0a\x09\x09html with: self selectedChapter]",
  1498. messageSends: ["contents:", "with:", "selectedChapter"],
  1499. referencedClasses: []
  1500. }),
  1501. smalltalk.DocumentationWidget);
  1502. smalltalk.addMethod(
  1503. "_on_",
  1504. smalltalk.method({
  1505. selector: "on:",
  1506. category: 'instance creation',
  1507. fn: function (aBuilder){
  1508. var self=this;
  1509. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  1510. $2=_st(self)._new();
  1511. _st($2)._builder_(aBuilder);
  1512. $3=_st($2)._yourself();
  1513. $1=$3;
  1514. return $1;
  1515. }, function($ctx1) {$ctx1.fill(self,"on:",{aBuilder:aBuilder}, smalltalk.DocumentationWidget.klass)})},
  1516. args: ["aBuilder"],
  1517. source: "on: aBuilder\x0a\x09^self new\x0a\x09\x09builder: aBuilder;\x0a\x09\x09yourself",
  1518. messageSends: ["builder:", "new", "yourself"],
  1519. referencedClasses: []
  1520. }),
  1521. smalltalk.DocumentationWidget.klass);