Helios-Core.js 62 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143
  1. smalltalk.addPackage('Helios-Core', {});
  2. smalltalk.addClass('HLEnvironment', smalltalk.Object, [], 'Helios-Core');
  3. smalltalk.HLEnvironment.comment="Abstract class defining common behavior for local and remote environments"
  4. smalltalk.addMethod(
  5. "_eval_on_",
  6. smalltalk.method({
  7. selector: "eval:on:",
  8. category: 'actions',
  9. fn: function (someCode,aReceiver){
  10. var self=this;
  11. var $1;
  12. $1=smalltalk.send(self,"_subclassResponsibility",[]);
  13. return $1;
  14. },
  15. args: ["someCode", "aReceiver"],
  16. source: "eval: someCode on: aReceiver\x0a\x0a\x09^ self subclassResponsibility",
  17. messageSends: ["subclassResponsibility"],
  18. referencedClasses: []
  19. }),
  20. smalltalk.HLEnvironment);
  21. smalltalk.addMethod(
  22. "_packages",
  23. smalltalk.method({
  24. selector: "packages",
  25. category: 'accessing',
  26. fn: function (){
  27. var self=this;
  28. var $1;
  29. $1=smalltalk.send(self,"_subclassResponsibility",[]);
  30. return $1;
  31. },
  32. args: [],
  33. source: "packages\x0a\x0a\x09^ self subclassResponsibility",
  34. messageSends: ["subclassResponsibility"],
  35. referencedClasses: []
  36. }),
  37. smalltalk.HLEnvironment);
  38. smalltalk.addClass('HLLocalEnvironment', smalltalk.HLEnvironment, [], 'Helios-Core');
  39. smalltalk.addMethod(
  40. "_eval_on_",
  41. smalltalk.method({
  42. selector: "eval:on:",
  43. category: 'actions',
  44. fn: function (someCode,aReceiver){
  45. var self=this;
  46. var $1,$2;
  47. var $early={};
  48. try {
  49. var compiler;
  50. compiler=smalltalk.send((smalltalk.Compiler || Compiler),"_new",[]);
  51. smalltalk.send((function(){
  52. return smalltalk.send(compiler,"_parseExpression_",[someCode]);
  53. }),"_on_do_",[(smalltalk.Error || Error),(function(ex){
  54. $1=smalltalk.send(window,"_alert_",[smalltalk.send(ex,"_messageText",[])]);
  55. throw $early=[$1];
  56. })]);
  57. $2=smalltalk.send(smalltalk.send(smalltalk.send(compiler,"_eval_",[smalltalk.send(compiler,"_compile_forClass_",[smalltalk.send(smalltalk.send("doIt ^[","__comma",[someCode]),"__comma",["] value"]),(smalltalk.DoIt || DoIt)])]),"_fn",[]),"_applyTo_arguments_",[aReceiver,[]]);
  58. return $2;
  59. }
  60. catch(e) {if(e===$early)return e[0]; throw e}
  61. },
  62. args: ["someCode", "aReceiver"],
  63. source: "eval: someCode on: aReceiver\x0a\x09| compiler |\x0a\x09compiler := Compiler new.\x0a\x09[compiler parseExpression: someCode] on: Error do: [:ex |\x0a\x09\x09^window alert: ex messageText].\x0a\x09^(compiler eval: (compiler compile: 'doIt ^[', someCode, '] value' forClass: DoIt)) fn applyTo: aReceiver arguments: #()",
  64. messageSends: ["new", "on:do:", "alert:", "messageText", "parseExpression:", "applyTo:arguments:", "fn", "eval:", "compile:forClass:", ","],
  65. referencedClasses: ["Compiler", "Error", "DoIt"]
  66. }),
  67. smalltalk.HLLocalEnvironment);
  68. smalltalk.addMethod(
  69. "_packages",
  70. smalltalk.method({
  71. selector: "packages",
  72. category: 'accessing',
  73. fn: function (){
  74. var self=this;
  75. var $1;
  76. $1=smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk),"_current",[]),"_packages",[]);
  77. return $1;
  78. },
  79. args: [],
  80. source: "packages\x0a\x0a\x09^ Smalltalk current packages",
  81. messageSends: ["packages", "current"],
  82. referencedClasses: ["Smalltalk"]
  83. }),
  84. smalltalk.HLLocalEnvironment);
  85. smalltalk.addClass('HLRemoteEnvironment', smalltalk.HLEnvironment, [], 'Helios-Core');
  86. smalltalk.addMethod(
  87. "_eval_on_",
  88. smalltalk.method({
  89. selector: "eval:on:",
  90. category: 'actions',
  91. fn: function (someCode,aReceiver){
  92. var self=this;
  93. smalltalk.send(self,"_notYetImplemented",[]);
  94. return self},
  95. args: ["someCode", "aReceiver"],
  96. source: "eval: someCode on: aReceiver\x0a\x0a\x09\x22Note for future self and friends:\x0a whatever way this compilation happens on the other side, \x0a it should return a proxy to the remote resulting object\x22\x0a \x0a self notYetImplemented",
  97. messageSends: ["notYetImplemented"],
  98. referencedClasses: []
  99. }),
  100. smalltalk.HLRemoteEnvironment);
  101. smalltalk.addMethod(
  102. "_packages",
  103. smalltalk.method({
  104. selector: "packages",
  105. category: 'accessing',
  106. fn: function (){
  107. var self=this;
  108. return self},
  109. args: [],
  110. source: "packages\x0a\x09\x22Answer the remote environment's packages\x22\x0a \x0a\x09\x22to-do\x22\x0a \x0a \x22Note for future self and friends:\x0a the problem with remote stuff is that the answers shouldn't be expected to be\x0a received in a syncrhonous fashion. Everything network is asyc, so you *are going to deal with callbacks* here\x22",
  111. messageSends: [],
  112. referencedClasses: []
  113. }),
  114. smalltalk.HLRemoteEnvironment);
  115. smalltalk.addClass('HLRemoteObject', smalltalk.Object, [], 'Helios-Core');
  116. smalltalk.HLRemoteObject.comment="This is a local proxy to a remote object.\x0aTipically useful for evaluating and inspecting and interacting with instances of a remote VM.\x0a"
  117. smalltalk.addMethod(
  118. "_doesNotUnderstand_",
  119. smalltalk.method({
  120. selector: "doesNotUnderstand:",
  121. category: 'actions',
  122. fn: function (aMessage){
  123. var self=this;
  124. return self},
  125. args: ["aMessage"],
  126. source: "doesNotUnderstand: aMessage\x0a\x0a\x09\x22to-do\x0a\x0a\x09aham, blah blah\x0a\x0a\x09super doesNotUnderstand: aMessage\x22",
  127. messageSends: [],
  128. referencedClasses: []
  129. }),
  130. smalltalk.HLRemoteObject);
  131. smalltalk.addMethod(
  132. "_inspectOn_",
  133. smalltalk.method({
  134. selector: "inspectOn:",
  135. category: 'actions',
  136. fn: function (anInspector){
  137. var self=this;
  138. return self},
  139. args: ["anInspector"],
  140. source: "inspectOn: anInspector\x0a\x0a\x09\x22to-do\x22\x0a\x0a\x09\x22this is a source of so much fun...\x22\x0a",
  141. messageSends: [],
  142. referencedClasses: []
  143. }),
  144. smalltalk.HLRemoteObject);
  145. smalltalk.addMethod(
  146. "_printString",
  147. smalltalk.method({
  148. selector: "printString",
  149. category: 'actions',
  150. fn: function (){
  151. var self=this;
  152. return "this is a remote object";
  153. },
  154. args: [],
  155. source: "printString\x0a\x09^ 'this is a remote object'",
  156. messageSends: [],
  157. referencedClasses: []
  158. }),
  159. smalltalk.HLRemoteObject);
  160. smalltalk.addClass('HLSourceArea', smalltalk.Widget, ['editor', 'textarea', 'div', 'receiver', 'onDoIt'], 'Helios-Core');
  161. smalltalk.addMethod(
  162. "_clear",
  163. smalltalk.method({
  164. selector: "clear",
  165. category: 'actions',
  166. fn: function (){
  167. var self=this;
  168. smalltalk.send(self,"_contents_",[""]);
  169. return self},
  170. args: [],
  171. source: "clear\x0a self contents: ''",
  172. messageSends: ["contents:"],
  173. referencedClasses: []
  174. }),
  175. smalltalk.HLSourceArea);
  176. smalltalk.addMethod(
  177. "_contents",
  178. smalltalk.method({
  179. selector: "contents",
  180. category: 'accessing',
  181. fn: function (){
  182. var self=this;
  183. var $1;
  184. $1=smalltalk.send(self["@editor"],"_getValue",[]);
  185. return $1;
  186. },
  187. args: [],
  188. source: "contents\x0a ^editor getValue",
  189. messageSends: ["getValue"],
  190. referencedClasses: []
  191. }),
  192. smalltalk.HLSourceArea);
  193. smalltalk.addMethod(
  194. "_contents_",
  195. smalltalk.method({
  196. selector: "contents:",
  197. category: 'accessing',
  198. fn: function (aString){
  199. var self=this;
  200. smalltalk.send(self["@editor"],"_setValue_",[aString]);
  201. return self},
  202. args: ["aString"],
  203. source: "contents: aString\x0a editor setValue: aString",
  204. messageSends: ["setValue:"],
  205. referencedClasses: []
  206. }),
  207. smalltalk.HLSourceArea);
  208. smalltalk.addMethod(
  209. "_currentLine",
  210. smalltalk.method({
  211. selector: "currentLine",
  212. category: 'accessing',
  213. fn: function (){
  214. var self=this;
  215. var $1;
  216. $1=smalltalk.send(self["@editor"],"_getLine_",[smalltalk.send(smalltalk.send(self["@editor"],"_getCursor",[]),"_line",[])]);
  217. return $1;
  218. },
  219. args: [],
  220. source: "currentLine\x0a ^editor getLine: (editor getCursor line)",
  221. messageSends: ["getLine:", "line", "getCursor"],
  222. referencedClasses: []
  223. }),
  224. smalltalk.HLSourceArea);
  225. smalltalk.addMethod(
  226. "_currentLineOrSelection",
  227. smalltalk.method({
  228. selector: "currentLineOrSelection",
  229. category: 'accessing',
  230. fn: function (){
  231. var self=this;
  232. var $2,$1;
  233. $2=smalltalk.send(self["@editor"],"_somethingSelected",[]);
  234. if(smalltalk.assert($2)){
  235. $1=smalltalk.send(self,"_selection",[]);
  236. } else {
  237. $1=smalltalk.send(self,"_currentLine",[]);
  238. };
  239. return $1;
  240. },
  241. args: [],
  242. source: "currentLineOrSelection\x0a ^editor somethingSelected\x0a\x09ifFalse: [self currentLine]\x0a\x09ifTrue: [self selection]",
  243. messageSends: ["ifFalse:ifTrue:", "currentLine", "selection", "somethingSelected"],
  244. referencedClasses: []
  245. }),
  246. smalltalk.HLSourceArea);
  247. smalltalk.addMethod(
  248. "_doIt",
  249. smalltalk.method({
  250. selector: "doIt",
  251. category: 'actions',
  252. fn: function (){
  253. var self=this;
  254. var $1;
  255. var result;
  256. result=smalltalk.send(self,"_eval_",[smalltalk.send(self,"_currentLineOrSelection",[])]);
  257. $1=smalltalk.send(self,"_onDoIt",[]);
  258. if(($receiver = $1) == nil || $receiver == undefined){
  259. $1;
  260. } else {
  261. smalltalk.send(smalltalk.send(self,"_onDoIt",[]),"_value",[]);
  262. };
  263. return result;
  264. },
  265. args: [],
  266. source: "doIt\x0a | result |\x0a result := self eval: self currentLineOrSelection.\x0a self onDoIt ifNotNil: [self onDoIt value].\x0a ^result",
  267. messageSends: ["eval:", "currentLineOrSelection", "ifNotNil:", "value", "onDoIt"],
  268. referencedClasses: []
  269. }),
  270. smalltalk.HLSourceArea);
  271. smalltalk.addMethod(
  272. "_editor",
  273. smalltalk.method({
  274. selector: "editor",
  275. category: 'accessing',
  276. fn: function (){
  277. var self=this;
  278. return self["@editor"];
  279. },
  280. args: [],
  281. source: "editor\x0a\x09^editor",
  282. messageSends: [],
  283. referencedClasses: []
  284. }),
  285. smalltalk.HLSourceArea);
  286. smalltalk.addMethod(
  287. "_eval_",
  288. smalltalk.method({
  289. selector: "eval:",
  290. category: 'actions',
  291. fn: function (aString){
  292. var self=this;
  293. var $1,$2;
  294. var $early={};
  295. try {
  296. var compiler;
  297. compiler=smalltalk.send((smalltalk.Compiler || Compiler),"_new",[]);
  298. smalltalk.send((function(){
  299. return smalltalk.send(compiler,"_parseExpression_",[aString]);
  300. }),"_on_do_",[(smalltalk.Error || Error),(function(ex){
  301. $1=smalltalk.send(window,"_alert_",[smalltalk.send(ex,"_messageText",[])]);
  302. throw $early=[$1];
  303. })]);
  304. $2=smalltalk.send(smalltalk.send(smalltalk.send(compiler,"_eval_",[smalltalk.send(compiler,"_compile_forClass_",[smalltalk.send(smalltalk.send("doIt ^[","__comma",[aString]),"__comma",["] value"]),(smalltalk.DoIt || DoIt)])]),"_fn",[]),"_applyTo_arguments_",[smalltalk.send(self,"_receiver",[]),[]]);
  305. return $2;
  306. }
  307. catch(e) {if(e===$early)return e[0]; throw e}
  308. },
  309. args: ["aString"],
  310. source: "eval: aString\x0a\x09| compiler |\x0a\x09compiler := Compiler new.\x0a\x09[compiler parseExpression: aString] on: Error do: [:ex |\x0a\x09\x09^window alert: ex messageText].\x0a\x09^(compiler eval: (compiler compile: 'doIt ^[', aString, '] value' forClass: DoIt)) fn applyTo: self receiver arguments: #()",
  311. messageSends: ["new", "on:do:", "alert:", "messageText", "parseExpression:", "applyTo:arguments:", "receiver", "fn", "eval:", "compile:forClass:", ","],
  312. referencedClasses: ["Compiler", "Error", "DoIt"]
  313. }),
  314. smalltalk.HLSourceArea);
  315. smalltalk.addMethod(
  316. "_fileIn",
  317. smalltalk.method({
  318. selector: "fileIn",
  319. category: 'actions',
  320. fn: function (){
  321. var self=this;
  322. smalltalk.send(smalltalk.send((smalltalk.Importer || Importer),"_new",[]),"_import_",[smalltalk.send(smalltalk.send(self,"_currentLineOrSelection",[]),"_readStream",[])]);
  323. return self},
  324. args: [],
  325. source: "fileIn\x0a Importer new import: self currentLineOrSelection readStream",
  326. messageSends: ["import:", "readStream", "currentLineOrSelection", "new"],
  327. referencedClasses: ["Importer"]
  328. }),
  329. smalltalk.HLSourceArea);
  330. smalltalk.addMethod(
  331. "_handleKeyDown_",
  332. smalltalk.method({
  333. selector: "handleKeyDown:",
  334. category: 'actions',
  335. fn: function (anEvent){
  336. var self=this;
  337. if(anEvent.ctrlKey) {
  338. if(anEvent.keyCode === 80) { //ctrl+p
  339. self._printIt();
  340. anEvent.preventDefault();
  341. return false;
  342. }
  343. if(anEvent.keyCode === 68) { //ctrl+d
  344. self._doIt();
  345. anEvent.preventDefault();
  346. return false;
  347. }
  348. if(anEvent.keyCode === 73) { //ctrl+i
  349. self._inspectIt();
  350. anEvent.preventDefault();
  351. return false;
  352. }
  353. };
  354. ;
  355. return self},
  356. args: ["anEvent"],
  357. source: "handleKeyDown: anEvent\x0a <if(anEvent.ctrlKey) {\x0a\x09\x09if(anEvent.keyCode === 80) { //ctrl+p\x0a\x09\x09\x09self._printIt();\x0a\x09\x09\x09anEvent.preventDefault();\x0a\x09\x09\x09return false;\x0a\x09\x09}\x0a\x09\x09if(anEvent.keyCode === 68) { //ctrl+d\x0a\x09\x09\x09self._doIt();\x0a\x09\x09\x09anEvent.preventDefault();\x0a\x09\x09\x09return false;\x0a\x09\x09}\x0a\x09\x09if(anEvent.keyCode === 73) { //ctrl+i\x0a\x09\x09\x09self._inspectIt();\x0a\x09\x09\x09anEvent.preventDefault();\x0a\x09\x09\x09return false;\x0a\x09\x09}\x0a\x09}>",
  358. messageSends: [],
  359. referencedClasses: []
  360. }),
  361. smalltalk.HLSourceArea);
  362. smalltalk.addMethod(
  363. "_inspectIt",
  364. smalltalk.method({
  365. selector: "inspectIt",
  366. category: 'actions',
  367. fn: function (){
  368. var self=this;
  369. smalltalk.send(smalltalk.send(self,"_doIt",[]),"_inspect",[]);
  370. return self},
  371. args: [],
  372. source: "inspectIt\x0a self doIt inspect",
  373. messageSends: ["inspect", "doIt"],
  374. referencedClasses: []
  375. }),
  376. smalltalk.HLSourceArea);
  377. smalltalk.addMethod(
  378. "_onDoIt",
  379. smalltalk.method({
  380. selector: "onDoIt",
  381. category: 'accessing',
  382. fn: function (){
  383. var self=this;
  384. return self["@onDoIt"];
  385. },
  386. args: [],
  387. source: "onDoIt\x0a\x09^onDoIt",
  388. messageSends: [],
  389. referencedClasses: []
  390. }),
  391. smalltalk.HLSourceArea);
  392. smalltalk.addMethod(
  393. "_onDoIt_",
  394. smalltalk.method({
  395. selector: "onDoIt:",
  396. category: 'accessing',
  397. fn: function (aBlock){
  398. var self=this;
  399. self["@onDoIt"]=aBlock;
  400. return self},
  401. args: ["aBlock"],
  402. source: "onDoIt: aBlock\x0a\x09onDoIt := aBlock",
  403. messageSends: [],
  404. referencedClasses: []
  405. }),
  406. smalltalk.HLSourceArea);
  407. smalltalk.addMethod(
  408. "_onKeyDown_",
  409. smalltalk.method({
  410. selector: "onKeyDown:",
  411. category: 'events',
  412. fn: function (aBlock){
  413. var self=this;
  414. smalltalk.send(self["@div"],"_onKeyDown_",[aBlock]);
  415. return self},
  416. args: ["aBlock"],
  417. source: "onKeyDown: aBlock\x0a\x09div onKeyDown: aBlock",
  418. messageSends: ["onKeyDown:"],
  419. referencedClasses: []
  420. }),
  421. smalltalk.HLSourceArea);
  422. smalltalk.addMethod(
  423. "_onKeyUp_",
  424. smalltalk.method({
  425. selector: "onKeyUp:",
  426. category: 'events',
  427. fn: function (aBlock){
  428. var self=this;
  429. smalltalk.send(self["@div"],"_onKeyUp_",[aBlock]);
  430. return self},
  431. args: ["aBlock"],
  432. source: "onKeyUp: aBlock\x0a\x09div onKeyUp: aBlock",
  433. messageSends: ["onKeyUp:"],
  434. referencedClasses: []
  435. }),
  436. smalltalk.HLSourceArea);
  437. smalltalk.addMethod(
  438. "_print_",
  439. smalltalk.method({
  440. selector: "print:",
  441. category: 'actions',
  442. fn: function (aString){
  443. var self=this;
  444. var start;
  445. var stop;
  446. start=smalltalk.send((smalltalk.HashedCollection || HashedCollection),"_new",[]);
  447. stop=smalltalk.send((smalltalk.HashedCollection || HashedCollection),"_new",[]);
  448. smalltalk.send(start,"_at_put_",["line",smalltalk.send(smalltalk.send(self["@editor"],"_getCursor_",[false]),"_line",[])]);
  449. smalltalk.send(start,"_at_put_",["ch",smalltalk.send(smalltalk.send(self["@editor"],"_getCursor_",[false]),"_ch",[])]);
  450. smalltalk.send(stop,"_at_put_",["line",smalltalk.send(start,"_at_",["line"])]);
  451. smalltalk.send(stop,"_at_put_",["ch",smalltalk.send(smalltalk.send(smalltalk.send(start,"_at_",["ch"]),"__plus",[smalltalk.send(aString,"_size",[])]),"__plus",[(2)])]);
  452. smalltalk.send(self["@editor"],"_replaceSelection_",[smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self["@editor"],"_getSelection",[]),"__comma",[" "]),"__comma",[aString]),"__comma",[" "])]);
  453. smalltalk.send(self["@editor"],"_setCursor_",[smalltalk.send(self["@editor"],"_getCursor_",[true])]);
  454. smalltalk.send(self["@editor"],"_setSelection_end_",[stop,start]);
  455. return self},
  456. args: ["aString"],
  457. source: "print: aString\x0a\x09| start stop |\x0a\x09start := HashedCollection new.\x0a\x09stop := HashedCollection new.\x0a\x09start at: 'line' put: (editor getCursor: false) line.\x0a\x09start at: 'ch' put: (editor getCursor: false) ch.\x0a\x09stop at: 'line' put: (start at: 'line').\x0a\x09stop at: 'ch' put: ((start at: 'ch') + aString size + 2).\x0a\x09editor replaceSelection: (editor getSelection, ' ', aString, ' ').\x0a\x09editor setCursor: (editor getCursor: true).\x0a\x09editor setSelection: stop end: start",
  458. messageSends: ["new", "at:put:", "line", "getCursor:", "ch", "at:", "+", "size", "replaceSelection:", ",", "getSelection", "setCursor:", "setSelection:end:"],
  459. referencedClasses: ["HashedCollection"]
  460. }),
  461. smalltalk.HLSourceArea);
  462. smalltalk.addMethod(
  463. "_printIt",
  464. smalltalk.method({
  465. selector: "printIt",
  466. category: 'actions',
  467. fn: function (){
  468. var self=this;
  469. smalltalk.send(self,"_print_",[smalltalk.send(smalltalk.send(self,"_doIt",[]),"_printString",[])]);
  470. return self},
  471. args: [],
  472. source: "printIt\x0a self print: self doIt printString",
  473. messageSends: ["print:", "printString", "doIt"],
  474. referencedClasses: []
  475. }),
  476. smalltalk.HLSourceArea);
  477. smalltalk.addMethod(
  478. "_receiver",
  479. smalltalk.method({
  480. selector: "receiver",
  481. category: 'accessing',
  482. fn: function (){
  483. var self=this;
  484. var $1;
  485. if(($receiver = self["@receiver"]) == nil || $receiver == undefined){
  486. $1=smalltalk.send((smalltalk.DoIt || DoIt),"_new",[]);
  487. } else {
  488. $1=self["@receiver"];
  489. };
  490. return $1;
  491. },
  492. args: [],
  493. source: "receiver\x0a\x09^receiver ifNil: [DoIt new]",
  494. messageSends: ["ifNil:", "new"],
  495. referencedClasses: ["DoIt"]
  496. }),
  497. smalltalk.HLSourceArea);
  498. smalltalk.addMethod(
  499. "_receiver_",
  500. smalltalk.method({
  501. selector: "receiver:",
  502. category: 'accessing',
  503. fn: function (anObject){
  504. var self=this;
  505. self["@receiver"]=anObject;
  506. return self},
  507. args: ["anObject"],
  508. source: "receiver: anObject\x0a\x09receiver := anObject",
  509. messageSends: [],
  510. referencedClasses: []
  511. }),
  512. smalltalk.HLSourceArea);
  513. smalltalk.addMethod(
  514. "_renderOn_",
  515. smalltalk.method({
  516. selector: "renderOn:",
  517. category: 'rendering',
  518. fn: function (html){
  519. var self=this;
  520. self["@div"]=smalltalk.send(smalltalk.send(html,"_div",[]),"_class_",["source"]);
  521. smalltalk.send(self["@div"],"_with_",[(function(){
  522. self["@textarea"]=smalltalk.send(html,"_textarea",[]);
  523. return self["@textarea"];
  524. })]);
  525. smalltalk.send(self,"_setEditorOn_",[smalltalk.send(self["@textarea"],"_element",[])]);
  526. smalltalk.send(self["@div"],"_onKeyDown_",[(function(e){
  527. return smalltalk.send(self,"_handleKeyDown_",[e]);
  528. })]);
  529. return self},
  530. args: ["html"],
  531. source: "renderOn: html\x0a div := html div class: 'source'.\x0a div with: [textarea := html textarea].\x0a self setEditorOn: textarea element.\x0a div onKeyDown: [:e | self handleKeyDown: e]",
  532. messageSends: ["class:", "div", "with:", "textarea", "setEditorOn:", "element", "onKeyDown:", "handleKeyDown:"],
  533. referencedClasses: []
  534. }),
  535. smalltalk.HLSourceArea);
  536. smalltalk.addMethod(
  537. "_selection",
  538. smalltalk.method({
  539. selector: "selection",
  540. category: 'accessing',
  541. fn: function (){
  542. var self=this;
  543. var $1;
  544. $1=smalltalk.send(self["@editor"],"_getSelection",[]);
  545. return $1;
  546. },
  547. args: [],
  548. source: "selection\x0a\x09^editor getSelection",
  549. messageSends: ["getSelection"],
  550. referencedClasses: []
  551. }),
  552. smalltalk.HLSourceArea);
  553. smalltalk.addMethod(
  554. "_selectionEnd",
  555. smalltalk.method({
  556. selector: "selectionEnd",
  557. category: 'accessing',
  558. fn: function (){
  559. var self=this;
  560. var $1;
  561. $1=smalltalk.send(smalltalk.send(self["@textarea"],"_element",[]),"_selectionEnd",[]);
  562. return $1;
  563. },
  564. args: [],
  565. source: "selectionEnd\x0a ^textarea element selectionEnd",
  566. messageSends: ["selectionEnd", "element"],
  567. referencedClasses: []
  568. }),
  569. smalltalk.HLSourceArea);
  570. smalltalk.addMethod(
  571. "_selectionEnd_",
  572. smalltalk.method({
  573. selector: "selectionEnd:",
  574. category: 'accessing',
  575. fn: function (anInteger){
  576. var self=this;
  577. smalltalk.send(smalltalk.send(self["@textarea"],"_element",[]),"_selectionEnd_",[anInteger]);
  578. return self},
  579. args: ["anInteger"],
  580. source: "selectionEnd: anInteger\x0a textarea element selectionEnd: anInteger",
  581. messageSends: ["selectionEnd:", "element"],
  582. referencedClasses: []
  583. }),
  584. smalltalk.HLSourceArea);
  585. smalltalk.addMethod(
  586. "_selectionStart",
  587. smalltalk.method({
  588. selector: "selectionStart",
  589. category: 'accessing',
  590. fn: function (){
  591. var self=this;
  592. var $1;
  593. $1=smalltalk.send(smalltalk.send(self["@textarea"],"_element",[]),"_selectionStart",[]);
  594. return $1;
  595. },
  596. args: [],
  597. source: "selectionStart\x0a ^textarea element selectionStart",
  598. messageSends: ["selectionStart", "element"],
  599. referencedClasses: []
  600. }),
  601. smalltalk.HLSourceArea);
  602. smalltalk.addMethod(
  603. "_selectionStart_",
  604. smalltalk.method({
  605. selector: "selectionStart:",
  606. category: 'accessing',
  607. fn: function (anInteger){
  608. var self=this;
  609. smalltalk.send(smalltalk.send(self["@textarea"],"_element",[]),"_selectionStart_",[anInteger]);
  610. return self},
  611. args: ["anInteger"],
  612. source: "selectionStart: anInteger\x0a textarea element selectionStart: anInteger",
  613. messageSends: ["selectionStart:", "element"],
  614. referencedClasses: []
  615. }),
  616. smalltalk.HLSourceArea);
  617. smalltalk.addMethod(
  618. "_setEditorOn_",
  619. smalltalk.method({
  620. selector: "setEditorOn:",
  621. category: 'accessing',
  622. fn: function (aTextarea){
  623. var self=this;
  624. self['@editor'] = CodeMirror.fromTextArea(aTextarea, {
  625. theme: 'amber',
  626. lineNumbers: true,
  627. enterMode: 'flat',
  628. matchBrackets: true,
  629. electricChars: false
  630. });
  631. ;
  632. return self},
  633. args: ["aTextarea"],
  634. source: "setEditorOn: aTextarea\x0a\x09<self['@editor'] = CodeMirror.fromTextArea(aTextarea, {\x0a\x09\x09theme: 'amber',\x0a lineNumbers: true,\x0a enterMode: 'flat',\x0a matchBrackets: true,\x0a electricChars: false\x0a\x09})>",
  635. messageSends: [],
  636. referencedClasses: []
  637. }),
  638. smalltalk.HLSourceArea);
  639. smalltalk.addMethod(
  640. "_val",
  641. smalltalk.method({
  642. selector: "val",
  643. category: 'accessing',
  644. fn: function (){
  645. var self=this;
  646. var $1;
  647. $1=smalltalk.send(self["@editor"],"_getValue",[]);
  648. return $1;
  649. },
  650. args: [],
  651. source: "val\x0a ^editor getValue",
  652. messageSends: ["getValue"],
  653. referencedClasses: []
  654. }),
  655. smalltalk.HLSourceArea);
  656. smalltalk.addMethod(
  657. "_val_",
  658. smalltalk.method({
  659. selector: "val:",
  660. category: 'accessing',
  661. fn: function (aString){
  662. var self=this;
  663. smalltalk.send(self["@editor"],"_setValue_",[aString]);
  664. return self},
  665. args: ["aString"],
  666. source: "val: aString\x0a editor setValue: aString",
  667. messageSends: ["setValue:"],
  668. referencedClasses: []
  669. }),
  670. smalltalk.HLSourceArea);
  671. smalltalk.addClass('HLTab', smalltalk.Object, ['widget', 'label'], 'Helios-Core');
  672. smalltalk.addMethod(
  673. "_activate",
  674. smalltalk.method({
  675. selector: "activate",
  676. category: 'accessing',
  677. fn: function (){
  678. var self=this;
  679. smalltalk.send(smalltalk.send(self,"_manager",[]),"_activate_",[self]);
  680. return self},
  681. args: [],
  682. source: "activate\x0a\x09self manager activate: self",
  683. messageSends: ["activate:", "manager"],
  684. referencedClasses: []
  685. }),
  686. smalltalk.HLTab);
  687. smalltalk.addMethod(
  688. "_add",
  689. smalltalk.method({
  690. selector: "add",
  691. category: 'accessing',
  692. fn: function (){
  693. var self=this;
  694. smalltalk.send(smalltalk.send(self,"_manager",[]),"_addTab_",[self]);
  695. return self},
  696. args: [],
  697. source: "add\x0a\x09self manager addTab: self",
  698. messageSends: ["addTab:", "manager"],
  699. referencedClasses: []
  700. }),
  701. smalltalk.HLTab);
  702. smalltalk.addMethod(
  703. "_isActive",
  704. smalltalk.method({
  705. selector: "isActive",
  706. category: 'testing',
  707. fn: function (){
  708. var self=this;
  709. var $1;
  710. $1=smalltalk.send(smalltalk.send(smalltalk.send(self,"_manager",[]),"_activeTab",[]),"__eq",[self]);
  711. return $1;
  712. },
  713. args: [],
  714. source: "isActive\x0a\x09^ self manager activeTab = self",
  715. messageSends: ["=", "activeTab", "manager"],
  716. referencedClasses: []
  717. }),
  718. smalltalk.HLTab);
  719. smalltalk.addMethod(
  720. "_label",
  721. smalltalk.method({
  722. selector: "label",
  723. category: 'accessing',
  724. fn: function (){
  725. var self=this;
  726. var $1;
  727. if(($receiver = self["@label"]) == nil || $receiver == undefined){
  728. $1="";
  729. } else {
  730. $1=self["@label"];
  731. };
  732. return $1;
  733. },
  734. args: [],
  735. source: "label\x0a\x09^ label ifNil: [ '' ]",
  736. messageSends: ["ifNil:"],
  737. referencedClasses: []
  738. }),
  739. smalltalk.HLTab);
  740. smalltalk.addMethod(
  741. "_label_",
  742. smalltalk.method({
  743. selector: "label:",
  744. category: 'accessing',
  745. fn: function (aString){
  746. var self=this;
  747. self["@label"]=aString;
  748. return self},
  749. args: ["aString"],
  750. source: "label: aString\x0a\x09label := aString",
  751. messageSends: [],
  752. referencedClasses: []
  753. }),
  754. smalltalk.HLTab);
  755. smalltalk.addMethod(
  756. "_manager",
  757. smalltalk.method({
  758. selector: "manager",
  759. category: 'accessing',
  760. fn: function (){
  761. var self=this;
  762. var $1;
  763. $1=smalltalk.send((smalltalk.HLManager || HLManager),"_current",[]);
  764. return $1;
  765. },
  766. args: [],
  767. source: "manager\x0a\x09^ HLManager current",
  768. messageSends: ["current"],
  769. referencedClasses: ["HLManager"]
  770. }),
  771. smalltalk.HLTab);
  772. smalltalk.addMethod(
  773. "_widget",
  774. smalltalk.method({
  775. selector: "widget",
  776. category: 'accessing',
  777. fn: function (){
  778. var self=this;
  779. return self["@widget"];
  780. },
  781. args: [],
  782. source: "widget\x0a\x09^ widget",
  783. messageSends: [],
  784. referencedClasses: []
  785. }),
  786. smalltalk.HLTab);
  787. smalltalk.addMethod(
  788. "_widget_",
  789. smalltalk.method({
  790. selector: "widget:",
  791. category: 'accessing',
  792. fn: function (aWidget){
  793. var self=this;
  794. self["@widget"]=aWidget;
  795. return self},
  796. args: ["aWidget"],
  797. source: "widget: aWidget\x0a\x09widget := aWidget",
  798. messageSends: [],
  799. referencedClasses: []
  800. }),
  801. smalltalk.HLTab);
  802. smalltalk.addMethod(
  803. "_on_labelled_",
  804. smalltalk.method({
  805. selector: "on:labelled:",
  806. category: 'instance creation',
  807. fn: function (aWidget,aString){
  808. var self=this;
  809. var $2,$3,$1;
  810. $2=smalltalk.send(self,"_new",[]);
  811. smalltalk.send($2,"_widget_",[aWidget]);
  812. smalltalk.send($2,"_label_",[aString]);
  813. $3=smalltalk.send($2,"_yourself",[]);
  814. $1=$3;
  815. return $1;
  816. },
  817. args: ["aWidget", "aString"],
  818. source: "on: aWidget labelled: aString\x0a\x09^ self new\x0a\x09\x09widget: aWidget;\x0a\x09\x09label: aString;\x0a\x09\x09yourself",
  819. messageSends: ["widget:", "new", "label:", "yourself"],
  820. referencedClasses: []
  821. }),
  822. smalltalk.HLTab.klass);
  823. smalltalk.addClass('HLWidget', smalltalk.Widget, ['rootDiv'], 'Helios-Core');
  824. smalltalk.addMethod(
  825. "_manager",
  826. smalltalk.method({
  827. selector: "manager",
  828. category: 'accessing',
  829. fn: function (){
  830. var self=this;
  831. var $1;
  832. $1=smalltalk.send((smalltalk.HLManager || HLManager),"_current",[]);
  833. return $1;
  834. },
  835. args: [],
  836. source: "manager\x0a\x09^ HLManager current",
  837. messageSends: ["current"],
  838. referencedClasses: ["HLManager"]
  839. }),
  840. smalltalk.HLWidget);
  841. smalltalk.addMethod(
  842. "_refresh",
  843. smalltalk.method({
  844. selector: "refresh",
  845. category: 'updating',
  846. fn: function (){
  847. var self=this;
  848. if(($receiver = self["@rootDiv"]) == nil || $receiver == undefined){
  849. return self;
  850. } else {
  851. self["@rootDiv"];
  852. };
  853. smalltalk.send(smalltalk.send(self["@rootDiv"],"_asJQuery",[]),"_empty",[]);
  854. smalltalk.send((function(html){
  855. return smalltalk.send(self,"_renderContentOn_",[html]);
  856. }),"_appendToJQuery_",[smalltalk.send(self["@rootDiv"],"_asJQuery",[])]);
  857. return self},
  858. args: [],
  859. source: "refresh\x0a\x09rootDiv ifNil: [ ^ self ].\x0a \x0a\x09rootDiv asJQuery empty.\x0a [ :html | self renderContentOn: html ] appendToJQuery: rootDiv asJQuery",
  860. messageSends: ["ifNil:", "empty", "asJQuery", "appendToJQuery:", "renderContentOn:"],
  861. referencedClasses: []
  862. }),
  863. smalltalk.HLWidget);
  864. smalltalk.addMethod(
  865. "_registerBindings",
  866. smalltalk.method({
  867. selector: "registerBindings",
  868. category: 'keybindings',
  869. fn: function (){
  870. var self=this;
  871. smalltalk.send(self,"_registerBindingsOn_",[smalltalk.send(smalltalk.send(smalltalk.send(self,"_manager",[]),"_keyBinder",[]),"_bindings",[])]);
  872. return self},
  873. args: [],
  874. source: "registerBindings\x0a\x09self registerBindingsOn: self manager keyBinder bindings",
  875. messageSends: ["registerBindingsOn:", "bindings", "keyBinder", "manager"],
  876. referencedClasses: []
  877. }),
  878. smalltalk.HLWidget);
  879. smalltalk.addMethod(
  880. "_registerBindingsOn_",
  881. smalltalk.method({
  882. selector: "registerBindingsOn:",
  883. category: 'keybindings',
  884. fn: function (aBindingGroup){
  885. var self=this;
  886. return self},
  887. args: ["aBindingGroup"],
  888. source: "registerBindingsOn: aBindingGroup",
  889. messageSends: [],
  890. referencedClasses: []
  891. }),
  892. smalltalk.HLWidget);
  893. smalltalk.addMethod(
  894. "_renderContentOn_",
  895. smalltalk.method({
  896. selector: "renderContentOn:",
  897. category: 'rendering',
  898. fn: function (html){
  899. var self=this;
  900. return self},
  901. args: ["html"],
  902. source: "renderContentOn: html\x0a",
  903. messageSends: [],
  904. referencedClasses: []
  905. }),
  906. smalltalk.HLWidget);
  907. smalltalk.addMethod(
  908. "_renderOn_",
  909. smalltalk.method({
  910. selector: "renderOn:",
  911. category: 'rendering',
  912. fn: function (html){
  913. var self=this;
  914. smalltalk.send(self,"_registerBindings",[]);
  915. self["@rootDiv"]=smalltalk.send(smalltalk.send(html,"_div",[]),"_with_",[(function(){
  916. return smalltalk.send(self,"_renderContentOn_",[html]);
  917. })]);
  918. return self},
  919. args: ["html"],
  920. source: "renderOn: html\x0a self registerBindings.\x0a\x0a\x09rootDiv := html div with: [\x0a \x09self renderContentOn: html ]",
  921. messageSends: ["registerBindings", "with:", "renderContentOn:", "div"],
  922. referencedClasses: []
  923. }),
  924. smalltalk.HLWidget);
  925. smalltalk.addMethod(
  926. "_subscribeTo_",
  927. smalltalk.method({
  928. selector: "subscribeTo:",
  929. category: 'announcements',
  930. fn: function (anAnnouncer){
  931. var self=this;
  932. return self},
  933. args: ["anAnnouncer"],
  934. source: "subscribeTo: anAnnouncer",
  935. messageSends: [],
  936. referencedClasses: []
  937. }),
  938. smalltalk.HLWidget);
  939. smalltalk.addMethod(
  940. "_canBeOpenAsTab",
  941. smalltalk.method({
  942. selector: "canBeOpenAsTab",
  943. category: 'testing',
  944. fn: function (){
  945. var self=this;
  946. return false;
  947. },
  948. args: [],
  949. source: "canBeOpenAsTab\x0a\x09^ false",
  950. messageSends: [],
  951. referencedClasses: []
  952. }),
  953. smalltalk.HLWidget.klass);
  954. smalltalk.addMethod(
  955. "_openAsTab",
  956. smalltalk.method({
  957. selector: "openAsTab",
  958. category: 'accessing',
  959. fn: function (){
  960. var self=this;
  961. smalltalk.send(smalltalk.send((smalltalk.HLManager || HLManager),"_current",[]),"_addTab_",[smalltalk.send((smalltalk.HLTab || HLTab),"_on_labelled_",[smalltalk.send(self,"_new",[]),smalltalk.send(self,"_tabLabel",[])])]);
  962. return self},
  963. args: [],
  964. source: "openAsTab\x0a\x09HLManager current addTab: (HLTab on: self new labelled: self tabLabel)",
  965. messageSends: ["addTab:", "on:labelled:", "new", "tabLabel", "current"],
  966. referencedClasses: ["HLTab", "HLManager"]
  967. }),
  968. smalltalk.HLWidget.klass);
  969. smalltalk.addMethod(
  970. "_tabLabel",
  971. smalltalk.method({
  972. selector: "tabLabel",
  973. category: 'accessing',
  974. fn: function (){
  975. var self=this;
  976. return "Tab";
  977. },
  978. args: [],
  979. source: "tabLabel\x0a\x09^ 'Tab'",
  980. messageSends: [],
  981. referencedClasses: []
  982. }),
  983. smalltalk.HLWidget.klass);
  984. smalltalk.addMethod(
  985. "_tabPriority",
  986. smalltalk.method({
  987. selector: "tabPriority",
  988. category: 'accessing',
  989. fn: function (){
  990. var self=this;
  991. return (500);
  992. },
  993. args: [],
  994. source: "tabPriority\x0a\x09^ 500",
  995. messageSends: [],
  996. referencedClasses: []
  997. }),
  998. smalltalk.HLWidget.klass);
  999. smalltalk.addClass('HLDebugger', smalltalk.HLWidget, [], 'Helios-Core');
  1000. smalltalk.addClass('HLFocusableWidget', smalltalk.HLWidget, ['hiddenInput'], 'Helios-Core');
  1001. smalltalk.addMethod(
  1002. "_blur",
  1003. smalltalk.method({
  1004. selector: "blur",
  1005. category: 'events',
  1006. fn: function (){
  1007. var self=this;
  1008. smalltalk.send(smalltalk.send(self["@hiddenInput"],"_asJQuery",[]),"_blur",[]);
  1009. return self},
  1010. args: [],
  1011. source: "blur\x0a\x09hiddenInput asJQuery blur",
  1012. messageSends: ["blur", "asJQuery"],
  1013. referencedClasses: []
  1014. }),
  1015. smalltalk.HLFocusableWidget);
  1016. smalltalk.addMethod(
  1017. "_focus",
  1018. smalltalk.method({
  1019. selector: "focus",
  1020. category: 'events',
  1021. fn: function (){
  1022. var self=this;
  1023. smalltalk.send(smalltalk.send(self["@hiddenInput"],"_asJQuery",[]),"_focus",[]);
  1024. return self},
  1025. args: [],
  1026. source: "focus\x0a\x09hiddenInput asJQuery focus",
  1027. messageSends: ["focus", "asJQuery"],
  1028. referencedClasses: []
  1029. }),
  1030. smalltalk.HLFocusableWidget);
  1031. smalltalk.addMethod(
  1032. "_focusClass",
  1033. smalltalk.method({
  1034. selector: "focusClass",
  1035. category: 'accessing',
  1036. fn: function (){
  1037. var self=this;
  1038. return "focused";
  1039. },
  1040. args: [],
  1041. source: "focusClass\x0a\x09^ 'focused'",
  1042. messageSends: [],
  1043. referencedClasses: []
  1044. }),
  1045. smalltalk.HLFocusableWidget);
  1046. smalltalk.addMethod(
  1047. "_hasFocus",
  1048. smalltalk.method({
  1049. selector: "hasFocus",
  1050. category: 'events',
  1051. fn: function (){
  1052. var self=this;
  1053. var $1;
  1054. $1=smalltalk.send(smalltalk.send(self["@rootDiv"],"_notNil",[]),"_and_",[(function(){
  1055. return smalltalk.send(smalltalk.send(self["@rootDiv"],"_asJQuery",[]),"_hasClass_",[smalltalk.send(self,"_focusClass",[])]);
  1056. })]);
  1057. return $1;
  1058. },
  1059. args: [],
  1060. source: "hasFocus\x0a\x09^ rootDiv notNil and: [ rootDiv asJQuery hasClass: self focusClass ]",
  1061. messageSends: ["and:", "hasClass:", "focusClass", "asJQuery", "notNil"],
  1062. referencedClasses: []
  1063. }),
  1064. smalltalk.HLFocusableWidget);
  1065. smalltalk.addMethod(
  1066. "_renderContentOn_",
  1067. smalltalk.method({
  1068. selector: "renderContentOn:",
  1069. category: 'rendering',
  1070. fn: function (html){
  1071. var self=this;
  1072. return self},
  1073. args: ["html"],
  1074. source: "renderContentOn: html",
  1075. messageSends: [],
  1076. referencedClasses: []
  1077. }),
  1078. smalltalk.HLFocusableWidget);
  1079. smalltalk.addMethod(
  1080. "_renderHiddenInputOn_",
  1081. smalltalk.method({
  1082. selector: "renderHiddenInputOn:",
  1083. category: 'rendering',
  1084. fn: function (html){
  1085. var self=this;
  1086. var $1,$2;
  1087. $1=smalltalk.send(html,"_input",[]);
  1088. smalltalk.send($1,"_style_",["position: absolute; left: -100000px;"]);
  1089. smalltalk.send($1,"_onBlur_",[(function(){
  1090. return smalltalk.send(smalltalk.send(self["@rootDiv"],"_asJQuery",[]),"_removeClass_",[smalltalk.send(self,"_focusClass",[])]);
  1091. })]);
  1092. $2=smalltalk.send($1,"_onFocus_",[(function(){
  1093. return smalltalk.send(smalltalk.send(self["@rootDiv"],"_asJQuery",[]),"_addClass_",[smalltalk.send(self,"_focusClass",[])]);
  1094. })]);
  1095. self["@hiddenInput"]=$2;
  1096. return self},
  1097. args: ["html"],
  1098. source: "renderHiddenInputOn: html\x0a\x09hiddenInput := html input\x0a \x09style: 'position: absolute; left: -100000px;';\x0a \x09onBlur: [ rootDiv asJQuery removeClass: self focusClass ];\x0a onFocus: [ rootDiv asJQuery addClass: self focusClass ]",
  1099. messageSends: ["style:", "input", "onBlur:", "removeClass:", "focusClass", "asJQuery", "onFocus:", "addClass:"],
  1100. referencedClasses: []
  1101. }),
  1102. smalltalk.HLFocusableWidget);
  1103. smalltalk.addMethod(
  1104. "_renderOn_",
  1105. smalltalk.method({
  1106. selector: "renderOn:",
  1107. category: 'rendering',
  1108. fn: function (html){
  1109. var self=this;
  1110. var $1,$2;
  1111. smalltalk.send(self,"_registerBindings",[]);
  1112. smalltalk.send(self,"_renderHiddenInputOn_",[html]);
  1113. $1=smalltalk.send(html,"_div",[]);
  1114. smalltalk.send($1,"_class_",["hl_widget"]);
  1115. smalltalk.send($1,"_onClick_",[(function(){
  1116. return smalltalk.send(smalltalk.send(self["@hiddenInput"],"_asJQuery",[]),"_focus",[]);
  1117. })]);
  1118. $2=smalltalk.send($1,"_with_",[(function(){
  1119. return smalltalk.send(self,"_renderContentOn_",[html]);
  1120. })]);
  1121. self["@rootDiv"]=$2;
  1122. return self},
  1123. args: ["html"],
  1124. source: "renderOn: html\x0a\x09self registerBindings.\x0a\x09self renderHiddenInputOn: html.\x0a \x0a rootDiv := html div \x0a \x09class: 'hl_widget'; \x0a onClick: [ hiddenInput asJQuery focus ];\x0a with: [\x0a\x09\x09\x09self renderContentOn: html ]",
  1125. messageSends: ["registerBindings", "renderHiddenInputOn:", "class:", "div", "onClick:", "focus", "asJQuery", "with:", "renderContentOn:"],
  1126. referencedClasses: []
  1127. }),
  1128. smalltalk.HLFocusableWidget);
  1129. smalltalk.addClass('HLListWidget', smalltalk.HLFocusableWidget, ['items', 'selectedItem'], 'Helios-Core');
  1130. smalltalk.addMethod(
  1131. "_activateListItem_",
  1132. smalltalk.method({
  1133. selector: "activateListItem:",
  1134. category: 'actions',
  1135. fn: function (aListItem){
  1136. var self=this;
  1137. var $1,$2,$3;
  1138. var parent;
  1139. var position;
  1140. $1=smalltalk.send(aListItem,"_get_",[(0)]);
  1141. if(($receiver = $1) == nil || $receiver == undefined){
  1142. return self;
  1143. } else {
  1144. $1;
  1145. };
  1146. position = aListItem.parent().children().get().indexOf(aListItem.get(0)) + 1;
  1147. ;
  1148. parent=smalltalk.send(aListItem,"_parent",[]);
  1149. smalltalk.send(smalltalk.send(parent,"_children",[]),"_removeClass_",["active"]);
  1150. smalltalk.send(aListItem,"_addClass_",["active"]);
  1151. $2=smalltalk.send(smalltalk.send(smalltalk.send(aListItem,"_position",[]),"_top",[]),"__lt",[(0)]);
  1152. if(smalltalk.assert($2)){
  1153. smalltalk.send(smalltalk.send(parent,"_get_",[(0)]),"_scrollTop_",[smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(parent,"_get_",[(0)]),"_scrollTop",[]),"__plus",[smalltalk.send(smalltalk.send(aListItem,"_position",[]),"_top",[])]),"__minus",[(10)])]);
  1154. };
  1155. $3=smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aListItem,"_position",[]),"_top",[]),"__plus",[smalltalk.send(aListItem,"_height",[])]),"__gt",[smalltalk.send(parent,"_height",[])]);
  1156. if(smalltalk.assert($3)){
  1157. smalltalk.send(smalltalk.send(parent,"_get_",[(0)]),"_scrollTop_",[smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(parent,"_get_",[(0)]),"_scrollTop",[]),"__plus",[smalltalk.send(aListItem,"_height",[])]),"__minus",[smalltalk.send(smalltalk.send(parent,"_height",[]),"__minus",[smalltalk.send(smalltalk.send(aListItem,"_position",[]),"_top",[])])]),"__plus",[(10)])]);
  1158. };
  1159. smalltalk.send(self,"_selectItem_",[smalltalk.send(smalltalk.send(self,"_items",[]),"_at_",[smalltalk.send(smalltalk.send(aListItem,"_attr_",["list-data"]),"_asNumber",[])])]);
  1160. return self},
  1161. args: ["aListItem"],
  1162. source: "activateListItem: aListItem\x0a\x09| parent position |\x0a \x0a\x09(aListItem get: 0) ifNil: [ ^self ].\x0a\x0a\x09<position = aListItem.parent().children().get().indexOf(aListItem.get(0)) + 1>.\x0a\x0a parent := aListItem parent.\x0a\x09parent children removeClass: 'active'.\x0a\x09aListItem addClass: 'active'.\x0a \x0a \x22Move the scrollbar to show the active element\x22\x0a aListItem position top < 0 ifTrue: [\x0a\x09\x09(parent get: 0) scrollTop: ((parent get: 0) scrollTop + aListItem position top - 10) ].\x0a aListItem position top + aListItem height > parent height ifTrue: [ \x0a\x09\x09(parent get: 0) scrollTop: ((parent get: 0) scrollTop + aListItem height - (parent height - aListItem position top)) +10 ].\x0a \x0a \x22Activate the corresponding item\x22\x0a self selectItem: (self items at: (aListItem attr: 'list-data') asNumber)",
  1163. messageSends: ["ifNil:", "get:", "parent", "removeClass:", "children", "addClass:", "ifTrue:", "scrollTop:", "-", "+", "top", "position", "scrollTop", "<", "height", ">", "selectItem:", "at:", "asNumber", "attr:", "items"],
  1164. referencedClasses: []
  1165. }),
  1166. smalltalk.HLListWidget);
  1167. smalltalk.addMethod(
  1168. "_cssClassForItem_",
  1169. smalltalk.method({
  1170. selector: "cssClassForItem:",
  1171. category: 'accessing',
  1172. fn: function (anObject){
  1173. var self=this;
  1174. var $2,$1;
  1175. $2=smalltalk.send(smalltalk.send(self,"_selectedItem",[]),"__eq",[anObject]);
  1176. if(smalltalk.assert($2)){
  1177. $1="active";
  1178. } else {
  1179. $1="inactive";
  1180. };
  1181. return $1;
  1182. },
  1183. args: ["anObject"],
  1184. source: "cssClassForItem: anObject\x0a\x09^ self selectedItem = anObject\x0a\x09\x09\x09ifTrue: [ 'active' ]\x0a\x09\x09\x09ifFalse: [ 'inactive' ]",
  1185. messageSends: ["ifTrue:ifFalse:", "=", "selectedItem"],
  1186. referencedClasses: []
  1187. }),
  1188. smalltalk.HLListWidget);
  1189. smalltalk.addMethod(
  1190. "_iconForItem_",
  1191. smalltalk.method({
  1192. selector: "iconForItem:",
  1193. category: 'accessing',
  1194. fn: function (anObject){
  1195. var self=this;
  1196. return "";
  1197. },
  1198. args: ["anObject"],
  1199. source: "iconForItem: anObject\x0a\x09^ ''",
  1200. messageSends: [],
  1201. referencedClasses: []
  1202. }),
  1203. smalltalk.HLListWidget);
  1204. smalltalk.addMethod(
  1205. "_initializeItems",
  1206. smalltalk.method({
  1207. selector: "initializeItems",
  1208. category: 'initializing',
  1209. fn: function (){
  1210. var self=this;
  1211. var $1;
  1212. self["@items"]=[];
  1213. $1=self["@items"];
  1214. return $1;
  1215. },
  1216. args: [],
  1217. source: "initializeItems\x0a\x09^ items := #()",
  1218. messageSends: [],
  1219. referencedClasses: []
  1220. }),
  1221. smalltalk.HLListWidget);
  1222. smalltalk.addMethod(
  1223. "_items",
  1224. smalltalk.method({
  1225. selector: "items",
  1226. category: 'accessing',
  1227. fn: function (){
  1228. var self=this;
  1229. var $1;
  1230. if(($receiver = self["@items"]) == nil || $receiver == undefined){
  1231. $1=smalltalk.send(self,"_initializeItems",[]);
  1232. } else {
  1233. $1=self["@items"];
  1234. };
  1235. return $1;
  1236. },
  1237. args: [],
  1238. source: "items\x0a\x09^ items ifNil: [ self initializeItems ]",
  1239. messageSends: ["ifNil:", "initializeItems"],
  1240. referencedClasses: []
  1241. }),
  1242. smalltalk.HLListWidget);
  1243. smalltalk.addMethod(
  1244. "_items_",
  1245. smalltalk.method({
  1246. selector: "items:",
  1247. category: 'accessing',
  1248. fn: function (aCollection){
  1249. var self=this;
  1250. self["@items"]=aCollection;
  1251. return self},
  1252. args: ["aCollection"],
  1253. source: "items: aCollection\x0a\x09items := aCollection",
  1254. messageSends: [],
  1255. referencedClasses: []
  1256. }),
  1257. smalltalk.HLListWidget);
  1258. smalltalk.addMethod(
  1259. "_renderButtonsOn_",
  1260. smalltalk.method({
  1261. selector: "renderButtonsOn:",
  1262. category: 'rendering',
  1263. fn: function (html){
  1264. var self=this;
  1265. return self},
  1266. args: ["html"],
  1267. source: "renderButtonsOn: html",
  1268. messageSends: [],
  1269. referencedClasses: []
  1270. }),
  1271. smalltalk.HLListWidget);
  1272. smalltalk.addMethod(
  1273. "_renderContentOn_",
  1274. smalltalk.method({
  1275. selector: "renderContentOn:",
  1276. category: 'rendering',
  1277. fn: function (html){
  1278. var self=this;
  1279. var $1,$2,$3,$4;
  1280. $1=smalltalk.send(html,"_ul",[]);
  1281. smalltalk.send($1,"_class_",["nav nav-pills nav-stacked"]);
  1282. $2=smalltalk.send($1,"_with_",[(function(){
  1283. return smalltalk.send(self,"_renderListOn_",[html]);
  1284. })]);
  1285. $3=smalltalk.send(html,"_div",[]);
  1286. smalltalk.send($3,"_class_",["pane_actions form-actions"]);
  1287. $4=smalltalk.send($3,"_with_",[(function(){
  1288. return smalltalk.send(self,"_renderButtonsOn_",[html]);
  1289. })]);
  1290. smalltalk.send(self,"_setupKeyBindings",[]);
  1291. return self},
  1292. args: ["html"],
  1293. source: "renderContentOn: html\x0a\x09html ul \x0a \x09class: 'nav nav-pills nav-stacked';\x0a with: [ self renderListOn: html ].\x0a html div class: 'pane_actions form-actions'; with: [\x0a \x09self renderButtonsOn: html ].\x0a \x0a self setupKeyBindings",
  1294. messageSends: ["class:", "ul", "with:", "renderListOn:", "div", "renderButtonsOn:", "setupKeyBindings"],
  1295. referencedClasses: []
  1296. }),
  1297. smalltalk.HLListWidget);
  1298. smalltalk.addMethod(
  1299. "_renderItem_on_",
  1300. smalltalk.method({
  1301. selector: "renderItem:on:",
  1302. category: 'rendering',
  1303. fn: function (anObject,html){
  1304. var self=this;
  1305. var $2,$3,$1;
  1306. var li;
  1307. li=smalltalk.send(html,"_li",[]);
  1308. smalltalk.send(li,"_class_",[smalltalk.send(self,"_cssClassForItem_",[anObject])]);
  1309. smalltalk.send(li,"_at_put_",["list-data",smalltalk.send(smalltalk.send(smalltalk.send(self,"_items",[]),"_indexOf_",[anObject]),"_asString",[])]);
  1310. $1=smalltalk.send(li,"_with_",[(function(){
  1311. $2=smalltalk.send(html,"_a",[]);
  1312. smalltalk.send($2,"_with_",[(function(){
  1313. smalltalk.send(smalltalk.send(html,"_tag_",["i"]),"_class_",[smalltalk.send(self,"_iconForItem_",[anObject])]);
  1314. return smalltalk.send(self,"_renderItemLabel_on_",[anObject,html]);
  1315. })]);
  1316. $3=smalltalk.send($2,"_onClick_",[(function(){
  1317. return smalltalk.send(self,"_activateListItem_",[smalltalk.send(li,"_asJQuery",[])]);
  1318. })]);
  1319. return $3;
  1320. })]);
  1321. return self},
  1322. args: ["anObject", "html"],
  1323. source: "renderItem: anObject on: html\x0a\x09| li |\x0a \x0a\x09li := html li.\x0a li\x0a \x09class: (self cssClassForItem: anObject);\x0a at: 'list-data' put: (self items indexOf: anObject) asString;\x0a with: [ \x0a \x09html a\x0a \x09with: [ \x0a \x09\x09(html tag: 'i') class: (self iconForItem: anObject).\x0a \x09\x09\x09\x09\x09self renderItemLabel: anObject on: html ];\x0a\x09\x09\x09\x09onClick: [\x0a \x09self activateListItem: li asJQuery ] ]",
  1324. messageSends: ["li", "class:", "cssClassForItem:", "at:put:", "asString", "indexOf:", "items", "with:", "iconForItem:", "tag:", "renderItemLabel:on:", "a", "onClick:", "activateListItem:", "asJQuery"],
  1325. referencedClasses: []
  1326. }),
  1327. smalltalk.HLListWidget);
  1328. smalltalk.addMethod(
  1329. "_renderItemLabel_on_",
  1330. smalltalk.method({
  1331. selector: "renderItemLabel:on:",
  1332. category: 'rendering',
  1333. fn: function (anObject,html){
  1334. var self=this;
  1335. smalltalk.send(html,"_with_",[smalltalk.send(anObject,"_asString",[])]);
  1336. return self},
  1337. args: ["anObject", "html"],
  1338. source: "renderItemLabel: anObject on: html\x0a\x09html with: anObject asString",
  1339. messageSends: ["with:", "asString"],
  1340. referencedClasses: []
  1341. }),
  1342. smalltalk.HLListWidget);
  1343. smalltalk.addMethod(
  1344. "_renderListOn_",
  1345. smalltalk.method({
  1346. selector: "renderListOn:",
  1347. category: 'rendering',
  1348. fn: function (html){
  1349. var self=this;
  1350. smalltalk.send(smalltalk.send(self,"_items",[]),"_do_",[(function(each){
  1351. return smalltalk.send(self,"_renderItem_on_",[each,html]);
  1352. })]);
  1353. return self},
  1354. args: ["html"],
  1355. source: "renderListOn: html\x0a\x09self items do: [ :each | \x0a \x09self renderItem: each on: html ]",
  1356. messageSends: ["do:", "renderItem:on:", "items"],
  1357. referencedClasses: []
  1358. }),
  1359. smalltalk.HLListWidget);
  1360. smalltalk.addMethod(
  1361. "_selectItem_",
  1362. smalltalk.method({
  1363. selector: "selectItem:",
  1364. category: 'actions',
  1365. fn: function (anObject){
  1366. var self=this;
  1367. smalltalk.send(self,"_selectedItem_",[anObject]);
  1368. return self},
  1369. args: ["anObject"],
  1370. source: "selectItem: anObject\x0a\x09self selectedItem: anObject",
  1371. messageSends: ["selectedItem:"],
  1372. referencedClasses: []
  1373. }),
  1374. smalltalk.HLListWidget);
  1375. smalltalk.addMethod(
  1376. "_selectedItem",
  1377. smalltalk.method({
  1378. selector: "selectedItem",
  1379. category: 'accessing',
  1380. fn: function (){
  1381. var self=this;
  1382. return self["@selectedItem"];
  1383. },
  1384. args: [],
  1385. source: "selectedItem\x0a\x09^ selectedItem",
  1386. messageSends: [],
  1387. referencedClasses: []
  1388. }),
  1389. smalltalk.HLListWidget);
  1390. smalltalk.addMethod(
  1391. "_selectedItem_",
  1392. smalltalk.method({
  1393. selector: "selectedItem:",
  1394. category: 'accessing',
  1395. fn: function (anObject){
  1396. var self=this;
  1397. self["@selectedItem"]=anObject;
  1398. return self},
  1399. args: ["anObject"],
  1400. source: "selectedItem: anObject\x0a\x09selectedItem := anObject",
  1401. messageSends: [],
  1402. referencedClasses: []
  1403. }),
  1404. smalltalk.HLListWidget);
  1405. smalltalk.addMethod(
  1406. "_setupKeyBindings",
  1407. smalltalk.method({
  1408. selector: "setupKeyBindings",
  1409. category: 'events',
  1410. fn: function (){
  1411. var self=this;
  1412. var $1,$2,$3;
  1413. var next;
  1414. smalltalk.send(smalltalk.send(self["@hiddenInput"],"_asJQuery",[]),"_unbind_",["keydown"]);
  1415. smalltalk.send(smalltalk.send(self["@hiddenInput"],"_asJQuery",[]),"_keydown_",[(function(e){
  1416. var selected;
  1417. selected=smalltalk.send(window,"_jQuery_",[".focused .nav-pills .active"]);
  1418. selected;
  1419. $1=smalltalk.send(smalltalk.send(e,"_which",[]),"__eq",[(38)]);
  1420. if(smalltalk.assert($1)){
  1421. smalltalk.send(self,"_activateListItem_",[smalltalk.send(selected,"_prev",[])]);
  1422. };
  1423. $2=smalltalk.send(smalltalk.send(e,"_which",[]),"__eq",[(40)]);
  1424. if(smalltalk.assert($2)){
  1425. next=smalltalk.send(selected,"_next",[]);
  1426. next;
  1427. $3=smalltalk.send(next,"_get_",[(0)]);
  1428. if(($receiver = $3) == nil || $receiver == undefined){
  1429. next=smalltalk.send(window,"_jQuery_",[".focused .nav-pills li:first-child"]);
  1430. next;
  1431. } else {
  1432. $3;
  1433. };
  1434. return smalltalk.send(self,"_activateListItem_",[next]);
  1435. };
  1436. })]);
  1437. return self},
  1438. args: [],
  1439. source: "setupKeyBindings\x0a\x09| next |\x0a\x09hiddenInput asJQuery unbind: 'keydown'.\x0a\x0a\x09hiddenInput asJQuery keydown: [ :e | | selected |\x0a \x09selected := window jQuery: '.focused .nav-pills .active'.\x0a e which = 38 ifTrue: [ \x0a \x09self activateListItem: selected prev ].\x0a \x09e which = 40 ifTrue: [\x0a \x09next := selected next.\x0a (next get: 0) ifNil: [ next := window jQuery: '.focused .nav-pills li:first-child' ].\x0a\x09\x09\x09self activateListItem: next ] ]",
  1440. messageSends: ["unbind:", "asJQuery", "keydown:", "jQuery:", "ifTrue:", "activateListItem:", "prev", "=", "which", "next", "ifNil:", "get:"],
  1441. referencedClasses: []
  1442. }),
  1443. smalltalk.HLListWidget);
  1444. smalltalk.addClass('HLNavigationListWidget', smalltalk.HLListWidget, ['previous', 'next'], 'Helios-Core');
  1445. smalltalk.addMethod(
  1446. "_next",
  1447. smalltalk.method({
  1448. selector: "next",
  1449. category: 'accessing',
  1450. fn: function (){
  1451. var self=this;
  1452. return self["@next"];
  1453. },
  1454. args: [],
  1455. source: "next\x0a\x09^ next",
  1456. messageSends: [],
  1457. referencedClasses: []
  1458. }),
  1459. smalltalk.HLNavigationListWidget);
  1460. smalltalk.addMethod(
  1461. "_next_",
  1462. smalltalk.method({
  1463. selector: "next:",
  1464. category: 'accessing',
  1465. fn: function (aWidget){
  1466. var self=this;
  1467. var $1;
  1468. self["@next"]=aWidget;
  1469. $1=smalltalk.send(smalltalk.send(aWidget,"_previous",[]),"__eq",[self]);
  1470. if(! smalltalk.assert($1)){
  1471. smalltalk.send(aWidget,"_previous_",[self]);
  1472. };
  1473. return self},
  1474. args: ["aWidget"],
  1475. source: "next: aWidget\x0a\x09next := aWidget.\x0a aWidget previous = self ifFalse: [ aWidget previous: self ]",
  1476. messageSends: ["ifFalse:", "previous:", "=", "previous"],
  1477. referencedClasses: []
  1478. }),
  1479. smalltalk.HLNavigationListWidget);
  1480. smalltalk.addMethod(
  1481. "_nextFocus",
  1482. smalltalk.method({
  1483. selector: "nextFocus",
  1484. category: 'actions',
  1485. fn: function (){
  1486. var self=this;
  1487. var $1;
  1488. $1=smalltalk.send(self,"_next",[]);
  1489. if(($receiver = $1) == nil || $receiver == undefined){
  1490. $1;
  1491. } else {
  1492. smalltalk.send(smalltalk.send(self,"_next",[]),"_focus",[]);
  1493. };
  1494. return self},
  1495. args: [],
  1496. source: "nextFocus\x0a\x09self next ifNotNil: [ self next focus ]",
  1497. messageSends: ["ifNotNil:", "focus", "next"],
  1498. referencedClasses: []
  1499. }),
  1500. smalltalk.HLNavigationListWidget);
  1501. smalltalk.addMethod(
  1502. "_previous",
  1503. smalltalk.method({
  1504. selector: "previous",
  1505. category: 'accessing',
  1506. fn: function (){
  1507. var self=this;
  1508. return self["@previous"];
  1509. },
  1510. args: [],
  1511. source: "previous\x0a\x09^ previous",
  1512. messageSends: [],
  1513. referencedClasses: []
  1514. }),
  1515. smalltalk.HLNavigationListWidget);
  1516. smalltalk.addMethod(
  1517. "_previous_",
  1518. smalltalk.method({
  1519. selector: "previous:",
  1520. category: 'accessing',
  1521. fn: function (aWidget){
  1522. var self=this;
  1523. var $1;
  1524. self["@previous"]=aWidget;
  1525. $1=smalltalk.send(smalltalk.send(aWidget,"_next",[]),"__eq",[self]);
  1526. if(! smalltalk.assert($1)){
  1527. smalltalk.send(aWidget,"_next_",[self]);
  1528. };
  1529. return self},
  1530. args: ["aWidget"],
  1531. source: "previous: aWidget\x0a\x09previous := aWidget.\x0a aWidget next = self ifFalse: [ aWidget next: self ]",
  1532. messageSends: ["ifFalse:", "next:", "=", "next"],
  1533. referencedClasses: []
  1534. }),
  1535. smalltalk.HLNavigationListWidget);
  1536. smalltalk.addMethod(
  1537. "_previousFocus",
  1538. smalltalk.method({
  1539. selector: "previousFocus",
  1540. category: 'actions',
  1541. fn: function (){
  1542. var self=this;
  1543. var $1;
  1544. $1=smalltalk.send(self,"_previous",[]);
  1545. if(($receiver = $1) == nil || $receiver == undefined){
  1546. $1;
  1547. } else {
  1548. smalltalk.send(smalltalk.send(self,"_previous",[]),"_focus",[]);
  1549. };
  1550. return self},
  1551. args: [],
  1552. source: "previousFocus\x0a\x09self previous ifNotNil: [ self previous focus ]",
  1553. messageSends: ["ifNotNil:", "focus", "previous"],
  1554. referencedClasses: []
  1555. }),
  1556. smalltalk.HLNavigationListWidget);
  1557. smalltalk.addMethod(
  1558. "_setupKeyBindings",
  1559. smalltalk.method({
  1560. selector: "setupKeyBindings",
  1561. category: 'events',
  1562. fn: function (){
  1563. var self=this;
  1564. var $1,$2;
  1565. smalltalk.send(self,"_setupKeyBindings",[],smalltalk.HLListWidget);
  1566. smalltalk.send(smalltalk.send(self["@hiddenInput"],"_asJQuery",[]),"_keydown_",[(function(e){
  1567. $1=smalltalk.send(smalltalk.send(e,"_which",[]),"__eq",[(39)]);
  1568. if(smalltalk.assert($1)){
  1569. smalltalk.send(self,"_nextFocus",[]);
  1570. };
  1571. $2=smalltalk.send(smalltalk.send(e,"_which",[]),"__eq",[(37)]);
  1572. if(smalltalk.assert($2)){
  1573. return smalltalk.send(self,"_previousFocus",[]);
  1574. };
  1575. })]);
  1576. return self},
  1577. args: [],
  1578. source: "setupKeyBindings\x0a\x09super setupKeyBindings.\x0a\x0a\x09hiddenInput asJQuery keydown: [ :e |\x0a e which = 39 ifTrue: [ \x0a \x09self nextFocus ].\x0a\x09\x09e which = 37 ifTrue: [ \x0a \x09self previousFocus ] ]",
  1579. messageSends: ["setupKeyBindings", "keydown:", "ifTrue:", "nextFocus", "=", "which", "previousFocus", "asJQuery"],
  1580. referencedClasses: []
  1581. }),
  1582. smalltalk.HLNavigationListWidget);
  1583. smalltalk.addClass('HLManager', smalltalk.HLWidget, ['tabs', 'activeTab', 'keyBinder'], 'Helios-Core');
  1584. smalltalk.addMethod(
  1585. "_activate_",
  1586. smalltalk.method({
  1587. selector: "activate:",
  1588. category: 'actions',
  1589. fn: function (aTab){
  1590. var self=this;
  1591. var $1;
  1592. smalltalk.send(smalltalk.send(self,"_keyBinder",[]),"_flushBindings",[]);
  1593. self["@activeTab"]=aTab;
  1594. smalltalk.send(self,"_refresh",[]);
  1595. $1=smalltalk.send(self,"_show_",[aTab]);
  1596. return self},
  1597. args: ["aTab"],
  1598. source: "activate: aTab\x0a\x09self keyBinder flushBindings.\x0a\x09activeTab := aTab.\x0a \x0a\x09self \x0a\x09\x09refresh;\x0a\x09\x09show: aTab",
  1599. messageSends: ["flushBindings", "keyBinder", "refresh", "show:"],
  1600. referencedClasses: []
  1601. }),
  1602. smalltalk.HLManager);
  1603. smalltalk.addMethod(
  1604. "_activeTab",
  1605. smalltalk.method({
  1606. selector: "activeTab",
  1607. category: 'accessing',
  1608. fn: function (){
  1609. var self=this;
  1610. return self["@activeTab"];
  1611. },
  1612. args: [],
  1613. source: "activeTab\x0a\x09^ activeTab",
  1614. messageSends: [],
  1615. referencedClasses: []
  1616. }),
  1617. smalltalk.HLManager);
  1618. smalltalk.addMethod(
  1619. "_addTab_",
  1620. smalltalk.method({
  1621. selector: "addTab:",
  1622. category: 'actions',
  1623. fn: function (aTab){
  1624. var self=this;
  1625. smalltalk.send(smalltalk.send(self,"_tabs",[]),"_add_",[aTab]);
  1626. smalltalk.send(self,"_activate_",[aTab]);
  1627. return self},
  1628. args: ["aTab"],
  1629. source: "addTab: aTab\x0a\x09self tabs add: aTab.\x0a self activate: aTab",
  1630. messageSends: ["add:", "tabs", "activate:"],
  1631. referencedClasses: []
  1632. }),
  1633. smalltalk.HLManager);
  1634. smalltalk.addMethod(
  1635. "_initialize",
  1636. smalltalk.method({
  1637. selector: "initialize",
  1638. category: 'initialization',
  1639. fn: function (){
  1640. var self=this;
  1641. smalltalk.send(self,"_initialize",[],smalltalk.HLWidget);
  1642. smalltalk.send(smalltalk.send(self,"_keyBinder",[]),"_setupEvents",[]);
  1643. return self},
  1644. args: [],
  1645. source: "initialize\x0a\x09super initialize.\x0a self keyBinder setupEvents",
  1646. messageSends: ["initialize", "setupEvents", "keyBinder"],
  1647. referencedClasses: []
  1648. }),
  1649. smalltalk.HLManager);
  1650. smalltalk.addMethod(
  1651. "_keyBinder",
  1652. smalltalk.method({
  1653. selector: "keyBinder",
  1654. category: 'accessing',
  1655. fn: function (){
  1656. var self=this;
  1657. var $1;
  1658. if(($receiver = self["@keyBinder"]) == nil || $receiver == undefined){
  1659. self["@keyBinder"]=smalltalk.send((smalltalk.HLKeyBinder || HLKeyBinder),"_new",[]);
  1660. $1=self["@keyBinder"];
  1661. } else {
  1662. $1=self["@keyBinder"];
  1663. };
  1664. return $1;
  1665. },
  1666. args: [],
  1667. source: "keyBinder\x0a\x09^ keyBinder ifNil: [ keyBinder := HLKeyBinder new ]",
  1668. messageSends: ["ifNil:", "new"],
  1669. referencedClasses: ["HLKeyBinder"]
  1670. }),
  1671. smalltalk.HLManager);
  1672. smalltalk.addMethod(
  1673. "_refresh",
  1674. smalltalk.method({
  1675. selector: "refresh",
  1676. category: 'rendering',
  1677. fn: function (){
  1678. var self=this;
  1679. smalltalk.send(smalltalk.send(window,"_jQuery_",[".navbar"]),"_remove",[]);
  1680. smalltalk.send(smalltalk.send(window,"_jQuery_",["#container"]),"_remove",[]);
  1681. smalltalk.send(self,"_appendToJQuery_",[smalltalk.send("body","_asJQuery",[])]);
  1682. return self},
  1683. args: [],
  1684. source: "refresh\x0a\x09(window jQuery: '.navbar') remove.\x0a\x09(window jQuery: '#container') remove.\x0a\x09self appendToJQuery: 'body' asJQuery",
  1685. messageSends: ["remove", "jQuery:", "appendToJQuery:", "asJQuery"],
  1686. referencedClasses: []
  1687. }),
  1688. smalltalk.HLManager);
  1689. smalltalk.addMethod(
  1690. "_removeTab_",
  1691. smalltalk.method({
  1692. selector: "removeTab:",
  1693. category: 'actions',
  1694. fn: function (aTab){
  1695. var self=this;
  1696. var $1;
  1697. $1=smalltalk.send(smalltalk.send(self,"_tabs",[]),"_includes_",[aTab]);
  1698. if(! smalltalk.assert($1)){
  1699. return self;
  1700. };
  1701. smalltalk.send(smalltalk.send(self,"_tabs",[]),"_remove_",[aTab]);
  1702. smalltalk.send(self,"_refresh",[]);
  1703. return self},
  1704. args: ["aTab"],
  1705. source: "removeTab: aTab\x0a\x09\x22Todo: activate the previously activated tab. Keep a history of tabs selection\x22\x0a\x0a\x09(self tabs includes: aTab) ifFalse: [ ^ self ].\x0a\x0a\x09self tabs remove: aTab.\x0a\x09self refresh",
  1706. messageSends: ["ifFalse:", "includes:", "tabs", "remove:", "refresh"],
  1707. referencedClasses: []
  1708. }),
  1709. smalltalk.HLManager);
  1710. smalltalk.addMethod(
  1711. "_renderAddOn_",
  1712. smalltalk.method({
  1713. selector: "renderAddOn:",
  1714. category: 'rendering',
  1715. fn: function (html){
  1716. var self=this;
  1717. var $1,$3,$4,$5,$7,$8,$6,$2;
  1718. $1=smalltalk.send(html,"_li",[]);
  1719. smalltalk.send($1,"_class_",["dropdown"]);
  1720. $2=smalltalk.send($1,"_with_",[(function(){
  1721. $3=smalltalk.send(html,"_a",[]);
  1722. smalltalk.send($3,"_class_",["dropdown-toggle"]);
  1723. smalltalk.send($3,"_at_put_",["data-toggle","dropdown"]);
  1724. $4=smalltalk.send($3,"_with_",[(function(){
  1725. smalltalk.send(html,"_with_",["Open..."]);
  1726. return smalltalk.send(smalltalk.send(html,"_tag_",["b"]),"_class_",["caret"]);
  1727. })]);
  1728. $4;
  1729. $5=smalltalk.send(html,"_ul",[]);
  1730. smalltalk.send($5,"_class_",["dropdown-menu"]);
  1731. $6=smalltalk.send($5,"_with_",[(function(){
  1732. return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.HLWidget || HLWidget),"_withAllSubclasses",[]),"_select_",[(function(each){
  1733. return smalltalk.send(each,"_canBeOpenAsTab",[]);
  1734. })]),"_sorted_",[(function(a,b){
  1735. return smalltalk.send(smalltalk.send(a,"_tabPriority",[]),"__lt",[smalltalk.send(b,"_tabPriority",[])]);
  1736. })]),"_do_",[(function(each){
  1737. return smalltalk.send(smalltalk.send(html,"_li",[]),"_with_",[(function(){
  1738. $7=smalltalk.send(html,"_a",[]);
  1739. smalltalk.send($7,"_with_",[smalltalk.send(each,"_tabLabel",[])]);
  1740. $8=smalltalk.send($7,"_onClick_",[(function(){
  1741. return smalltalk.send(each,"_openAsTab",[]);
  1742. })]);
  1743. return $8;
  1744. })]);
  1745. })]);
  1746. })]);
  1747. return $6;
  1748. })]);
  1749. return self},
  1750. args: ["html"],
  1751. source: "renderAddOn: html\x0a html li \x0a \x09class: 'dropdown';\x0a with: [ \x0a\x09\x09\x09html a \x0a \x09\x09class: 'dropdown-toggle';\x0a \x09 \x09at: 'data-toggle' put: 'dropdown';\x0a \x09with: [ \x0a \x09\x09html with: 'Open...'.\x0a \x09\x09\x09\x09\x09(html tag: 'b') class: 'caret' ].\x0a html ul \x0a \x09\x09class: 'dropdown-menu';\x0a with: [\x0a \x09((HLWidget withAllSubclasses\x0a \x09select: [ :each | each canBeOpenAsTab ])\x0a sorted: [ :a :b | a tabPriority < b tabPriority ])\x0a do: [ :each |\x0a \x09\x09\x09\x09\x09\x09\x09html li with: [\x0a \x09\x09\x09html a \x0a \x09with: each tabLabel;\x0a \x09\x09\x09\x09\x09\x09\x09\x09onClick: [ each openAsTab ] ] ] ] ]",
  1752. messageSends: ["class:", "li", "with:", "a", "at:put:", "tag:", "ul", "do:", "tabLabel", "onClick:", "openAsTab", "sorted:", "<", "tabPriority", "select:", "canBeOpenAsTab", "withAllSubclasses"],
  1753. referencedClasses: ["HLWidget"]
  1754. }),
  1755. smalltalk.HLManager);
  1756. smalltalk.addMethod(
  1757. "_renderContentOn_",
  1758. smalltalk.method({
  1759. selector: "renderContentOn:",
  1760. category: 'rendering',
  1761. fn: function (html){
  1762. var self=this;
  1763. var $1,$3,$4,$2;
  1764. $1=smalltalk.send(html,"_div",[]);
  1765. smalltalk.send($1,"_class_",["navbar navbar-fixed-top"]);
  1766. $2=smalltalk.send($1,"_with_",[(function(){
  1767. $3=smalltalk.send(html,"_div",[]);
  1768. smalltalk.send($3,"_class_",["navbar-inner"]);
  1769. $4=smalltalk.send($3,"_with_",[(function(){
  1770. return smalltalk.send(self,"_renderTabsOn_",[html]);
  1771. })]);
  1772. return $4;
  1773. })]);
  1774. smalltalk.send(smalltalk.send(html,"_div",[]),"_id_",["container"]);
  1775. return self},
  1776. args: ["html"],
  1777. source: "renderContentOn: html\x0a\x09html div \x0a\x09\x09class: 'navbar navbar-fixed-top';\x0a\x09\x09with: [ html div \x0a\x09\x09\x09class: 'navbar-inner';\x0a\x09\x09\x09with: [ self renderTabsOn: html ] ].\x0a\x09html div id: 'container'",
  1778. messageSends: ["class:", "div", "with:", "renderTabsOn:", "id:"],
  1779. referencedClasses: []
  1780. }),
  1781. smalltalk.HLManager);
  1782. smalltalk.addMethod(
  1783. "_renderTabsOn_",
  1784. smalltalk.method({
  1785. selector: "renderTabsOn:",
  1786. category: 'rendering',
  1787. fn: function (html){
  1788. var self=this;
  1789. var $1,$3,$5,$4,$7,$8,$6,$2;
  1790. $1=smalltalk.send(html,"_ul",[]);
  1791. smalltalk.send($1,"_class_",["nav"]);
  1792. $2=smalltalk.send($1,"_with_",[(function(){
  1793. smalltalk.send(smalltalk.send(self,"_tabs",[]),"_do_",[(function(each){
  1794. $3=smalltalk.send(html,"_li",[]);
  1795. $5=smalltalk.send(each,"_isActive",[]);
  1796. if(smalltalk.assert($5)){
  1797. $4="active";
  1798. } else {
  1799. $4="inactive";
  1800. };
  1801. smalltalk.send($3,"_class_",[$4]);
  1802. $6=smalltalk.send($3,"_with_",[(function(){
  1803. $7=smalltalk.send(html,"_a",[]);
  1804. smalltalk.send($7,"_with_",[(function(){
  1805. smalltalk.send(smalltalk.send(smalltalk.send(html,"_tag_",["i"]),"_class_",["icon-remove-circle"]),"_onClick_",[(function(){
  1806. return smalltalk.send(self,"_removeTab_",[each]);
  1807. })]);
  1808. return smalltalk.send(html,"_with_",[smalltalk.send(each,"_label",[])]);
  1809. })]);
  1810. $8=smalltalk.send($7,"_onClick_",[(function(){
  1811. return smalltalk.send(each,"_activate",[]);
  1812. })]);
  1813. return $8;
  1814. })]);
  1815. return $6;
  1816. })]);
  1817. return smalltalk.send(self,"_renderAddOn_",[html]);
  1818. })]);
  1819. return self},
  1820. args: ["html"],
  1821. source: "renderTabsOn: html\x0a\x09html ul \x0a\x09\x09class: 'nav';\x0a\x09\x09with: [ \x0a \x09self tabs do: [ :each |\x0a\x09\x09\x09\x09html li \x0a\x09\x09\x09\x09\x09class: (each isActive ifTrue: [ 'active' ] ifFalse: [ 'inactive' ]);\x0a\x09\x09\x09\x09\x09with: [\x0a\x09\x09\x09\x09\x09\x09html a\x0a\x09\x09\x09\x09\x09\x09\x09with: [\x0a \x09\x09\x09\x09\x09\x09\x09((html tag: 'i') class: 'icon-remove-circle')\x0a \x09\x09\x09\x09\x09\x09\x09\x09\x09onClick: [ self removeTab: each ].\x0a \x09html with: each label ];\x0a\x09\x09\x09\x09\x09\x09\x09onClick: [ each activate ] ] ].\x0a\x09\x09\x09self renderAddOn: html ]",
  1822. messageSends: ["class:", "ul", "with:", "do:", "ifTrue:ifFalse:", "isActive", "li", "onClick:", "removeTab:", "tag:", "label", "a", "activate", "tabs", "renderAddOn:"],
  1823. referencedClasses: []
  1824. }),
  1825. smalltalk.HLManager);
  1826. smalltalk.addMethod(
  1827. "_show_",
  1828. smalltalk.method({
  1829. selector: "show:",
  1830. category: 'rendering',
  1831. fn: function (aTab){
  1832. var self=this;
  1833. smalltalk.send(smalltalk.send(window,"_jQuery_",["#container"]),"_empty",[]);
  1834. smalltalk.send(smalltalk.send(aTab,"_widget",[]),"_appendToJQuery_",[smalltalk.send("#container","_asJQuery",[])]);
  1835. return self},
  1836. args: ["aTab"],
  1837. source: "show: aTab\x0a\x09(window jQuery: '#container') empty.\x0a\x09aTab widget appendToJQuery: '#container' asJQuery",
  1838. messageSends: ["empty", "jQuery:", "appendToJQuery:", "asJQuery", "widget"],
  1839. referencedClasses: []
  1840. }),
  1841. smalltalk.HLManager);
  1842. smalltalk.addMethod(
  1843. "_tabs",
  1844. smalltalk.method({
  1845. selector: "tabs",
  1846. category: 'accessing',
  1847. fn: function (){
  1848. var self=this;
  1849. var $1;
  1850. if(($receiver = self["@tabs"]) == nil || $receiver == undefined){
  1851. self["@tabs"]=smalltalk.send((smalltalk.OrderedCollection || OrderedCollection),"_new",[]);
  1852. $1=self["@tabs"];
  1853. } else {
  1854. $1=self["@tabs"];
  1855. };
  1856. return $1;
  1857. },
  1858. args: [],
  1859. source: "tabs\x0a\x09^ tabs ifNil: [ tabs := OrderedCollection new ]",
  1860. messageSends: ["ifNil:", "new"],
  1861. referencedClasses: ["OrderedCollection"]
  1862. }),
  1863. smalltalk.HLManager);
  1864. smalltalk.HLManager.klass.iVarNames = ['current'];
  1865. smalltalk.addMethod(
  1866. "_current",
  1867. smalltalk.method({
  1868. selector: "current",
  1869. category: 'accessing',
  1870. fn: function (){
  1871. var self=this;
  1872. var $1;
  1873. if(($receiver = self["@current"]) == nil || $receiver == undefined){
  1874. self["@current"]=smalltalk.send(smalltalk.send(self,"_basicNew",[]),"_initialize",[]);
  1875. $1=self["@current"];
  1876. } else {
  1877. $1=self["@current"];
  1878. };
  1879. return $1;
  1880. },
  1881. args: [],
  1882. source: "current\x0a\x09^ current ifNil: [ current := self basicNew initialize ]",
  1883. messageSends: ["ifNil:", "initialize", "basicNew"],
  1884. referencedClasses: []
  1885. }),
  1886. smalltalk.HLManager.klass);
  1887. smalltalk.addMethod(
  1888. "_initialize",
  1889. smalltalk.method({
  1890. selector: "initialize",
  1891. category: 'initialization',
  1892. fn: function (){
  1893. var self=this;
  1894. smalltalk.send(smalltalk.send(self,"_current",[]),"_appendToJQuery_",[smalltalk.send("body","_asJQuery",[])]);
  1895. return self},
  1896. args: [],
  1897. source: "initialize\x0a\x09self current appendToJQuery: 'body' asJQuery",
  1898. messageSends: ["appendToJQuery:", "asJQuery", "current"],
  1899. referencedClasses: []
  1900. }),
  1901. smalltalk.HLManager.klass);
  1902. smalltalk.addMethod(
  1903. "_new",
  1904. smalltalk.method({
  1905. selector: "new",
  1906. category: 'instance creation',
  1907. fn: function (){
  1908. var self=this;
  1909. smalltalk.send(self,"_shouldNotImplement",[]);
  1910. return self},
  1911. args: [],
  1912. source: "new\x0a\x09\x22Use current instead\x22\x0a\x0a\x09self shouldNotImplement",
  1913. messageSends: ["shouldNotImplement"],
  1914. referencedClasses: []
  1915. }),
  1916. smalltalk.HLManager.klass);
  1917. smalltalk.addClass('HLSUnit', smalltalk.HLWidget, [], 'Helios-Core');
  1918. smalltalk.addMethod(
  1919. "_canBeOpenAsTab",
  1920. smalltalk.method({
  1921. selector: "canBeOpenAsTab",
  1922. category: 'testing',
  1923. fn: function (){
  1924. var self=this;
  1925. return true;
  1926. },
  1927. args: [],
  1928. source: "canBeOpenAsTab\x0a\x09^ true",
  1929. messageSends: [],
  1930. referencedClasses: []
  1931. }),
  1932. smalltalk.HLSUnit.klass);
  1933. smalltalk.addMethod(
  1934. "_tabLabel",
  1935. smalltalk.method({
  1936. selector: "tabLabel",
  1937. category: 'accessing',
  1938. fn: function (){
  1939. var self=this;
  1940. return "SUnit";
  1941. },
  1942. args: [],
  1943. source: "tabLabel\x0a\x09^ 'SUnit'",
  1944. messageSends: [],
  1945. referencedClasses: []
  1946. }),
  1947. smalltalk.HLSUnit.klass);
  1948. smalltalk.addMethod(
  1949. "_tabPriority",
  1950. smalltalk.method({
  1951. selector: "tabPriority",
  1952. category: 'accessing',
  1953. fn: function (){
  1954. var self=this;
  1955. return (1000);
  1956. },
  1957. args: [],
  1958. source: "tabPriority\x0a\x09^ 1000",
  1959. messageSends: [],
  1960. referencedClasses: []
  1961. }),
  1962. smalltalk.HLSUnit.klass);
  1963. smalltalk.addClass('HLTranscript', smalltalk.HLWidget, [], 'Helios-Core');
  1964. smalltalk.addMethod(
  1965. "_canBeOpenAsTab",
  1966. smalltalk.method({
  1967. selector: "canBeOpenAsTab",
  1968. category: 'testing',
  1969. fn: function (){
  1970. var self=this;
  1971. return true;
  1972. },
  1973. args: [],
  1974. source: "canBeOpenAsTab\x0a\x09^ true",
  1975. messageSends: [],
  1976. referencedClasses: []
  1977. }),
  1978. smalltalk.HLTranscript.klass);
  1979. smalltalk.addMethod(
  1980. "_tabLabel",
  1981. smalltalk.method({
  1982. selector: "tabLabel",
  1983. category: 'accessing',
  1984. fn: function (){
  1985. var self=this;
  1986. return "Transcript";
  1987. },
  1988. args: [],
  1989. source: "tabLabel\x0a\x09^ 'Transcript'",
  1990. messageSends: [],
  1991. referencedClasses: []
  1992. }),
  1993. smalltalk.HLTranscript.klass);
  1994. smalltalk.addMethod(
  1995. "_tabPriority",
  1996. smalltalk.method({
  1997. selector: "tabPriority",
  1998. category: 'accessing',
  1999. fn: function (){
  2000. var self=this;
  2001. return (600);
  2002. },
  2003. args: [],
  2004. source: "tabPriority\x0a\x09^ 600",
  2005. messageSends: [],
  2006. referencedClasses: []
  2007. }),
  2008. smalltalk.HLTranscript.klass);