Documentation.deploy.js 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737
  1. smalltalk.addPackage('Documentation', {});
  2. smalltalk.addClass('DocumentationBuilder', smalltalk.Object, ['chapters', 'announcer', 'widget'], 'Documentation');
  3. smalltalk.addMethod(
  4. '_chapters',
  5. smalltalk.method({
  6. selector: 'chapters',
  7. fn: function (){
  8. var self=this;
  9. return (($receiver = self['@chapters']) == nil || $receiver == undefined) ? (function(){return self['@chapters']=smalltalk.send(self, "_buildChapters", []);})() : $receiver;
  10. return self;}
  11. }),
  12. smalltalk.DocumentationBuilder);
  13. smalltalk.addMethod(
  14. '_buildChapters',
  15. smalltalk.method({
  16. selector: 'buildChapters',
  17. fn: function (){
  18. var self=this;
  19. 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", [])]);})]);
  20. return self;}
  21. }),
  22. smalltalk.DocumentationBuilder);
  23. smalltalk.addMethod(
  24. '_buildOn_',
  25. smalltalk.method({
  26. selector: 'buildOn:',
  27. fn: function (aCanvas){
  28. var self=this;
  29. smalltalk.send(aCanvas, "_with_", [smalltalk.send(self, "_widget", [])]);
  30. return self;}
  31. }),
  32. smalltalk.DocumentationBuilder);
  33. smalltalk.addMethod(
  34. '_buildOnJQuery_',
  35. smalltalk.method({
  36. selector: 'buildOnJQuery:',
  37. fn: function (aJQuery){
  38. var self=this;
  39. smalltalk.send(self, "_buildOn_", [smalltalk.send((smalltalk.HTMLCanvas || HTMLCanvas), "_onJQuery_", [aJQuery])]);
  40. return self;}
  41. }),
  42. smalltalk.DocumentationBuilder);
  43. smalltalk.addMethod(
  44. '_ch1introduction',
  45. smalltalk.method({
  46. selector: 'ch1introduction',
  47. fn: function (){
  48. var self=this;
  49. 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.%20%0AIt%20allows%20developers%20to%20write%20client-side%20heavy%20web%20applications%20in%20Smalltalk.%20Amber%20includes%20an%20integrated%20development%20environment%20with%20a%20class%20browser%2C%20workspace%20and%20transcript.%0A%0AAmber%20includes%20the%20following%20features%3A%0A%0A-%20It%20is%20semantically%20and%20syntactically%20equivalent%20to%20Pharo%20Smalltalk%20%28the%20implementation%20considered%20as%20the%20reference%29%0A-%20It%20is%20written%20in%20itself%20and%20compiles%20into%20efficient%20JavaScript%0A-%20A%20canvas%20API%20similar%20to%20Seaside%20to%20generate%20HTML%0A-%20A%20jQuery%20binding.%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", []));
  50. return self;}
  51. }),
  52. smalltalk.DocumentationBuilder);
  53. smalltalk.addMethod(
  54. '_announcer',
  55. smalltalk.method({
  56. selector: 'announcer',
  57. fn: function (){
  58. var self=this;
  59. return (($receiver = self['@announcer']) == nil || $receiver == undefined) ? (function(){return self['@announcer']=smalltalk.send((smalltalk.Announcer || Announcer), "_new", []);})() : $receiver;
  60. return self;}
  61. }),
  62. smalltalk.DocumentationBuilder);
  63. smalltalk.addMethod(
  64. '_widget',
  65. smalltalk.method({
  66. selector: 'widget',
  67. fn: function (){
  68. var self=this;
  69. return (($receiver = self['@widget']) == nil || $receiver == undefined) ? (function(){return self['@widget']=smalltalk.send((smalltalk.DocumentationWidget || DocumentationWidget), "_on_", [self]);})() : $receiver;
  70. return self;}
  71. }),
  72. smalltalk.DocumentationBuilder);
  73. smalltalk.addMethod(
  74. '_ch2differencesWithOtherSmalltalks',
  75. smalltalk.method({
  76. selector: 'ch2differencesWithOtherSmalltalks',
  77. fn: function (){
  78. var self=this;
  79. 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.%20%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.%20%0AThe%20following%20list%20explains%20the%20main%20differences%3A%0A%0A-%20The%20collection%20class%20hierarchy%20is%20simpler%20compared%20to%20most%20Smalltalk%20implementations.%20As%20of%20today%2C%20there%20is%20no%20SortedCollection.%20The%20size%20of%20arrays%20is%20dynamic%2C%20and%20they%20behave%20like%20an%20ordered%20collection.%20%0A%20%20They%20can%20also%20be%20sorted%20with%20the%20%23sort*%20methods.%0A-%20The%20Date%20class%20behaves%20like%20the%20Date%20and%20TimeStamp%20classes%20in%20Pharo%20Smalltalk.%20Therefore%20both%20Date%20today%20and%20Date%20now%20are%20valid%20in%20Amber.%0A")]);})(smalltalk.send((smalltalk.DocChapter || DocChapter), "_new", []));
  80. return self;}
  81. }),
  82. smalltalk.DocumentationBuilder);
  83. smalltalk.addMethod(
  84. '_ch3GettingStarted',
  85. smalltalk.method({
  86. selector: 'ch3GettingStarted',
  87. fn: function (){
  88. var self=this;
  89. 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%20try%20it%20out%20at%20http%3A//www.amber-lang.net%20%28click%20the%20%22Class%20browser%22%20button%29%20-%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%20don%27t%20press%20F5/reload%20-%20it%20will%20bring%20you%20back%20to%20zero.%20%0A%20%20%20%20%28Well%2C%20if%20you%20still%20want%20to%20develop%20and%20save%20code%20online%20someone%20has%20set%20up%20this%20site%20seems%20for%20free%20use%3A%20https%3A//www.screwtopdb.com/amberstore/topics%3Fname%3Damberstore/amber.html%20%29%0A2.%20Download%20an%20Amber%20zip-ball%2C%20install%20Nodejs%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%20http%3A//github.com/NicolasPetton/amber%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.%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%0AAt%20the%20moment%20of%20writing%20you%20have%20release%20%5B0.9%20as%20zip%5D%28https%3A//github.com/NicolasPetton/amber/zipball/0.9%29%20or%20%5Btar%5D%28https%3A//github.com/NicolasPetton/amber/tarball/0.9%29%2C%20%0Aor%20%5Bcutting%20edge%20as%20zip%5D%28https%3A//github.com/NicolasPetton/amber/zipball/amber%29%20or%20%5Btar%5D%28https%3A//github.com/NicolasPetton/amber/tarball/amber%29.%0A%0AAt%20the%20moment%20this%20is%20just%20a%20**1.5Mb%20download**%2C%20so%20its%20very%20small.%20Unpack%20wherever%20you%20like%2C%20but%20I%20would%20rename%20the%20directory%20that%20is%20unpacked%20to%20something%20slightly%20shorter%20-%20like%20say%20%22amber-0.9%22%20or%20just%20%22amber%22.%20%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.%0A%20Basically%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%20example%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%22apt-get%20install%20nodejs%22%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%20seems%20to%20be%20easiest%20by%20getting%20it%20from%20%5Bhere%5D%28https%3A//sites.google.com/site/nodejsmacosx/%29.%0A-%20Installing%20Node%20on%20Windows%20is%20probably%20done%20best%20by%20using%20the%20%5Bdownload%20from%20Nodejs.org%5D%28http%3A//nodejs.org/%23download%29.%20This%20is%20not%20an%20installer%2C%20it%20is%20instead%20simply%20the%20node%20executable%20-%20**node.exe**.%0A%20%20%20%20-%20Put%20node.exe%20somewhere%20in%20your%20path.%20In%20Windows7%20I%20can%20run%20a%20command%20prompt%20%22As%20administrator%22%20%28right%20click%20the%20command%20prompt%20in%20Start%20menu%29%20and%20then%20just%20%22copy%20node.exe%20c%3A%5Cwindows%5C%22%20or%20such.%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%20%20%20%20cd%20amber%20%20%20%20%20%20%28or%20whatever%20you%20called%20the%20directory%20you%20unpackaged%29%0A%20%20%20%20./bin/server%20%20%28in%20windows%20you%20type%20%22node%20server%5Cserver.js%22%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%20JQuery%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%20through%20our%20little%20server%20now%20listening%20on%20port%204000%3A%0A%0A%20%20%20%20http%3A//localhost%3A4000/index.html%0A%0AClicking%20the%20above%20link%20should%20get%20your%20Amber%20running.%0A%0ATo%20verify%20that%20you%20can%20indeed%20commit%20-%20just%20select%20a%20Package%20in%20the%20browser%2C%20like%20say%20%22Examples%22%20and%20press%20%22Commit%20package%22%20button.%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%0A")]);})(smalltalk.send((smalltalk.DocChapter || DocChapter), "_new", []));
  90. return self;}
  91. }),
  92. smalltalk.DocumentationBuilder);
  93. smalltalk.addMethod(
  94. '_ch4FirstApp',
  95. smalltalk.method({
  96. selector: 'ch4FirstApp',
  97. fn: function (){
  98. var self=this;
  99. 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", []));
  100. return self;}
  101. }),
  102. smalltalk.DocumentationBuilder);
  103. smalltalk.addMethod(
  104. '_ch5Index',
  105. smalltalk.method({
  106. selector: 'ch5Index',
  107. fn: function (){
  108. var self=this;
  109. return smalltalk.send((smalltalk.ClassesIndexChapter || ClassesIndexChapter), "_new", []);
  110. return self;}
  111. }),
  112. smalltalk.DocumentationBuilder);
  113. smalltalk.addMethod(
  114. '_ch6KernelObjects',
  115. smalltalk.method({
  116. selector: 'ch6KernelObjects',
  117. fn: function (){
  118. var self=this;
  119. return (function($rec){smalltalk.send($rec, "_title_", [unescape("Kernel-Objects")]);smalltalk.send($rec, "_package_", [smalltalk.send((smalltalk.Package || Package), "_named_", [unescape("Kernel-Objects")])]);return smalltalk.send($rec, "_contents_", [""]);})(smalltalk.send((smalltalk.PackageDocChapter || PackageDocChapter), "_new", []));
  120. return self;}
  121. }),
  122. smalltalk.DocumentationBuilder);
  123. smalltalk.DocumentationBuilder.klass.iVarNames = ['current'];
  124. smalltalk.addMethod(
  125. '_initialize',
  126. smalltalk.method({
  127. selector: 'initialize',
  128. fn: function (){
  129. var self=this;
  130. smalltalk.send(smalltalk.send(self, "_current", []), "_buildOnJQuery_", [smalltalk.send((typeof window == 'undefined' ? nil : window), "_jQuery_", ["body"])]);
  131. return self;}
  132. }),
  133. smalltalk.DocumentationBuilder.klass);
  134. smalltalk.addMethod(
  135. '_current',
  136. smalltalk.method({
  137. selector: 'current',
  138. fn: function (){
  139. var self=this;
  140. return (($receiver = self['@current']) == nil || $receiver == undefined) ? (function(){return self['@current']=smalltalk.send(self, "_new", []);})() : $receiver;
  141. return self;}
  142. }),
  143. smalltalk.DocumentationBuilder.klass);
  144. smalltalk.addClass('DocChapter', smalltalk.Widget, ['title', 'contents', 'parent'], 'Documentation');
  145. smalltalk.addMethod(
  146. '_title',
  147. smalltalk.method({
  148. selector: 'title',
  149. fn: function (){
  150. var self=this;
  151. return (($receiver = self['@title']) == nil || $receiver == undefined) ? (function(){return "";})() : $receiver;
  152. return self;}
  153. }),
  154. smalltalk.DocChapter);
  155. smalltalk.addMethod(
  156. '_title_',
  157. smalltalk.method({
  158. selector: 'title:',
  159. fn: function (aString){
  160. var self=this;
  161. self['@title']=aString;
  162. return self;}
  163. }),
  164. smalltalk.DocChapter);
  165. smalltalk.addMethod(
  166. '_contents',
  167. smalltalk.method({
  168. selector: 'contents',
  169. fn: function (){
  170. var self=this;
  171. return self['@contents'];
  172. return self;}
  173. }),
  174. smalltalk.DocChapter);
  175. smalltalk.addMethod(
  176. '_contents_',
  177. smalltalk.method({
  178. selector: 'contents:',
  179. fn: function (aString){
  180. var self=this;
  181. self['@contents']=aString;
  182. return self;}
  183. }),
  184. smalltalk.DocChapter);
  185. smalltalk.addMethod(
  186. '_htmlContents',
  187. smalltalk.method({
  188. selector: 'htmlContents',
  189. fn: function (){
  190. var self=this;
  191. return smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.Showdown || Showdown), "_at_", [smalltalk.symbolFor("converter")]), "_new", []), "_makeHtml_", [smalltalk.send(self, "_contents", [])]);
  192. return self;}
  193. }),
  194. smalltalk.DocChapter);
  195. smalltalk.addMethod(
  196. '_chapters',
  197. smalltalk.method({
  198. selector: 'chapters',
  199. fn: function (){
  200. var self=this;
  201. return [];
  202. return self;}
  203. }),
  204. smalltalk.DocChapter);
  205. smalltalk.addMethod(
  206. '_renderOn_',
  207. smalltalk.method({
  208. selector: 'renderOn:',
  209. fn: function (html){
  210. var self=this;
  211. (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", []));
  212. return self;}
  213. }),
  214. smalltalk.DocChapter);
  215. smalltalk.addMethod(
  216. '_cssClass',
  217. smalltalk.method({
  218. selector: 'cssClass',
  219. fn: function (){
  220. var self=this;
  221. return "doc_chapter";
  222. return self;}
  223. }),
  224. smalltalk.DocChapter);
  225. smalltalk.addMethod(
  226. '_renderDocOn_',
  227. smalltalk.method({
  228. selector: 'renderDocOn:',
  229. fn: function (html){
  230. var self=this;
  231. var div=nil;
  232. smalltalk.send(smalltalk.send(html, "_h1", []), "_with_", [smalltalk.send(self, "_title", [])]);
  233. smalltalk.send(self, "_renderNavigationOn_", [html]);
  234. div=smalltalk.send(smalltalk.send(html, "_div", []), "_class_", ["contents"]);
  235. smalltalk.send(smalltalk.send(div, "_asJQuery", []), "_html_", [smalltalk.send(self, "_htmlContents", [])]);
  236. return self;}
  237. }),
  238. smalltalk.DocChapter);
  239. smalltalk.addMethod(
  240. '_level',
  241. smalltalk.method({
  242. selector: 'level',
  243. fn: function (){
  244. var self=this;
  245. 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)]));})();
  246. return self;}
  247. }),
  248. smalltalk.DocChapter);
  249. smalltalk.addMethod(
  250. '_level_',
  251. smalltalk.method({
  252. selector: 'level:',
  253. fn: function (anInteger){
  254. var self=this;
  255. self['@level']=anInteger;
  256. return self;}
  257. }),
  258. smalltalk.DocChapter);
  259. smalltalk.addMethod(
  260. '_selectClass_',
  261. smalltalk.method({
  262. selector: 'selectClass:',
  263. fn: function (aClass){
  264. var self=this;
  265. smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.DocumentationBuilder || DocumentationBuilder), "_current", []), "_announcer", []), "_announce_", [smalltalk.send((smalltalk.ClassSelectionAnnouncement || ClassSelectionAnnouncement), "_on_", [aClass])]);
  266. return self;}
  267. }),
  268. smalltalk.DocChapter);
  269. smalltalk.addMethod(
  270. '_parent',
  271. smalltalk.method({
  272. selector: 'parent',
  273. fn: function (){
  274. var self=this;
  275. return self['@parent'];
  276. return self;}
  277. }),
  278. smalltalk.DocChapter);
  279. smalltalk.addMethod(
  280. '_parent_',
  281. smalltalk.method({
  282. selector: 'parent:',
  283. fn: function (aChapter){
  284. var self=this;
  285. self['@parent']=aChapter;
  286. return self;}
  287. }),
  288. smalltalk.DocChapter);
  289. smalltalk.addMethod(
  290. '_selectChapter_',
  291. smalltalk.method({
  292. selector: 'selectChapter:',
  293. fn: function (aChapter){
  294. var self=this;
  295. smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.DocumentationBuilder || DocumentationBuilder), "_current", []), "_widget", []), "_selectChapter_", [aChapter]);
  296. return self;}
  297. }),
  298. smalltalk.DocChapter);
  299. smalltalk.addMethod(
  300. '_renderNavigationOn_',
  301. smalltalk.method({
  302. selector: 'renderNavigationOn:',
  303. fn: function (html){
  304. var self=this;
  305. (($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;
  306. return self;}
  307. }),
  308. smalltalk.DocChapter);
  309. smalltalk.addMethod(
  310. '_renderLinksOn_',
  311. smalltalk.method({
  312. selector: 'renderLinksOn:',
  313. fn: function (html){
  314. var self=this;
  315. (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", []));
  316. return self;}
  317. }),
  318. smalltalk.DocChapter);
  319. smalltalk.addClass('PackageDocChapter', smalltalk.DocChapter, ['package', 'chapters'], 'Documentation');
  320. smalltalk.addMethod(
  321. '_package',
  322. smalltalk.method({
  323. selector: 'package',
  324. fn: function (){
  325. var self=this;
  326. return self['@package'];
  327. return self;}
  328. }),
  329. smalltalk.PackageDocChapter);
  330. smalltalk.addMethod(
  331. '_package_',
  332. smalltalk.method({
  333. selector: 'package:',
  334. fn: function (aPackage){
  335. var self=this;
  336. self['@package']=aPackage;
  337. 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]));})]);
  338. return self;}
  339. }),
  340. smalltalk.PackageDocChapter);
  341. smalltalk.addMethod(
  342. '_title',
  343. smalltalk.method({
  344. selector: 'title',
  345. fn: function (){
  346. var self=this;
  347. return smalltalk.send("Package ", "__comma", [smalltalk.send(smalltalk.send(self, "_package", []), "_name", [])]);
  348. return self;}
  349. }),
  350. smalltalk.PackageDocChapter);
  351. smalltalk.addMethod(
  352. '_chapters',
  353. smalltalk.method({
  354. selector: 'chapters',
  355. fn: function (){
  356. var self=this;
  357. return self['@chapters'];
  358. return self;}
  359. }),
  360. smalltalk.PackageDocChapter);
  361. smalltalk.addMethod(
  362. '_contents',
  363. smalltalk.method({
  364. selector: 'contents',
  365. fn: function (){
  366. var self=this;
  367. return smalltalk.send(smalltalk.send("Classes in package ", "__comma", [smalltalk.send(smalltalk.send(self, "_package", []), "_name", [])]), "__comma", [":"]);
  368. return self;}
  369. }),
  370. smalltalk.PackageDocChapter);
  371. smalltalk.addMethod(
  372. '_on_',
  373. smalltalk.method({
  374. selector: 'on:',
  375. fn: function (aPackage){
  376. var self=this;
  377. return (function($rec){smalltalk.send($rec, "_package_", [aPackage]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  378. return self;}
  379. }),
  380. smalltalk.PackageDocChapter.klass);
  381. smalltalk.addClass('ClassDocChapter', smalltalk.DocChapter, ['theClass'], 'Documentation');
  382. smalltalk.addMethod(
  383. '_theClass',
  384. smalltalk.method({
  385. selector: 'theClass',
  386. fn: function (){
  387. var self=this;
  388. return self['@theClass'];
  389. return self;}
  390. }),
  391. smalltalk.ClassDocChapter);
  392. smalltalk.addMethod(
  393. '_theClass_',
  394. smalltalk.method({
  395. selector: 'theClass:',
  396. fn: function (aClass){
  397. var self=this;
  398. self['@theClass']=aClass;
  399. smalltalk.send(self, "_subscribe", []);
  400. return self;}
  401. }),
  402. smalltalk.ClassDocChapter);
  403. smalltalk.addMethod(
  404. '_contents',
  405. smalltalk.method({
  406. selector: 'contents',
  407. fn: function (){
  408. var self=this;
  409. 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", []);})]));
  410. return self;}
  411. }),
  412. smalltalk.ClassDocChapter);
  413. smalltalk.addMethod(
  414. '_cssClass',
  415. smalltalk.method({
  416. selector: 'cssClass',
  417. fn: function (){
  418. var self=this;
  419. return smalltalk.send("doc_class ", "__comma", [smalltalk.send(self, "_cssClass", [], smalltalk.DocChapter)]);
  420. return self;}
  421. }),
  422. smalltalk.ClassDocChapter);
  423. smalltalk.addMethod(
  424. '_title',
  425. smalltalk.method({
  426. selector: 'title',
  427. fn: function (){
  428. var self=this;
  429. return smalltalk.send(smalltalk.send(self, "_theClass", []), "_name", []);
  430. return self;}
  431. }),
  432. smalltalk.ClassDocChapter);
  433. smalltalk.addMethod(
  434. '_renderLinksOn_',
  435. smalltalk.method({
  436. selector: 'renderLinksOn:',
  437. fn: function (html){
  438. var self=this;
  439. (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", []));
  440. return self;}
  441. }),
  442. smalltalk.ClassDocChapter);
  443. smalltalk.addMethod(
  444. '_subscribe',
  445. smalltalk.method({
  446. selector: 'subscribe',
  447. fn: function (){
  448. var self=this;
  449. smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.DocumentationBuilder || DocumentationBuilder), "_current", []), "_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(smalltalk.send(smalltalk.send((smalltalk.DocumentationBuilder || DocumentationBuilder), "_current", []), "_widget", []), "_selectChapter_", [self]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.DocumentationBuilder || DocumentationBuilder), "_current", []), "_widget", []), "_selectChapter_", [self]);})]));})]);
  450. return self;}
  451. }),
  452. smalltalk.ClassDocChapter);
  453. smalltalk.addMethod(
  454. '_on_',
  455. smalltalk.method({
  456. selector: 'on:',
  457. fn: function (aClass){
  458. var self=this;
  459. return (function($rec){smalltalk.send($rec, "_theClass_", [aClass]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  460. return self;}
  461. }),
  462. smalltalk.ClassDocChapter.klass);
  463. smalltalk.addClass('DocumentationWidget', smalltalk.Widget, ['builder', 'selectedChapter', 'chapterDiv'], 'Documentation');
  464. smalltalk.addMethod(
  465. '_builder',
  466. smalltalk.method({
  467. selector: 'builder',
  468. fn: function (){
  469. var self=this;
  470. return self['@builder'];
  471. return self;}
  472. }),
  473. smalltalk.DocumentationWidget);
  474. smalltalk.addMethod(
  475. '_builder_',
  476. smalltalk.method({
  477. selector: 'builder:',
  478. fn: function (aDocumentationBuilder){
  479. var self=this;
  480. self['@builder']=aDocumentationBuilder;
  481. return self;}
  482. }),
  483. smalltalk.DocumentationWidget);
  484. smalltalk.addMethod(
  485. '_chapters',
  486. smalltalk.method({
  487. selector: 'chapters',
  488. fn: function (){
  489. var self=this;
  490. return smalltalk.send(smalltalk.send(self, "_builder", []), "_chapters", []);
  491. return self;}
  492. }),
  493. smalltalk.DocumentationWidget);
  494. smalltalk.addMethod(
  495. '_selectedChapter',
  496. smalltalk.method({
  497. selector: 'selectedChapter',
  498. fn: function (){
  499. var self=this;
  500. return (($receiver = self['@selectedChapter']) == nil || $receiver == undefined) ? (function(){return self['@selectedChapter']=smalltalk.send(smalltalk.send(self, "_chapters", []), "_first", []);})() : $receiver;
  501. return self;}
  502. }),
  503. smalltalk.DocumentationWidget);
  504. smalltalk.addMethod(
  505. '_selectedChapter_',
  506. smalltalk.method({
  507. selector: 'selectedChapter:',
  508. fn: function (aChapter){
  509. var self=this;
  510. return self['@selectedChapter']=aChapter;
  511. return self;}
  512. }),
  513. smalltalk.DocumentationWidget);
  514. smalltalk.addMethod(
  515. '_selectChapter_',
  516. smalltalk.method({
  517. selector: 'selectChapter:',
  518. fn: function (aChapter){
  519. var self=this;
  520. smalltalk.send(self, "_selectedChapter_", [aChapter]);
  521. smalltalk.send(self, "_updateChapterDiv", []);
  522. return self;}
  523. }),
  524. smalltalk.DocumentationWidget);
  525. smalltalk.addMethod(
  526. '_renderOn_',
  527. smalltalk.method({
  528. selector: 'renderOn:',
  529. fn: function (html){
  530. var self=this;
  531. (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", []));
  532. return self;}
  533. }),
  534. smalltalk.DocumentationWidget);
  535. smalltalk.addMethod(
  536. '_renderMenuOn_',
  537. smalltalk.method({
  538. selector: 'renderMenuOn:',
  539. fn: function (html){
  540. var self=this;
  541. (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", []));
  542. return self;}
  543. }),
  544. smalltalk.DocumentationWidget);
  545. smalltalk.addMethod(
  546. '_updateChapterDiv',
  547. smalltalk.method({
  548. selector: 'updateChapterDiv',
  549. fn: function (){
  550. var self=this;
  551. smalltalk.send(self['@chapterDiv'], "_contents_", [(function(html){return smalltalk.send(html, "_with_", [smalltalk.send(self, "_selectedChapter", [])]);})]);
  552. return self;}
  553. }),
  554. smalltalk.DocumentationWidget);
  555. smalltalk.addMethod(
  556. '_renderChapterMenu_on_',
  557. smalltalk.method({
  558. selector: 'renderChapterMenu:on:',
  559. fn: function (aChapter, html){
  560. var self=this;
  561. (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", []));
  562. 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]);})]);})]);})]);
  563. return self;}
  564. }),
  565. smalltalk.DocumentationWidget);
  566. smalltalk.addMethod(
  567. '_on_',
  568. smalltalk.method({
  569. selector: 'on:',
  570. fn: function (aBuilder){
  571. var self=this;
  572. return (function($rec){smalltalk.send($rec, "_builder_", [aBuilder]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  573. return self;}
  574. }),
  575. smalltalk.DocumentationWidget.klass);
  576. smalltalk.addClass('ClassesIndexChapter', smalltalk.DocChapter, [], 'Documentation');
  577. smalltalk.addMethod(
  578. '_cssClass',
  579. smalltalk.method({
  580. selector: 'cssClass',
  581. fn: function (){
  582. var self=this;
  583. return smalltalk.send("index_doc ", "__comma", [smalltalk.send(self, "_cssClass", [], smalltalk.DocChapter)]);
  584. return self;}
  585. }),
  586. smalltalk.ClassesIndexChapter);
  587. smalltalk.addMethod(
  588. '_title',
  589. smalltalk.method({
  590. selector: 'title',
  591. fn: function (){
  592. var self=this;
  593. return "Smalltalk classes by index";
  594. return self;}
  595. }),
  596. smalltalk.ClassesIndexChapter);
  597. smalltalk.addMethod(
  598. '_renderDocOn_',
  599. smalltalk.method({
  600. selector: 'renderDocOn:',
  601. fn: function (html){
  602. var self=this;
  603. smalltalk.send(smalltalk.send(html, "_h1", []), "_with_", [smalltalk.send(self, "_title", [])]);
  604. smalltalk.send(smalltalk.send(self, "_alphabet", []), "_do_", [(function(letter){var classes=nil;
  605. 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", []));})]);})]);})]);})]);
  606. return self;}
  607. }),
  608. smalltalk.ClassesIndexChapter);
  609. smalltalk.addMethod(
  610. '_alphabet',
  611. smalltalk.method({
  612. selector: 'alphabet',
  613. fn: function (){
  614. var self=this;
  615. return "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
  616. return self;}
  617. }),
  618. smalltalk.ClassesIndexChapter);
  619. smalltalk.addMethod(
  620. '_on_',
  621. smalltalk.method({
  622. selector: 'on:',
  623. fn: function (aClass){
  624. var self=this;
  625. return (function($rec){smalltalk.send($rec, "_theClass_", [aClass]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  626. return self;}
  627. }),
  628. smalltalk.ClassesIndexChapter.klass);
  629. smalltalk.addClass('ClassSelectionAnnouncement', smalltalk.Object, ['theClass'], 'Documentation');
  630. smalltalk.addMethod(
  631. '_theClass',
  632. smalltalk.method({
  633. selector: 'theClass',
  634. fn: function (){
  635. var self=this;
  636. return self['@theClass'];
  637. return self;}
  638. }),
  639. smalltalk.ClassSelectionAnnouncement);
  640. smalltalk.addMethod(
  641. '_theClass_',
  642. smalltalk.method({
  643. selector: 'theClass:',
  644. fn: function (aClass){
  645. var self=this;
  646. self['@theClass']=aClass;
  647. return self;}
  648. }),
  649. smalltalk.ClassSelectionAnnouncement);
  650. smalltalk.addMethod(
  651. '_on_',
  652. smalltalk.method({
  653. selector: 'on:',
  654. fn: function (aClass){
  655. var self=this;
  656. return (function($rec){smalltalk.send($rec, "_theClass_", [aClass]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  657. return self;}
  658. }),
  659. smalltalk.ClassSelectionAnnouncement.klass);