Platform-Services.js 96 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737
  1. define("amber_core/Platform-Services", ["amber/boot", "amber_core/Kernel-Objects", "amber_core/Kernel-Collections", "amber_core/Kernel-Methods", "amber_core/Kernel-Infrastructure"], function($boot){"use strict";
  2. var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;
  3. $core.addPackage('Platform-Services');
  4. $core.packages["Platform-Services"].innerEval = function (expr) { return eval(expr); };
  5. $core.packages["Platform-Services"].transport = {"type":"amd","amdNamespace":"amber_core"};
  6. $core.addClass('ConsoleErrorHandler', $globals.Object, [], 'Platform-Services');
  7. //>>excludeStart("ide", pragmas.excludeIdeData);
  8. $globals.ConsoleErrorHandler.comment="I am manage Smalltalk errors, displaying the stack in the console.";
  9. //>>excludeEnd("ide");
  10. $core.addMethod(
  11. $core.method({
  12. selector: "handleError:",
  13. protocol: 'error handling',
  14. fn: function (anError){
  15. var self=this;
  16. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  17. return $core.withContext(function($ctx1) {
  18. //>>excludeEnd("ctx");
  19. var $1,$receiver;
  20. $1=$recv(anError)._context();
  21. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  22. $ctx1.sendIdx["context"]=1;
  23. //>>excludeEnd("ctx");
  24. if(($receiver = $1) == null || $receiver.isNil){
  25. $1;
  26. } else {
  27. self._logErrorContext_($recv(anError)._context());
  28. };
  29. self._logError_(anError);
  30. return self;
  31. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  32. }, function($ctx1) {$ctx1.fill(self,"handleError:",{anError:anError},$globals.ConsoleErrorHandler)});
  33. //>>excludeEnd("ctx");
  34. },
  35. //>>excludeStart("ide", pragmas.excludeIdeData);
  36. args: ["anError"],
  37. source: "handleError: anError\x0a\x09anError context ifNotNil: [ self logErrorContext: anError context ].\x0a\x09self logError: anError",
  38. referencedClasses: [],
  39. //>>excludeEnd("ide");
  40. messageSends: ["ifNotNil:", "context", "logErrorContext:", "logError:"]
  41. }),
  42. $globals.ConsoleErrorHandler);
  43. $core.addMethod(
  44. $core.method({
  45. selector: "log:",
  46. protocol: 'private',
  47. fn: function (aString){
  48. var self=this;
  49. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  50. return $core.withContext(function($ctx1) {
  51. //>>excludeEnd("ctx");
  52. $recv(console)._log_(aString);
  53. return self;
  54. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  55. }, function($ctx1) {$ctx1.fill(self,"log:",{aString:aString},$globals.ConsoleErrorHandler)});
  56. //>>excludeEnd("ctx");
  57. },
  58. //>>excludeStart("ide", pragmas.excludeIdeData);
  59. args: ["aString"],
  60. source: "log: aString\x0a\x09console log: aString",
  61. referencedClasses: [],
  62. //>>excludeEnd("ide");
  63. messageSends: ["log:"]
  64. }),
  65. $globals.ConsoleErrorHandler);
  66. $core.addMethod(
  67. $core.method({
  68. selector: "logContext:",
  69. protocol: 'private',
  70. fn: function (aContext){
  71. var self=this;
  72. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  73. return $core.withContext(function($ctx1) {
  74. //>>excludeEnd("ctx");
  75. var $1,$receiver;
  76. $1=$recv(aContext)._home();
  77. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  78. $ctx1.sendIdx["home"]=1;
  79. //>>excludeEnd("ctx");
  80. if(($receiver = $1) == null || $receiver.isNil){
  81. $1;
  82. } else {
  83. self._logContext_($recv(aContext)._home());
  84. };
  85. self._log_($recv(aContext)._asString());
  86. return self;
  87. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  88. }, function($ctx1) {$ctx1.fill(self,"logContext:",{aContext:aContext},$globals.ConsoleErrorHandler)});
  89. //>>excludeEnd("ctx");
  90. },
  91. //>>excludeStart("ide", pragmas.excludeIdeData);
  92. args: ["aContext"],
  93. source: "logContext: aContext\x0a\x09aContext home ifNotNil: [\x0a\x09\x09self logContext: aContext home ].\x0a\x09self log: aContext asString",
  94. referencedClasses: [],
  95. //>>excludeEnd("ide");
  96. messageSends: ["ifNotNil:", "home", "logContext:", "log:", "asString"]
  97. }),
  98. $globals.ConsoleErrorHandler);
  99. $core.addMethod(
  100. $core.method({
  101. selector: "logError:",
  102. protocol: 'private',
  103. fn: function (anError){
  104. var self=this;
  105. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  106. return $core.withContext(function($ctx1) {
  107. //>>excludeEnd("ctx");
  108. self._log_($recv(anError)._messageText());
  109. return self;
  110. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  111. }, function($ctx1) {$ctx1.fill(self,"logError:",{anError:anError},$globals.ConsoleErrorHandler)});
  112. //>>excludeEnd("ctx");
  113. },
  114. //>>excludeStart("ide", pragmas.excludeIdeData);
  115. args: ["anError"],
  116. source: "logError: anError\x0a\x09self log: anError messageText",
  117. referencedClasses: [],
  118. //>>excludeEnd("ide");
  119. messageSends: ["log:", "messageText"]
  120. }),
  121. $globals.ConsoleErrorHandler);
  122. $core.addMethod(
  123. $core.method({
  124. selector: "logErrorContext:",
  125. protocol: 'private',
  126. fn: function (aContext){
  127. var self=this;
  128. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  129. return $core.withContext(function($ctx1) {
  130. //>>excludeEnd("ctx");
  131. var $1,$receiver;
  132. if(($receiver = aContext) == null || $receiver.isNil){
  133. aContext;
  134. } else {
  135. $1=$recv(aContext)._home();
  136. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  137. $ctx1.sendIdx["home"]=1;
  138. //>>excludeEnd("ctx");
  139. if(($receiver = $1) == null || $receiver.isNil){
  140. $1;
  141. } else {
  142. self._logContext_($recv(aContext)._home());
  143. };
  144. };
  145. return self;
  146. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  147. }, function($ctx1) {$ctx1.fill(self,"logErrorContext:",{aContext:aContext},$globals.ConsoleErrorHandler)});
  148. //>>excludeEnd("ctx");
  149. },
  150. //>>excludeStart("ide", pragmas.excludeIdeData);
  151. args: ["aContext"],
  152. source: "logErrorContext: aContext\x0a\x09aContext ifNotNil: [\x0a\x09\x09aContext home ifNotNil: [\x0a\x09\x09\x09self logContext: aContext home ]]",
  153. referencedClasses: [],
  154. //>>excludeEnd("ide");
  155. messageSends: ["ifNotNil:", "home", "logContext:"]
  156. }),
  157. $globals.ConsoleErrorHandler);
  158. $globals.ConsoleErrorHandler.klass.iVarNames = ['current'];
  159. $core.addMethod(
  160. $core.method({
  161. selector: "initialize",
  162. protocol: 'initialization',
  163. fn: function (){
  164. var self=this;
  165. function $ErrorHandler(){return $globals.ErrorHandler||(typeof ErrorHandler=="undefined"?nil:ErrorHandler)}
  166. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  167. return $core.withContext(function($ctx1) {
  168. //>>excludeEnd("ctx");
  169. $recv($ErrorHandler())._registerIfNone_(self._new());
  170. return self;
  171. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  172. }, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.ConsoleErrorHandler.klass)});
  173. //>>excludeEnd("ctx");
  174. },
  175. //>>excludeStart("ide", pragmas.excludeIdeData);
  176. args: [],
  177. source: "initialize\x0a\x09ErrorHandler registerIfNone: self new",
  178. referencedClasses: ["ErrorHandler"],
  179. //>>excludeEnd("ide");
  180. messageSends: ["registerIfNone:", "new"]
  181. }),
  182. $globals.ConsoleErrorHandler.klass);
  183. $core.addClass('ConsoleTranscript', $globals.Object, ['textarea'], 'Platform-Services');
  184. //>>excludeStart("ide", pragmas.excludeIdeData);
  185. $globals.ConsoleTranscript.comment="I am a specific transcript emitting to the JavaScript console.\x0a\x0aIf no other transcript is registered, I am the default.";
  186. //>>excludeEnd("ide");
  187. $core.addMethod(
  188. $core.method({
  189. selector: "clear",
  190. protocol: 'printing',
  191. fn: function (){
  192. var self=this;
  193. return self;
  194. },
  195. //>>excludeStart("ide", pragmas.excludeIdeData);
  196. args: [],
  197. source: "clear\x0a\x09\x22no op\x22",
  198. referencedClasses: [],
  199. //>>excludeEnd("ide");
  200. messageSends: []
  201. }),
  202. $globals.ConsoleTranscript);
  203. $core.addMethod(
  204. $core.method({
  205. selector: "cr",
  206. protocol: 'printing',
  207. fn: function (){
  208. var self=this;
  209. return self;
  210. },
  211. //>>excludeStart("ide", pragmas.excludeIdeData);
  212. args: [],
  213. source: "cr\x0a\x09\x22no op\x22",
  214. referencedClasses: [],
  215. //>>excludeEnd("ide");
  216. messageSends: []
  217. }),
  218. $globals.ConsoleTranscript);
  219. $core.addMethod(
  220. $core.method({
  221. selector: "open",
  222. protocol: 'actions',
  223. fn: function (){
  224. var self=this;
  225. return self;
  226. },
  227. //>>excludeStart("ide", pragmas.excludeIdeData);
  228. args: [],
  229. source: "open",
  230. referencedClasses: [],
  231. //>>excludeEnd("ide");
  232. messageSends: []
  233. }),
  234. $globals.ConsoleTranscript);
  235. $core.addMethod(
  236. $core.method({
  237. selector: "show:",
  238. protocol: 'printing',
  239. fn: function (anObject){
  240. var self=this;
  241. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  242. return $core.withContext(function($ctx1) {
  243. //>>excludeEnd("ctx");
  244. console.log(String($recv(anObject)._asString()));
  245. return self;
  246. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  247. }, function($ctx1) {$ctx1.fill(self,"show:",{anObject:anObject},$globals.ConsoleTranscript)});
  248. //>>excludeEnd("ctx");
  249. },
  250. //>>excludeStart("ide", pragmas.excludeIdeData);
  251. args: ["anObject"],
  252. source: "show: anObject\x0a\x22Smalltalk objects should have no trouble displaying themselves on the Transcript; Javascript objects don't know how, so must be wrapped in a JSObectProxy.\x22\x0a<console.log(String($recv(anObject)._asString()))>",
  253. referencedClasses: [],
  254. //>>excludeEnd("ide");
  255. messageSends: []
  256. }),
  257. $globals.ConsoleTranscript);
  258. $core.addMethod(
  259. $core.method({
  260. selector: "initialize",
  261. protocol: 'initialization',
  262. fn: function (){
  263. var self=this;
  264. function $Transcript(){return $globals.Transcript||(typeof Transcript=="undefined"?nil:Transcript)}
  265. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  266. return $core.withContext(function($ctx1) {
  267. //>>excludeEnd("ctx");
  268. $recv($Transcript())._registerIfNone_(self._new());
  269. return self;
  270. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  271. }, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.ConsoleTranscript.klass)});
  272. //>>excludeEnd("ctx");
  273. },
  274. //>>excludeStart("ide", pragmas.excludeIdeData);
  275. args: [],
  276. source: "initialize\x0a\x09Transcript registerIfNone: self new",
  277. referencedClasses: ["Transcript"],
  278. //>>excludeEnd("ide");
  279. messageSends: ["registerIfNone:", "new"]
  280. }),
  281. $globals.ConsoleTranscript.klass);
  282. $core.addClass('InterfacingObject', $globals.Object, [], 'Platform-Services');
  283. //>>excludeStart("ide", pragmas.excludeIdeData);
  284. $globals.InterfacingObject.comment="I am superclass of all object that interface with user or environment. `Widget` and a few other classes are subclasses of me. I delegate all of the above APIs to `PlatformInterface`.\x0a\x0a## API\x0a\x0a self alert: 'Hey, there is a problem'.\x0a self confirm: 'Affirmative?'.\x0a self prompt: 'Your name:'.\x0a\x0a self ajax: #{\x0a 'url' -> '/patch.js'. 'type' -> 'GET'. dataType->'script'\x0a }.";
  285. //>>excludeEnd("ide");
  286. $core.addMethod(
  287. $core.method({
  288. selector: "ajax:",
  289. protocol: 'actions',
  290. fn: function (anObject){
  291. var self=this;
  292. function $PlatformInterface(){return $globals.PlatformInterface||(typeof PlatformInterface=="undefined"?nil:PlatformInterface)}
  293. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  294. return $core.withContext(function($ctx1) {
  295. //>>excludeEnd("ctx");
  296. var $1;
  297. self._deprecatedAPI();
  298. $1=$recv($PlatformInterface())._ajax_(anObject);
  299. return $1;
  300. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  301. }, function($ctx1) {$ctx1.fill(self,"ajax:",{anObject:anObject},$globals.InterfacingObject)});
  302. //>>excludeEnd("ctx");
  303. },
  304. //>>excludeStart("ide", pragmas.excludeIdeData);
  305. args: ["anObject"],
  306. source: "ajax: anObject\x0a\x09self deprecatedAPI.\x0a\x09^ PlatformInterface ajax: anObject",
  307. referencedClasses: ["PlatformInterface"],
  308. //>>excludeEnd("ide");
  309. messageSends: ["deprecatedAPI", "ajax:"]
  310. }),
  311. $globals.InterfacingObject);
  312. $core.addMethod(
  313. $core.method({
  314. selector: "alert:",
  315. protocol: 'actions',
  316. fn: function (aString){
  317. var self=this;
  318. function $Terminal(){return $globals.Terminal||(typeof Terminal=="undefined"?nil:Terminal)}
  319. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  320. return $core.withContext(function($ctx1) {
  321. //>>excludeEnd("ctx");
  322. var $1;
  323. $1=$recv($Terminal())._alert_(aString);
  324. return $1;
  325. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  326. }, function($ctx1) {$ctx1.fill(self,"alert:",{aString:aString},$globals.InterfacingObject)});
  327. //>>excludeEnd("ctx");
  328. },
  329. //>>excludeStart("ide", pragmas.excludeIdeData);
  330. args: ["aString"],
  331. source: "alert: aString\x0a\x09^ Terminal alert: aString",
  332. referencedClasses: ["Terminal"],
  333. //>>excludeEnd("ide");
  334. messageSends: ["alert:"]
  335. }),
  336. $globals.InterfacingObject);
  337. $core.addMethod(
  338. $core.method({
  339. selector: "confirm:",
  340. protocol: 'actions',
  341. fn: function (aString){
  342. var self=this;
  343. function $Terminal(){return $globals.Terminal||(typeof Terminal=="undefined"?nil:Terminal)}
  344. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  345. return $core.withContext(function($ctx1) {
  346. //>>excludeEnd("ctx");
  347. var $1;
  348. $1=$recv($Terminal())._confirm_(aString);
  349. return $1;
  350. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  351. }, function($ctx1) {$ctx1.fill(self,"confirm:",{aString:aString},$globals.InterfacingObject)});
  352. //>>excludeEnd("ctx");
  353. },
  354. //>>excludeStart("ide", pragmas.excludeIdeData);
  355. args: ["aString"],
  356. source: "confirm: aString\x0a\x09^ Terminal confirm: aString",
  357. referencedClasses: ["Terminal"],
  358. //>>excludeEnd("ide");
  359. messageSends: ["confirm:"]
  360. }),
  361. $globals.InterfacingObject);
  362. $core.addMethod(
  363. $core.method({
  364. selector: "prompt:",
  365. protocol: 'actions',
  366. fn: function (aString){
  367. var self=this;
  368. function $Terminal(){return $globals.Terminal||(typeof Terminal=="undefined"?nil:Terminal)}
  369. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  370. return $core.withContext(function($ctx1) {
  371. //>>excludeEnd("ctx");
  372. var $1;
  373. $1=$recv($Terminal())._prompt_(aString);
  374. return $1;
  375. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  376. }, function($ctx1) {$ctx1.fill(self,"prompt:",{aString:aString},$globals.InterfacingObject)});
  377. //>>excludeEnd("ctx");
  378. },
  379. //>>excludeStart("ide", pragmas.excludeIdeData);
  380. args: ["aString"],
  381. source: "prompt: aString\x0a\x09^ Terminal prompt: aString",
  382. referencedClasses: ["Terminal"],
  383. //>>excludeEnd("ide");
  384. messageSends: ["prompt:"]
  385. }),
  386. $globals.InterfacingObject);
  387. $core.addMethod(
  388. $core.method({
  389. selector: "prompt:default:",
  390. protocol: 'actions',
  391. fn: function (aString,defaultString){
  392. var self=this;
  393. function $Terminal(){return $globals.Terminal||(typeof Terminal=="undefined"?nil:Terminal)}
  394. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  395. return $core.withContext(function($ctx1) {
  396. //>>excludeEnd("ctx");
  397. var $1;
  398. $1=$recv($Terminal())._prompt_default_(aString,defaultString);
  399. return $1;
  400. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  401. }, function($ctx1) {$ctx1.fill(self,"prompt:default:",{aString:aString,defaultString:defaultString},$globals.InterfacingObject)});
  402. //>>excludeEnd("ctx");
  403. },
  404. //>>excludeStart("ide", pragmas.excludeIdeData);
  405. args: ["aString", "defaultString"],
  406. source: "prompt: aString default: defaultString\x0a\x09^ Terminal prompt: aString default: defaultString",
  407. referencedClasses: ["Terminal"],
  408. //>>excludeEnd("ide");
  409. messageSends: ["prompt:default:"]
  410. }),
  411. $globals.InterfacingObject);
  412. $core.addClass('Environment', $globals.InterfacingObject, [], 'Platform-Services');
  413. //>>excludeStart("ide", pragmas.excludeIdeData);
  414. $globals.Environment.comment="I provide an unified entry point to manipulate Amber packages, classes and methods.\x0a\x0aTypical use cases include IDEs, remote access and restricting browsing.";
  415. //>>excludeEnd("ide");
  416. $core.addMethod(
  417. $core.method({
  418. selector: "addInstVarNamed:to:",
  419. protocol: 'compiling',
  420. fn: function (aString,aClass){
  421. var self=this;
  422. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  423. return $core.withContext(function($ctx1) {
  424. //>>excludeEnd("ctx");
  425. var $1,$2,$3,$4,$5;
  426. $1=self._classBuilder();
  427. $2=$recv(aClass)._superclass();
  428. $3=$recv(aClass)._name();
  429. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  430. $ctx1.sendIdx["name"]=1;
  431. //>>excludeEnd("ctx");
  432. $4=$recv($recv(aClass)._instanceVariableNames())._copy();
  433. $recv($4)._add_(aString);
  434. $5=$recv($4)._yourself();
  435. $recv($1)._addSubclassOf_named_instanceVariableNames_package_($2,$3,$5,$recv($recv(aClass)._package())._name());
  436. return self;
  437. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  438. }, function($ctx1) {$ctx1.fill(self,"addInstVarNamed:to:",{aString:aString,aClass:aClass},$globals.Environment)});
  439. //>>excludeEnd("ctx");
  440. },
  441. //>>excludeStart("ide", pragmas.excludeIdeData);
  442. args: ["aString", "aClass"],
  443. source: "addInstVarNamed: aString to: aClass\x0a\x09self classBuilder\x0a\x09\x09addSubclassOf: aClass superclass \x0a\x09\x09named: aClass name \x0a\x09\x09instanceVariableNames: (aClass instanceVariableNames copy add: aString; yourself)\x0a\x09\x09package: aClass package name",
  444. referencedClasses: [],
  445. //>>excludeEnd("ide");
  446. messageSends: ["addSubclassOf:named:instanceVariableNames:package:", "classBuilder", "superclass", "name", "add:", "copy", "instanceVariableNames", "yourself", "package"]
  447. }),
  448. $globals.Environment);
  449. $core.addMethod(
  450. $core.method({
  451. selector: "allSelectors",
  452. protocol: 'accessing',
  453. fn: function (){
  454. var self=this;
  455. function $Smalltalk(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  456. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  457. return $core.withContext(function($ctx1) {
  458. //>>excludeEnd("ctx");
  459. var $1;
  460. $1=$recv($recv($Smalltalk())._core())._allSelectors();
  461. return $1;
  462. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  463. }, function($ctx1) {$ctx1.fill(self,"allSelectors",{},$globals.Environment)});
  464. //>>excludeEnd("ctx");
  465. },
  466. //>>excludeStart("ide", pragmas.excludeIdeData);
  467. args: [],
  468. source: "allSelectors\x0a\x09^ Smalltalk core allSelectors",
  469. referencedClasses: ["Smalltalk"],
  470. //>>excludeEnd("ide");
  471. messageSends: ["allSelectors", "core"]
  472. }),
  473. $globals.Environment);
  474. $core.addMethod(
  475. $core.method({
  476. selector: "availableClassNames",
  477. protocol: 'accessing',
  478. fn: function (){
  479. var self=this;
  480. function $Smalltalk(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  481. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  482. return $core.withContext(function($ctx1) {
  483. //>>excludeEnd("ctx");
  484. var $1;
  485. $1=$recv($recv($Smalltalk())._classes())._collect_((function(each){
  486. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  487. return $core.withContext(function($ctx2) {
  488. //>>excludeEnd("ctx");
  489. return $recv(each)._name();
  490. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  491. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  492. //>>excludeEnd("ctx");
  493. }));
  494. return $1;
  495. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  496. }, function($ctx1) {$ctx1.fill(self,"availableClassNames",{},$globals.Environment)});
  497. //>>excludeEnd("ctx");
  498. },
  499. //>>excludeStart("ide", pragmas.excludeIdeData);
  500. args: [],
  501. source: "availableClassNames\x0a\x09^ Smalltalk classes \x0a\x09\x09collect: [ :each | each name ]",
  502. referencedClasses: ["Smalltalk"],
  503. //>>excludeEnd("ide");
  504. messageSends: ["collect:", "classes", "name"]
  505. }),
  506. $globals.Environment);
  507. $core.addMethod(
  508. $core.method({
  509. selector: "availablePackageNames",
  510. protocol: 'accessing',
  511. fn: function (){
  512. var self=this;
  513. function $Smalltalk(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  514. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  515. return $core.withContext(function($ctx1) {
  516. //>>excludeEnd("ctx");
  517. var $1;
  518. $1=$recv($recv($Smalltalk())._packages())._collect_((function(each){
  519. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  520. return $core.withContext(function($ctx2) {
  521. //>>excludeEnd("ctx");
  522. return $recv(each)._name();
  523. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  524. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  525. //>>excludeEnd("ctx");
  526. }));
  527. return $1;
  528. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  529. }, function($ctx1) {$ctx1.fill(self,"availablePackageNames",{},$globals.Environment)});
  530. //>>excludeEnd("ctx");
  531. },
  532. //>>excludeStart("ide", pragmas.excludeIdeData);
  533. args: [],
  534. source: "availablePackageNames\x0a\x09^ Smalltalk packages \x0a\x09\x09collect: [ :each | each name ]",
  535. referencedClasses: ["Smalltalk"],
  536. //>>excludeEnd("ide");
  537. messageSends: ["collect:", "packages", "name"]
  538. }),
  539. $globals.Environment);
  540. $core.addMethod(
  541. $core.method({
  542. selector: "availableProtocolsFor:",
  543. protocol: 'accessing',
  544. fn: function (aClass){
  545. var self=this;
  546. var protocols;
  547. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  548. return $core.withContext(function($ctx1) {
  549. //>>excludeEnd("ctx");
  550. var $1,$2,$receiver;
  551. protocols=$recv(aClass)._protocols();
  552. $1=$recv(aClass)._superclass();
  553. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  554. $ctx1.sendIdx["superclass"]=1;
  555. //>>excludeEnd("ctx");
  556. if(($receiver = $1) == null || $receiver.isNil){
  557. $1;
  558. } else {
  559. $recv(protocols)._addAll_(self._availableProtocolsFor_($recv(aClass)._superclass()));
  560. };
  561. $2=$recv($recv($recv(protocols)._asSet())._asArray())._sort();
  562. return $2;
  563. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  564. }, function($ctx1) {$ctx1.fill(self,"availableProtocolsFor:",{aClass:aClass,protocols:protocols},$globals.Environment)});
  565. //>>excludeEnd("ctx");
  566. },
  567. //>>excludeStart("ide", pragmas.excludeIdeData);
  568. args: ["aClass"],
  569. source: "availableProtocolsFor: aClass\x0a\x09| protocols |\x0a\x09\x0a\x09protocols := aClass protocols.\x0a\x09aClass superclass ifNotNil: [ protocols addAll: (self availableProtocolsFor: aClass superclass) ].\x0a\x09^ protocols asSet asArray sort",
  570. referencedClasses: [],
  571. //>>excludeEnd("ide");
  572. messageSends: ["protocols", "ifNotNil:", "superclass", "addAll:", "availableProtocolsFor:", "sort", "asArray", "asSet"]
  573. }),
  574. $globals.Environment);
  575. $core.addMethod(
  576. $core.method({
  577. selector: "classBuilder",
  578. protocol: 'accessing',
  579. fn: function (){
  580. var self=this;
  581. function $ClassBuilder(){return $globals.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
  582. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  583. return $core.withContext(function($ctx1) {
  584. //>>excludeEnd("ctx");
  585. var $1;
  586. $1=$recv($ClassBuilder())._new();
  587. return $1;
  588. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  589. }, function($ctx1) {$ctx1.fill(self,"classBuilder",{},$globals.Environment)});
  590. //>>excludeEnd("ctx");
  591. },
  592. //>>excludeStart("ide", pragmas.excludeIdeData);
  593. args: [],
  594. source: "classBuilder\x0a\x09^ ClassBuilder new",
  595. referencedClasses: ["ClassBuilder"],
  596. //>>excludeEnd("ide");
  597. messageSends: ["new"]
  598. }),
  599. $globals.Environment);
  600. $core.addMethod(
  601. $core.method({
  602. selector: "classNamed:",
  603. protocol: 'accessing',
  604. fn: function (aString){
  605. var self=this;
  606. function $Smalltalk(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  607. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  608. return $core.withContext(function($ctx1) {
  609. //>>excludeEnd("ctx");
  610. var $2,$1,$receiver;
  611. $2=$recv($recv($Smalltalk())._globals())._at_($recv(aString)._asSymbol());
  612. if(($receiver = $2) == null || $receiver.isNil){
  613. $1=self._error_("Invalid class name");
  614. } else {
  615. $1=$2;
  616. };
  617. return $1;
  618. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  619. }, function($ctx1) {$ctx1.fill(self,"classNamed:",{aString:aString},$globals.Environment)});
  620. //>>excludeEnd("ctx");
  621. },
  622. //>>excludeStart("ide", pragmas.excludeIdeData);
  623. args: ["aString"],
  624. source: "classNamed: aString\x0a\x09^ (Smalltalk globals at: aString asSymbol)\x0a\x09\x09ifNil: [ self error: 'Invalid class name' ]",
  625. referencedClasses: ["Smalltalk"],
  626. //>>excludeEnd("ide");
  627. messageSends: ["ifNil:", "at:", "globals", "asSymbol", "error:"]
  628. }),
  629. $globals.Environment);
  630. $core.addMethod(
  631. $core.method({
  632. selector: "classes",
  633. protocol: 'accessing',
  634. fn: function (){
  635. var self=this;
  636. function $Smalltalk(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  637. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  638. return $core.withContext(function($ctx1) {
  639. //>>excludeEnd("ctx");
  640. var $1;
  641. $1=$recv($Smalltalk())._classes();
  642. return $1;
  643. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  644. }, function($ctx1) {$ctx1.fill(self,"classes",{},$globals.Environment)});
  645. //>>excludeEnd("ctx");
  646. },
  647. //>>excludeStart("ide", pragmas.excludeIdeData);
  648. args: [],
  649. source: "classes\x0a\x09^ Smalltalk classes",
  650. referencedClasses: ["Smalltalk"],
  651. //>>excludeEnd("ide");
  652. messageSends: ["classes"]
  653. }),
  654. $globals.Environment);
  655. $core.addMethod(
  656. $core.method({
  657. selector: "commitPackage:onSuccess:onError:",
  658. protocol: 'actions',
  659. fn: function (aPackage,aBlock,anotherBlock){
  660. var self=this;
  661. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  662. return $core.withContext(function($ctx1) {
  663. //>>excludeEnd("ctx");
  664. $recv($recv(aPackage)._transport())._commitOnSuccess_onError_(aBlock,anotherBlock);
  665. return self;
  666. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  667. }, function($ctx1) {$ctx1.fill(self,"commitPackage:onSuccess:onError:",{aPackage:aPackage,aBlock:aBlock,anotherBlock:anotherBlock},$globals.Environment)});
  668. //>>excludeEnd("ctx");
  669. },
  670. //>>excludeStart("ide", pragmas.excludeIdeData);
  671. args: ["aPackage", "aBlock", "anotherBlock"],
  672. source: "commitPackage: aPackage onSuccess: aBlock onError: anotherBlock\x0a\x09aPackage transport\x0a\x09\x09commitOnSuccess: aBlock\x0a\x09\x09onError: anotherBlock",
  673. referencedClasses: [],
  674. //>>excludeEnd("ide");
  675. messageSends: ["commitOnSuccess:onError:", "transport"]
  676. }),
  677. $globals.Environment);
  678. $core.addMethod(
  679. $core.method({
  680. selector: "compileClassComment:for:",
  681. protocol: 'compiling',
  682. fn: function (aString,aClass){
  683. var self=this;
  684. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  685. return $core.withContext(function($ctx1) {
  686. //>>excludeEnd("ctx");
  687. $recv(aClass)._comment_(aString);
  688. return self;
  689. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  690. }, function($ctx1) {$ctx1.fill(self,"compileClassComment:for:",{aString:aString,aClass:aClass},$globals.Environment)});
  691. //>>excludeEnd("ctx");
  692. },
  693. //>>excludeStart("ide", pragmas.excludeIdeData);
  694. args: ["aString", "aClass"],
  695. source: "compileClassComment: aString for: aClass\x0a\x09aClass comment: aString",
  696. referencedClasses: [],
  697. //>>excludeEnd("ide");
  698. messageSends: ["comment:"]
  699. }),
  700. $globals.Environment);
  701. $core.addMethod(
  702. $core.method({
  703. selector: "compileClassDefinition:",
  704. protocol: 'compiling',
  705. fn: function (aString){
  706. var self=this;
  707. function $DoIt(){return $globals.DoIt||(typeof DoIt=="undefined"?nil:DoIt)}
  708. function $Error(){return $globals.Error||(typeof Error=="undefined"?nil:Error)}
  709. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  710. return $core.withContext(function($ctx1) {
  711. //>>excludeEnd("ctx");
  712. $recv((function(){
  713. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  714. return $core.withContext(function($ctx2) {
  715. //>>excludeEnd("ctx");
  716. return self._evaluate_for_(aString,$recv($DoIt())._new());
  717. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  718. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  719. //>>excludeEnd("ctx");
  720. }))._on_do_($Error(),(function(error){
  721. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  722. return $core.withContext(function($ctx2) {
  723. //>>excludeEnd("ctx");
  724. return self._alert_($recv(error)._messageText());
  725. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  726. }, function($ctx2) {$ctx2.fillBlock({error:error},$ctx1,2)});
  727. //>>excludeEnd("ctx");
  728. }));
  729. return self;
  730. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  731. }, function($ctx1) {$ctx1.fill(self,"compileClassDefinition:",{aString:aString},$globals.Environment)});
  732. //>>excludeEnd("ctx");
  733. },
  734. //>>excludeStart("ide", pragmas.excludeIdeData);
  735. args: ["aString"],
  736. source: "compileClassDefinition: aString\x0a\x09[ self evaluate: aString for: DoIt new ]\x0a\x09\x09on: Error\x0a\x09\x09do: [ :error | self alert: error messageText ]",
  737. referencedClasses: ["DoIt", "Error"],
  738. //>>excludeEnd("ide");
  739. messageSends: ["on:do:", "evaluate:for:", "new", "alert:", "messageText"]
  740. }),
  741. $globals.Environment);
  742. $core.addMethod(
  743. $core.method({
  744. selector: "compileMethod:for:protocol:",
  745. protocol: 'compiling',
  746. fn: function (sourceCode,class_,protocol){
  747. var self=this;
  748. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  749. return $core.withContext(function($ctx1) {
  750. //>>excludeEnd("ctx");
  751. var $1;
  752. $1=$recv(class_)._compile_protocol_(sourceCode,protocol);
  753. return $1;
  754. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  755. }, function($ctx1) {$ctx1.fill(self,"compileMethod:for:protocol:",{sourceCode:sourceCode,class_:class_,protocol:protocol},$globals.Environment)});
  756. //>>excludeEnd("ctx");
  757. },
  758. //>>excludeStart("ide", pragmas.excludeIdeData);
  759. args: ["sourceCode", "class", "protocol"],
  760. source: "compileMethod: sourceCode for: class protocol: protocol\x0a\x09^ class\x0a\x09\x09compile: sourceCode\x0a\x09\x09protocol: protocol",
  761. referencedClasses: [],
  762. //>>excludeEnd("ide");
  763. messageSends: ["compile:protocol:"]
  764. }),
  765. $globals.Environment);
  766. $core.addMethod(
  767. $core.method({
  768. selector: "copyClass:to:",
  769. protocol: 'actions',
  770. fn: function (aClass,aClassName){
  771. var self=this;
  772. function $Smalltalk(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  773. function $ClassBuilder(){return $globals.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
  774. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  775. return $core.withContext(function($ctx1) {
  776. //>>excludeEnd("ctx");
  777. var $1,$2,$receiver;
  778. $1=$recv($recv($Smalltalk())._globals())._at_(aClassName);
  779. if(($receiver = $1) == null || $receiver.isNil){
  780. $1;
  781. } else {
  782. $2=$recv("A class named ".__comma(aClassName)).__comma(" already exists");
  783. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  784. $ctx1.sendIdx[","]=1;
  785. //>>excludeEnd("ctx");
  786. self._error_($2);
  787. };
  788. $recv($recv($ClassBuilder())._new())._copyClass_named_(aClass,aClassName);
  789. return self;
  790. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  791. }, function($ctx1) {$ctx1.fill(self,"copyClass:to:",{aClass:aClass,aClassName:aClassName},$globals.Environment)});
  792. //>>excludeEnd("ctx");
  793. },
  794. //>>excludeStart("ide", pragmas.excludeIdeData);
  795. args: ["aClass", "aClassName"],
  796. source: "copyClass: aClass to: aClassName\x0a\x09(Smalltalk globals at: aClassName)\x0a\x09\x09ifNotNil: [ self error: 'A class named ', aClassName, ' already exists' ].\x0a\x09\x09\x0a\x09ClassBuilder new copyClass: aClass named: aClassName",
  797. referencedClasses: ["Smalltalk", "ClassBuilder"],
  798. //>>excludeEnd("ide");
  799. messageSends: ["ifNotNil:", "at:", "globals", "error:", ",", "copyClass:named:", "new"]
  800. }),
  801. $globals.Environment);
  802. $core.addMethod(
  803. $core.method({
  804. selector: "doItReceiver",
  805. protocol: 'accessing',
  806. fn: function (){
  807. var self=this;
  808. function $DoIt(){return $globals.DoIt||(typeof DoIt=="undefined"?nil:DoIt)}
  809. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  810. return $core.withContext(function($ctx1) {
  811. //>>excludeEnd("ctx");
  812. var $1;
  813. $1=$recv($DoIt())._new();
  814. return $1;
  815. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  816. }, function($ctx1) {$ctx1.fill(self,"doItReceiver",{},$globals.Environment)});
  817. //>>excludeEnd("ctx");
  818. },
  819. //>>excludeStart("ide", pragmas.excludeIdeData);
  820. args: [],
  821. source: "doItReceiver\x0a\x09^ DoIt new",
  822. referencedClasses: ["DoIt"],
  823. //>>excludeEnd("ide");
  824. messageSends: ["new"]
  825. }),
  826. $globals.Environment);
  827. $core.addMethod(
  828. $core.method({
  829. selector: "evaluate:for:",
  830. protocol: 'evaluating',
  831. fn: function (aString,anObject){
  832. var self=this;
  833. function $Evaluator(){return $globals.Evaluator||(typeof Evaluator=="undefined"?nil:Evaluator)}
  834. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  835. return $core.withContext(function($ctx1) {
  836. //>>excludeEnd("ctx");
  837. var $1;
  838. $1=$recv($Evaluator())._evaluate_for_(aString,anObject);
  839. return $1;
  840. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  841. }, function($ctx1) {$ctx1.fill(self,"evaluate:for:",{aString:aString,anObject:anObject},$globals.Environment)});
  842. //>>excludeEnd("ctx");
  843. },
  844. //>>excludeStart("ide", pragmas.excludeIdeData);
  845. args: ["aString", "anObject"],
  846. source: "evaluate: aString for: anObject\x0a\x09^ Evaluator evaluate: aString for: anObject",
  847. referencedClasses: ["Evaluator"],
  848. //>>excludeEnd("ide");
  849. messageSends: ["evaluate:for:"]
  850. }),
  851. $globals.Environment);
  852. $core.addMethod(
  853. $core.method({
  854. selector: "evaluate:on:do:",
  855. protocol: 'error handling',
  856. fn: function (aBlock,anErrorClass,exceptionBlock){
  857. var self=this;
  858. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  859. return $core.withContext(function($ctx1) {
  860. //>>excludeEnd("ctx");
  861. var $1;
  862. $recv(aBlock)._tryCatch_((function(exception){
  863. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  864. return $core.withContext(function($ctx2) {
  865. //>>excludeEnd("ctx");
  866. $1=$recv(exception)._isKindOf_(self._classNamed_($recv(anErrorClass)._name()));
  867. if($core.assert($1)){
  868. return $recv(exceptionBlock)._value_(exception);
  869. } else {
  870. return $recv(exception)._resignal();
  871. };
  872. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  873. }, function($ctx2) {$ctx2.fillBlock({exception:exception},$ctx1,1)});
  874. //>>excludeEnd("ctx");
  875. }));
  876. return self;
  877. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  878. }, function($ctx1) {$ctx1.fill(self,"evaluate:on:do:",{aBlock:aBlock,anErrorClass:anErrorClass,exceptionBlock:exceptionBlock},$globals.Environment)});
  879. //>>excludeEnd("ctx");
  880. },
  881. //>>excludeStart("ide", pragmas.excludeIdeData);
  882. args: ["aBlock", "anErrorClass", "exceptionBlock"],
  883. source: "evaluate: aBlock on: anErrorClass do: exceptionBlock\x0a\x09\x22Evaluate a block and catch exceptions happening on the environment stack\x22\x0a\x09\x0a\x09aBlock tryCatch: [ :exception | \x0a\x09\x09(exception isKindOf: (self classNamed: anErrorClass name))\x0a\x09\x09\x09ifTrue: [ exceptionBlock value: exception ]\x0a \x09\x09\x09ifFalse: [ exception resignal ] ]",
  884. referencedClasses: [],
  885. //>>excludeEnd("ide");
  886. messageSends: ["tryCatch:", "ifTrue:ifFalse:", "isKindOf:", "classNamed:", "name", "value:", "resignal"]
  887. }),
  888. $globals.Environment);
  889. $core.addMethod(
  890. $core.method({
  891. selector: "inspect:",
  892. protocol: 'actions',
  893. fn: function (anObject){
  894. var self=this;
  895. function $Inspector(){return $globals.Inspector||(typeof Inspector=="undefined"?nil:Inspector)}
  896. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  897. return $core.withContext(function($ctx1) {
  898. //>>excludeEnd("ctx");
  899. $recv($Inspector())._inspect_(anObject);
  900. return self;
  901. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  902. }, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},$globals.Environment)});
  903. //>>excludeEnd("ctx");
  904. },
  905. //>>excludeStart("ide", pragmas.excludeIdeData);
  906. args: ["anObject"],
  907. source: "inspect: anObject\x0a\x09Inspector inspect: anObject",
  908. referencedClasses: ["Inspector"],
  909. //>>excludeEnd("ide");
  910. messageSends: ["inspect:"]
  911. }),
  912. $globals.Environment);
  913. $core.addMethod(
  914. $core.method({
  915. selector: "moveClass:toPackage:",
  916. protocol: 'actions',
  917. fn: function (aClass,aPackageName){
  918. var self=this;
  919. var package_;
  920. function $Package(){return $globals.Package||(typeof Package=="undefined"?nil:Package)}
  921. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  922. return $core.withContext(function($ctx1) {
  923. //>>excludeEnd("ctx");
  924. var $1,$2,$receiver;
  925. package_=$recv($Package())._named_(aPackageName);
  926. $1=package_;
  927. if(($receiver = $1) == null || $receiver.isNil){
  928. self._error_("Invalid package name");
  929. } else {
  930. $1;
  931. };
  932. $2=$recv(package_).__eq_eq($recv(aClass)._package());
  933. if($core.assert($2)){
  934. return self;
  935. };
  936. $recv(aClass)._package_(package_);
  937. return self;
  938. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  939. }, function($ctx1) {$ctx1.fill(self,"moveClass:toPackage:",{aClass:aClass,aPackageName:aPackageName,package_:package_},$globals.Environment)});
  940. //>>excludeEnd("ctx");
  941. },
  942. //>>excludeStart("ide", pragmas.excludeIdeData);
  943. args: ["aClass", "aPackageName"],
  944. source: "moveClass: aClass toPackage: aPackageName\x0a\x09| package |\x0a\x09\x0a\x09package := Package named: aPackageName.\x0a\x09package ifNil: [ self error: 'Invalid package name' ].\x0a\x09package == aClass package ifTrue: [ ^ self ].\x0a\x09\x0a\x09aClass package: package",
  945. referencedClasses: ["Package"],
  946. //>>excludeEnd("ide");
  947. messageSends: ["named:", "ifNil:", "error:", "ifTrue:", "==", "package", "package:"]
  948. }),
  949. $globals.Environment);
  950. $core.addMethod(
  951. $core.method({
  952. selector: "moveMethod:toClass:",
  953. protocol: 'actions',
  954. fn: function (aMethod,aClassName){
  955. var self=this;
  956. var destinationClass;
  957. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  958. return $core.withContext(function($ctx1) {
  959. //>>excludeEnd("ctx");
  960. var $2,$3,$1,$5,$4;
  961. destinationClass=self._classNamed_(aClassName);
  962. $2=destinationClass;
  963. $3=$recv(aMethod)._methodClass();
  964. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  965. $ctx1.sendIdx["methodClass"]=1;
  966. //>>excludeEnd("ctx");
  967. $1=$recv($2).__eq_eq($3);
  968. if($core.assert($1)){
  969. return self;
  970. };
  971. $5=$recv(aMethod)._methodClass();
  972. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  973. $ctx1.sendIdx["methodClass"]=2;
  974. //>>excludeEnd("ctx");
  975. $4=$recv($5)._isMetaclass();
  976. if($core.assert($4)){
  977. destinationClass=$recv(destinationClass)._class();
  978. destinationClass;
  979. };
  980. $recv(destinationClass)._compile_protocol_($recv(aMethod)._source(),$recv(aMethod)._protocol());
  981. $recv($recv(aMethod)._methodClass())._removeCompiledMethod_(aMethod);
  982. return self;
  983. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  984. }, function($ctx1) {$ctx1.fill(self,"moveMethod:toClass:",{aMethod:aMethod,aClassName:aClassName,destinationClass:destinationClass},$globals.Environment)});
  985. //>>excludeEnd("ctx");
  986. },
  987. //>>excludeStart("ide", pragmas.excludeIdeData);
  988. args: ["aMethod", "aClassName"],
  989. source: "moveMethod: aMethod toClass: aClassName\x0a\x09| destinationClass |\x0a\x09\x0a\x09destinationClass := self classNamed: aClassName.\x0a\x09destinationClass == aMethod methodClass ifTrue: [ ^ self ].\x0a\x09\x0a\x09aMethod methodClass isMetaclass ifTrue: [ \x0a\x09\x09destinationClass := destinationClass class ].\x0a\x09\x0a\x09destinationClass \x0a\x09\x09compile: aMethod source\x0a\x09\x09protocol: aMethod protocol.\x0a\x09aMethod methodClass \x0a\x09\x09removeCompiledMethod: aMethod",
  990. referencedClasses: [],
  991. //>>excludeEnd("ide");
  992. messageSends: ["classNamed:", "ifTrue:", "==", "methodClass", "isMetaclass", "class", "compile:protocol:", "source", "protocol", "removeCompiledMethod:"]
  993. }),
  994. $globals.Environment);
  995. $core.addMethod(
  996. $core.method({
  997. selector: "moveMethod:toProtocol:",
  998. protocol: 'actions',
  999. fn: function (aMethod,aProtocol){
  1000. var self=this;
  1001. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1002. return $core.withContext(function($ctx1) {
  1003. //>>excludeEnd("ctx");
  1004. $recv(aMethod)._protocol_(aProtocol);
  1005. return self;
  1006. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1007. }, function($ctx1) {$ctx1.fill(self,"moveMethod:toProtocol:",{aMethod:aMethod,aProtocol:aProtocol},$globals.Environment)});
  1008. //>>excludeEnd("ctx");
  1009. },
  1010. //>>excludeStart("ide", pragmas.excludeIdeData);
  1011. args: ["aMethod", "aProtocol"],
  1012. source: "moveMethod: aMethod toProtocol: aProtocol\x0a\x09aMethod protocol: aProtocol",
  1013. referencedClasses: [],
  1014. //>>excludeEnd("ide");
  1015. messageSends: ["protocol:"]
  1016. }),
  1017. $globals.Environment);
  1018. $core.addMethod(
  1019. $core.method({
  1020. selector: "packages",
  1021. protocol: 'accessing',
  1022. fn: function (){
  1023. var self=this;
  1024. function $Smalltalk(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1025. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1026. return $core.withContext(function($ctx1) {
  1027. //>>excludeEnd("ctx");
  1028. var $1;
  1029. $1=$recv($Smalltalk())._packages();
  1030. return $1;
  1031. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1032. }, function($ctx1) {$ctx1.fill(self,"packages",{},$globals.Environment)});
  1033. //>>excludeEnd("ctx");
  1034. },
  1035. //>>excludeStart("ide", pragmas.excludeIdeData);
  1036. args: [],
  1037. source: "packages\x0a\x09^ Smalltalk packages",
  1038. referencedClasses: ["Smalltalk"],
  1039. //>>excludeEnd("ide");
  1040. messageSends: ["packages"]
  1041. }),
  1042. $globals.Environment);
  1043. $core.addMethod(
  1044. $core.method({
  1045. selector: "registerErrorHandler:",
  1046. protocol: 'services',
  1047. fn: function (anErrorHandler){
  1048. var self=this;
  1049. function $ErrorHandler(){return $globals.ErrorHandler||(typeof ErrorHandler=="undefined"?nil:ErrorHandler)}
  1050. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1051. return $core.withContext(function($ctx1) {
  1052. //>>excludeEnd("ctx");
  1053. $recv($ErrorHandler())._register_(anErrorHandler);
  1054. return self;
  1055. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1056. }, function($ctx1) {$ctx1.fill(self,"registerErrorHandler:",{anErrorHandler:anErrorHandler},$globals.Environment)});
  1057. //>>excludeEnd("ctx");
  1058. },
  1059. //>>excludeStart("ide", pragmas.excludeIdeData);
  1060. args: ["anErrorHandler"],
  1061. source: "registerErrorHandler: anErrorHandler\x0a\x09ErrorHandler register: anErrorHandler",
  1062. referencedClasses: ["ErrorHandler"],
  1063. //>>excludeEnd("ide");
  1064. messageSends: ["register:"]
  1065. }),
  1066. $globals.Environment);
  1067. $core.addMethod(
  1068. $core.method({
  1069. selector: "registerFinder:",
  1070. protocol: 'services',
  1071. fn: function (aFinder){
  1072. var self=this;
  1073. function $Finder(){return $globals.Finder||(typeof Finder=="undefined"?nil:Finder)}
  1074. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1075. return $core.withContext(function($ctx1) {
  1076. //>>excludeEnd("ctx");
  1077. $recv($Finder())._register_(aFinder);
  1078. return self;
  1079. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1080. }, function($ctx1) {$ctx1.fill(self,"registerFinder:",{aFinder:aFinder},$globals.Environment)});
  1081. //>>excludeEnd("ctx");
  1082. },
  1083. //>>excludeStart("ide", pragmas.excludeIdeData);
  1084. args: ["aFinder"],
  1085. source: "registerFinder: aFinder\x0a\x09Finder register: aFinder",
  1086. referencedClasses: ["Finder"],
  1087. //>>excludeEnd("ide");
  1088. messageSends: ["register:"]
  1089. }),
  1090. $globals.Environment);
  1091. $core.addMethod(
  1092. $core.method({
  1093. selector: "registerInspector:",
  1094. protocol: 'services',
  1095. fn: function (anInspector){
  1096. var self=this;
  1097. function $Inspector(){return $globals.Inspector||(typeof Inspector=="undefined"?nil:Inspector)}
  1098. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1099. return $core.withContext(function($ctx1) {
  1100. //>>excludeEnd("ctx");
  1101. $recv($Inspector())._register_(anInspector);
  1102. return self;
  1103. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1104. }, function($ctx1) {$ctx1.fill(self,"registerInspector:",{anInspector:anInspector},$globals.Environment)});
  1105. //>>excludeEnd("ctx");
  1106. },
  1107. //>>excludeStart("ide", pragmas.excludeIdeData);
  1108. args: ["anInspector"],
  1109. source: "registerInspector: anInspector\x0a\x09Inspector register: anInspector",
  1110. referencedClasses: ["Inspector"],
  1111. //>>excludeEnd("ide");
  1112. messageSends: ["register:"]
  1113. }),
  1114. $globals.Environment);
  1115. $core.addMethod(
  1116. $core.method({
  1117. selector: "registerProgressHandler:",
  1118. protocol: 'services',
  1119. fn: function (aProgressHandler){
  1120. var self=this;
  1121. function $ProgressHandler(){return $globals.ProgressHandler||(typeof ProgressHandler=="undefined"?nil:ProgressHandler)}
  1122. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1123. return $core.withContext(function($ctx1) {
  1124. //>>excludeEnd("ctx");
  1125. $recv($ProgressHandler())._register_(aProgressHandler);
  1126. return self;
  1127. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1128. }, function($ctx1) {$ctx1.fill(self,"registerProgressHandler:",{aProgressHandler:aProgressHandler},$globals.Environment)});
  1129. //>>excludeEnd("ctx");
  1130. },
  1131. //>>excludeStart("ide", pragmas.excludeIdeData);
  1132. args: ["aProgressHandler"],
  1133. source: "registerProgressHandler: aProgressHandler\x0a\x09ProgressHandler register: aProgressHandler",
  1134. referencedClasses: ["ProgressHandler"],
  1135. //>>excludeEnd("ide");
  1136. messageSends: ["register:"]
  1137. }),
  1138. $globals.Environment);
  1139. $core.addMethod(
  1140. $core.method({
  1141. selector: "registerTranscript:",
  1142. protocol: 'services',
  1143. fn: function (aTranscript){
  1144. var self=this;
  1145. function $Transcript(){return $globals.Transcript||(typeof Transcript=="undefined"?nil:Transcript)}
  1146. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1147. return $core.withContext(function($ctx1) {
  1148. //>>excludeEnd("ctx");
  1149. $recv($Transcript())._register_(aTranscript);
  1150. return self;
  1151. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1152. }, function($ctx1) {$ctx1.fill(self,"registerTranscript:",{aTranscript:aTranscript},$globals.Environment)});
  1153. //>>excludeEnd("ctx");
  1154. },
  1155. //>>excludeStart("ide", pragmas.excludeIdeData);
  1156. args: ["aTranscript"],
  1157. source: "registerTranscript: aTranscript\x0a\x09Transcript register: aTranscript",
  1158. referencedClasses: ["Transcript"],
  1159. //>>excludeEnd("ide");
  1160. messageSends: ["register:"]
  1161. }),
  1162. $globals.Environment);
  1163. $core.addMethod(
  1164. $core.method({
  1165. selector: "removeClass:",
  1166. protocol: 'actions',
  1167. fn: function (aClass){
  1168. var self=this;
  1169. function $Smalltalk(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1170. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1171. return $core.withContext(function($ctx1) {
  1172. //>>excludeEnd("ctx");
  1173. $recv($Smalltalk())._removeClass_(aClass);
  1174. return self;
  1175. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1176. }, function($ctx1) {$ctx1.fill(self,"removeClass:",{aClass:aClass},$globals.Environment)});
  1177. //>>excludeEnd("ctx");
  1178. },
  1179. //>>excludeStart("ide", pragmas.excludeIdeData);
  1180. args: ["aClass"],
  1181. source: "removeClass: aClass\x0a\x09Smalltalk removeClass: aClass",
  1182. referencedClasses: ["Smalltalk"],
  1183. //>>excludeEnd("ide");
  1184. messageSends: ["removeClass:"]
  1185. }),
  1186. $globals.Environment);
  1187. $core.addMethod(
  1188. $core.method({
  1189. selector: "removeMethod:",
  1190. protocol: 'actions',
  1191. fn: function (aMethod){
  1192. var self=this;
  1193. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1194. return $core.withContext(function($ctx1) {
  1195. //>>excludeEnd("ctx");
  1196. $recv($recv(aMethod)._methodClass())._removeCompiledMethod_(aMethod);
  1197. return self;
  1198. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1199. }, function($ctx1) {$ctx1.fill(self,"removeMethod:",{aMethod:aMethod},$globals.Environment)});
  1200. //>>excludeEnd("ctx");
  1201. },
  1202. //>>excludeStart("ide", pragmas.excludeIdeData);
  1203. args: ["aMethod"],
  1204. source: "removeMethod: aMethod\x0a\x09aMethod methodClass removeCompiledMethod: aMethod",
  1205. referencedClasses: [],
  1206. //>>excludeEnd("ide");
  1207. messageSends: ["removeCompiledMethod:", "methodClass"]
  1208. }),
  1209. $globals.Environment);
  1210. $core.addMethod(
  1211. $core.method({
  1212. selector: "removeProtocol:from:",
  1213. protocol: 'actions',
  1214. fn: function (aString,aClass){
  1215. var self=this;
  1216. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1217. return $core.withContext(function($ctx1) {
  1218. //>>excludeEnd("ctx");
  1219. $recv($recv(aClass)._methodsInProtocol_(aString))._do_((function(each){
  1220. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1221. return $core.withContext(function($ctx2) {
  1222. //>>excludeEnd("ctx");
  1223. return $recv(aClass)._removeCompiledMethod_(each);
  1224. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1225. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  1226. //>>excludeEnd("ctx");
  1227. }));
  1228. return self;
  1229. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1230. }, function($ctx1) {$ctx1.fill(self,"removeProtocol:from:",{aString:aString,aClass:aClass},$globals.Environment)});
  1231. //>>excludeEnd("ctx");
  1232. },
  1233. //>>excludeStart("ide", pragmas.excludeIdeData);
  1234. args: ["aString", "aClass"],
  1235. source: "removeProtocol: aString from: aClass\x0a\x09(aClass methodsInProtocol: aString)\x0a\x09\x09do: [ :each | aClass removeCompiledMethod: each ]",
  1236. referencedClasses: [],
  1237. //>>excludeEnd("ide");
  1238. messageSends: ["do:", "methodsInProtocol:", "removeCompiledMethod:"]
  1239. }),
  1240. $globals.Environment);
  1241. $core.addMethod(
  1242. $core.method({
  1243. selector: "renameClass:to:",
  1244. protocol: 'actions',
  1245. fn: function (aClass,aClassName){
  1246. var self=this;
  1247. function $Smalltalk(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1248. function $ClassBuilder(){return $globals.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
  1249. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1250. return $core.withContext(function($ctx1) {
  1251. //>>excludeEnd("ctx");
  1252. var $1,$2,$receiver;
  1253. $1=$recv($recv($Smalltalk())._globals())._at_(aClassName);
  1254. if(($receiver = $1) == null || $receiver.isNil){
  1255. $1;
  1256. } else {
  1257. $2=$recv("A class named ".__comma(aClassName)).__comma(" already exists");
  1258. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1259. $ctx1.sendIdx[","]=1;
  1260. //>>excludeEnd("ctx");
  1261. self._error_($2);
  1262. };
  1263. $recv($recv($ClassBuilder())._new())._renameClass_to_(aClass,aClassName);
  1264. return self;
  1265. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1266. }, function($ctx1) {$ctx1.fill(self,"renameClass:to:",{aClass:aClass,aClassName:aClassName},$globals.Environment)});
  1267. //>>excludeEnd("ctx");
  1268. },
  1269. //>>excludeStart("ide", pragmas.excludeIdeData);
  1270. args: ["aClass", "aClassName"],
  1271. source: "renameClass: aClass to: aClassName\x0a\x09(Smalltalk globals at: aClassName)\x0a\x09\x09ifNotNil: [ self error: 'A class named ', aClassName, ' already exists' ].\x0a\x09\x09\x0a\x09ClassBuilder new renameClass: aClass to: aClassName",
  1272. referencedClasses: ["Smalltalk", "ClassBuilder"],
  1273. //>>excludeEnd("ide");
  1274. messageSends: ["ifNotNil:", "at:", "globals", "error:", ",", "renameClass:to:", "new"]
  1275. }),
  1276. $globals.Environment);
  1277. $core.addMethod(
  1278. $core.method({
  1279. selector: "renamePackage:to:",
  1280. protocol: 'actions',
  1281. fn: function (aPackageName,aNewPackageName){
  1282. var self=this;
  1283. function $Smalltalk(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1284. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1285. return $core.withContext(function($ctx1) {
  1286. //>>excludeEnd("ctx");
  1287. var $1,$2,$receiver;
  1288. $1=$recv($recv($Smalltalk())._globals())._at_(aNewPackageName);
  1289. if(($receiver = $1) == null || $receiver.isNil){
  1290. $1;
  1291. } else {
  1292. $2=$recv("A package named ".__comma(aNewPackageName)).__comma(" already exists");
  1293. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1294. $ctx1.sendIdx[","]=1;
  1295. //>>excludeEnd("ctx");
  1296. self._error_($2);
  1297. };
  1298. $recv($Smalltalk())._renamePackage_to_(aPackageName,aNewPackageName);
  1299. return self;
  1300. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1301. }, function($ctx1) {$ctx1.fill(self,"renamePackage:to:",{aPackageName:aPackageName,aNewPackageName:aNewPackageName},$globals.Environment)});
  1302. //>>excludeEnd("ctx");
  1303. },
  1304. //>>excludeStart("ide", pragmas.excludeIdeData);
  1305. args: ["aPackageName", "aNewPackageName"],
  1306. source: "renamePackage: aPackageName to: aNewPackageName\x0a (Smalltalk globals at: aNewPackageName)\x0a ifNotNil: [ self error: 'A package named ', aNewPackageName, ' already exists' ].\x0a\x0a Smalltalk renamePackage: aPackageName to: aNewPackageName",
  1307. referencedClasses: ["Smalltalk"],
  1308. //>>excludeEnd("ide");
  1309. messageSends: ["ifNotNil:", "at:", "globals", "error:", ",", "renamePackage:to:"]
  1310. }),
  1311. $globals.Environment);
  1312. $core.addMethod(
  1313. $core.method({
  1314. selector: "renameProtocol:to:in:",
  1315. protocol: 'actions',
  1316. fn: function (aString,anotherString,aClass){
  1317. var self=this;
  1318. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1319. return $core.withContext(function($ctx1) {
  1320. //>>excludeEnd("ctx");
  1321. $recv($recv(aClass)._methodsInProtocol_(aString))._do_((function(each){
  1322. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1323. return $core.withContext(function($ctx2) {
  1324. //>>excludeEnd("ctx");
  1325. return $recv(each)._protocol_(anotherString);
  1326. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1327. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  1328. //>>excludeEnd("ctx");
  1329. }));
  1330. return self;
  1331. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1332. }, function($ctx1) {$ctx1.fill(self,"renameProtocol:to:in:",{aString:aString,anotherString:anotherString,aClass:aClass},$globals.Environment)});
  1333. //>>excludeEnd("ctx");
  1334. },
  1335. //>>excludeStart("ide", pragmas.excludeIdeData);
  1336. args: ["aString", "anotherString", "aClass"],
  1337. source: "renameProtocol: aString to: anotherString in: aClass\x0a\x09(aClass methodsInProtocol: aString)\x0a\x09\x09do: [ :each | each protocol: anotherString ]",
  1338. referencedClasses: [],
  1339. //>>excludeEnd("ide");
  1340. messageSends: ["do:", "methodsInProtocol:", "protocol:"]
  1341. }),
  1342. $globals.Environment);
  1343. $core.addMethod(
  1344. $core.method({
  1345. selector: "setClassCommentOf:to:",
  1346. protocol: 'actions',
  1347. fn: function (aClass,aString){
  1348. var self=this;
  1349. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1350. return $core.withContext(function($ctx1) {
  1351. //>>excludeEnd("ctx");
  1352. $recv(aClass)._comment_(aString);
  1353. return self;
  1354. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1355. }, function($ctx1) {$ctx1.fill(self,"setClassCommentOf:to:",{aClass:aClass,aString:aString},$globals.Environment)});
  1356. //>>excludeEnd("ctx");
  1357. },
  1358. //>>excludeStart("ide", pragmas.excludeIdeData);
  1359. args: ["aClass", "aString"],
  1360. source: "setClassCommentOf: aClass to: aString\x0a\x09aClass comment: aString",
  1361. referencedClasses: [],
  1362. //>>excludeEnd("ide");
  1363. messageSends: ["comment:"]
  1364. }),
  1365. $globals.Environment);
  1366. $core.addMethod(
  1367. $core.method({
  1368. selector: "systemAnnouncer",
  1369. protocol: 'accessing',
  1370. fn: function (){
  1371. var self=this;
  1372. function $Smalltalk(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1373. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1374. return $core.withContext(function($ctx1) {
  1375. //>>excludeEnd("ctx");
  1376. var $1;
  1377. $1=$recv($recv($recv($Smalltalk())._globals())._at_("SystemAnnouncer"))._current();
  1378. return $1;
  1379. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1380. }, function($ctx1) {$ctx1.fill(self,"systemAnnouncer",{},$globals.Environment)});
  1381. //>>excludeEnd("ctx");
  1382. },
  1383. //>>excludeStart("ide", pragmas.excludeIdeData);
  1384. args: [],
  1385. source: "systemAnnouncer\x0a\x09^ (Smalltalk globals at: #SystemAnnouncer) current",
  1386. referencedClasses: ["Smalltalk"],
  1387. //>>excludeEnd("ide");
  1388. messageSends: ["current", "at:", "globals"]
  1389. }),
  1390. $globals.Environment);
  1391. $core.addClass('NullProgressHandler', $globals.Object, [], 'Platform-Services');
  1392. //>>excludeStart("ide", pragmas.excludeIdeData);
  1393. $globals.NullProgressHandler.comment="I am the default progress handler. I do not display any progress, and simply iterate over the collection.";
  1394. //>>excludeEnd("ide");
  1395. $core.addMethod(
  1396. $core.method({
  1397. selector: "do:on:displaying:",
  1398. protocol: 'progress handling',
  1399. fn: function (aBlock,aCollection,aString){
  1400. var self=this;
  1401. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1402. return $core.withContext(function($ctx1) {
  1403. //>>excludeEnd("ctx");
  1404. $recv(aCollection)._do_(aBlock);
  1405. return self;
  1406. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1407. }, function($ctx1) {$ctx1.fill(self,"do:on:displaying:",{aBlock:aBlock,aCollection:aCollection,aString:aString},$globals.NullProgressHandler)});
  1408. //>>excludeEnd("ctx");
  1409. },
  1410. //>>excludeStart("ide", pragmas.excludeIdeData);
  1411. args: ["aBlock", "aCollection", "aString"],
  1412. source: "do: aBlock on: aCollection displaying: aString\x0a\x09aCollection do: aBlock",
  1413. referencedClasses: [],
  1414. //>>excludeEnd("ide");
  1415. messageSends: ["do:"]
  1416. }),
  1417. $globals.NullProgressHandler);
  1418. $globals.NullProgressHandler.klass.iVarNames = ['current'];
  1419. $core.addMethod(
  1420. $core.method({
  1421. selector: "initialize",
  1422. protocol: 'initialization',
  1423. fn: function (){
  1424. var self=this;
  1425. function $ProgressHandler(){return $globals.ProgressHandler||(typeof ProgressHandler=="undefined"?nil:ProgressHandler)}
  1426. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1427. return $core.withContext(function($ctx1) {
  1428. //>>excludeEnd("ctx");
  1429. $recv($ProgressHandler())._registerIfNone_(self._new());
  1430. return self;
  1431. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1432. }, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.NullProgressHandler.klass)});
  1433. //>>excludeEnd("ctx");
  1434. },
  1435. //>>excludeStart("ide", pragmas.excludeIdeData);
  1436. args: [],
  1437. source: "initialize\x0a\x09ProgressHandler registerIfNone: self new",
  1438. referencedClasses: ["ProgressHandler"],
  1439. //>>excludeEnd("ide");
  1440. messageSends: ["registerIfNone:", "new"]
  1441. }),
  1442. $globals.NullProgressHandler.klass);
  1443. $core.addClass('PlatformInterface', $globals.Object, [], 'Platform-Services');
  1444. //>>excludeStart("ide", pragmas.excludeIdeData);
  1445. $globals.PlatformInterface.comment="I am single entry point to UI and environment interface.\x0aMy `initialize` tries several options (for now, browser environment only) to set myself up.\x0a\x0a## API\x0a\x0a PlatformInterface alert: 'Hey, there is a problem'.\x0a PlatformInterface confirm: 'Affirmative?'.\x0a PlatformInterface prompt: 'Your name:'.\x0a\x0a PlatformInterface ajax: #{\x0a 'url' -> '/patch.js'. 'type' -> 'GET'. dataType->'script'\x0a }.";
  1446. //>>excludeEnd("ide");
  1447. $globals.PlatformInterface.klass.iVarNames = ['worker'];
  1448. $core.addMethod(
  1449. $core.method({
  1450. selector: "ajax:",
  1451. protocol: 'actions',
  1452. fn: function (anObject){
  1453. var self=this;
  1454. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1455. return $core.withContext(function($ctx1) {
  1456. //>>excludeEnd("ctx");
  1457. var $2,$1,$receiver;
  1458. self._deprecatedAPI_("Use newXhr or dedicated library.");
  1459. $2=self["@worker"];
  1460. if(($receiver = $2) == null || $receiver.isNil){
  1461. $1=self._error_("ajax: not available");
  1462. } else {
  1463. $1=$recv(self["@worker"])._ajax_(anObject);
  1464. };
  1465. return $1;
  1466. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1467. }, function($ctx1) {$ctx1.fill(self,"ajax:",{anObject:anObject},$globals.PlatformInterface.klass)});
  1468. //>>excludeEnd("ctx");
  1469. },
  1470. //>>excludeStart("ide", pragmas.excludeIdeData);
  1471. args: ["anObject"],
  1472. source: "ajax: anObject\x0a\x09self deprecatedAPI: 'Use newXhr or dedicated library.'.\x0a\x09^ worker\x0a\x09\x09ifNotNil: [ worker ajax: anObject ]\x0a\x09\x09ifNil: [ self error: 'ajax: not available' ]",
  1473. referencedClasses: [],
  1474. //>>excludeEnd("ide");
  1475. messageSends: ["deprecatedAPI:", "ifNotNil:ifNil:", "ajax:", "error:"]
  1476. }),
  1477. $globals.PlatformInterface.klass);
  1478. $core.addMethod(
  1479. $core.method({
  1480. selector: "alert:",
  1481. protocol: 'actions',
  1482. fn: function (aString){
  1483. var self=this;
  1484. function $Terminal(){return $globals.Terminal||(typeof Terminal=="undefined"?nil:Terminal)}
  1485. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1486. return $core.withContext(function($ctx1) {
  1487. //>>excludeEnd("ctx");
  1488. var $1;
  1489. self._deprecatedAPI_("Use Terminal alert:");
  1490. $1=$recv($Terminal())._alert_(aString);
  1491. return $1;
  1492. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1493. }, function($ctx1) {$ctx1.fill(self,"alert:",{aString:aString},$globals.PlatformInterface.klass)});
  1494. //>>excludeEnd("ctx");
  1495. },
  1496. //>>excludeStart("ide", pragmas.excludeIdeData);
  1497. args: ["aString"],
  1498. source: "alert: aString\x0a\x09self deprecatedAPI: 'Use Terminal alert:'.\x0a\x09^ Terminal alert: aString",
  1499. referencedClasses: ["Terminal"],
  1500. //>>excludeEnd("ide");
  1501. messageSends: ["deprecatedAPI:", "alert:"]
  1502. }),
  1503. $globals.PlatformInterface.klass);
  1504. $core.addMethod(
  1505. $core.method({
  1506. selector: "confirm:",
  1507. protocol: 'actions',
  1508. fn: function (aString){
  1509. var self=this;
  1510. function $Terminal(){return $globals.Terminal||(typeof Terminal=="undefined"?nil:Terminal)}
  1511. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1512. return $core.withContext(function($ctx1) {
  1513. //>>excludeEnd("ctx");
  1514. var $1;
  1515. self._deprecatedAPI_("Use Terminal confirm:");
  1516. $1=$recv($Terminal())._confirm_(aString);
  1517. return $1;
  1518. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1519. }, function($ctx1) {$ctx1.fill(self,"confirm:",{aString:aString},$globals.PlatformInterface.klass)});
  1520. //>>excludeEnd("ctx");
  1521. },
  1522. //>>excludeStart("ide", pragmas.excludeIdeData);
  1523. args: ["aString"],
  1524. source: "confirm: aString\x0a\x09self deprecatedAPI: 'Use Terminal confirm:'.\x0a\x09^ Terminal confirm: aString",
  1525. referencedClasses: ["Terminal"],
  1526. //>>excludeEnd("ide");
  1527. messageSends: ["deprecatedAPI:", "confirm:"]
  1528. }),
  1529. $globals.PlatformInterface.klass);
  1530. $core.addMethod(
  1531. $core.method({
  1532. selector: "existsGlobal:",
  1533. protocol: 'actions',
  1534. fn: function (aString){
  1535. var self=this;
  1536. function $PlatformInterface(){return $globals.PlatformInterface||(typeof PlatformInterface=="undefined"?nil:PlatformInterface)}
  1537. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1538. return $core.withContext(function($ctx1) {
  1539. //>>excludeEnd("ctx");
  1540. var $1;
  1541. $1=$recv($recv($PlatformInterface())._globals())._at_ifPresent_ifAbsent_(aString,(function(){
  1542. return true;
  1543. }),(function(){
  1544. return false;
  1545. }));
  1546. return $1;
  1547. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1548. }, function($ctx1) {$ctx1.fill(self,"existsGlobal:",{aString:aString},$globals.PlatformInterface.klass)});
  1549. //>>excludeEnd("ctx");
  1550. },
  1551. //>>excludeStart("ide", pragmas.excludeIdeData);
  1552. args: ["aString"],
  1553. source: "existsGlobal: aString\x0a\x09^ PlatformInterface globals \x0a\x09\x09at: aString \x0a\x09\x09ifPresent: [ true ] \x0a\x09\x09ifAbsent: [ false ]",
  1554. referencedClasses: ["PlatformInterface"],
  1555. //>>excludeEnd("ide");
  1556. messageSends: ["at:ifPresent:ifAbsent:", "globals"]
  1557. }),
  1558. $globals.PlatformInterface.klass);
  1559. $core.addMethod(
  1560. $core.method({
  1561. selector: "globals",
  1562. protocol: 'accessing',
  1563. fn: function (){
  1564. var self=this;
  1565. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1566. return $core.withContext(function($ctx1) {
  1567. //>>excludeEnd("ctx");
  1568. return (new Function('return this'))();;
  1569. return self;
  1570. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1571. }, function($ctx1) {$ctx1.fill(self,"globals",{},$globals.PlatformInterface.klass)});
  1572. //>>excludeEnd("ctx");
  1573. },
  1574. //>>excludeStart("ide", pragmas.excludeIdeData);
  1575. args: [],
  1576. source: "globals\x0a\x09<return (new Function('return this'))();>",
  1577. referencedClasses: [],
  1578. //>>excludeEnd("ide");
  1579. messageSends: []
  1580. }),
  1581. $globals.PlatformInterface.klass);
  1582. $core.addMethod(
  1583. $core.method({
  1584. selector: "initialize",
  1585. protocol: 'initialization',
  1586. fn: function (){
  1587. var self=this;
  1588. var candidate;
  1589. function $BrowserInterface(){return $globals.BrowserInterface||(typeof BrowserInterface=="undefined"?nil:BrowserInterface)}
  1590. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1591. return $core.withContext(function($ctx1) {
  1592. //>>excludeEnd("ctx");
  1593. var $1,$receiver;
  1594. (
  1595. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1596. $ctx1.supercall = true,
  1597. //>>excludeEnd("ctx");
  1598. $globals.PlatformInterface.klass.superclass.fn.prototype._initialize.apply($recv(self), []));
  1599. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1600. $ctx1.supercall = false;
  1601. //>>excludeEnd("ctx");;
  1602. if(($receiver = $BrowserInterface()) == null || $receiver.isNil){
  1603. $BrowserInterface();
  1604. } else {
  1605. candidate=$recv($BrowserInterface())._new();
  1606. candidate;
  1607. $1=$recv(candidate)._isAvailable();
  1608. if($core.assert($1)){
  1609. self._setWorker_(candidate);
  1610. return self;
  1611. };
  1612. };
  1613. return self;
  1614. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1615. }, function($ctx1) {$ctx1.fill(self,"initialize",{candidate:candidate},$globals.PlatformInterface.klass)});
  1616. //>>excludeEnd("ctx");
  1617. },
  1618. //>>excludeStart("ide", pragmas.excludeIdeData);
  1619. args: [],
  1620. source: "initialize\x0a\x09| candidate |\x0a\x09\x0a\x09super initialize.\x0a\x09\x0a\x09BrowserInterface ifNotNil: [\x0a\x09\x09candidate := BrowserInterface new.\x0a\x09\x09candidate isAvailable ifTrue: [ self setWorker: candidate. ^ self ]\x0a\x09]",
  1621. referencedClasses: ["BrowserInterface"],
  1622. //>>excludeEnd("ide");
  1623. messageSends: ["initialize", "ifNotNil:", "new", "ifTrue:", "isAvailable", "setWorker:"]
  1624. }),
  1625. $globals.PlatformInterface.klass);
  1626. $core.addMethod(
  1627. $core.method({
  1628. selector: "newXhr",
  1629. protocol: 'actions',
  1630. fn: function (){
  1631. var self=this;
  1632. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1633. return $core.withContext(function($ctx1) {
  1634. //>>excludeEnd("ctx");
  1635. var $2,$1,$receiver;
  1636. $2=self["@worker"];
  1637. if(($receiver = $2) == null || $receiver.isNil){
  1638. $1=self._error_("newXhr: not available");
  1639. } else {
  1640. $1=$recv(self["@worker"])._newXhr();
  1641. };
  1642. return $1;
  1643. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1644. }, function($ctx1) {$ctx1.fill(self,"newXhr",{},$globals.PlatformInterface.klass)});
  1645. //>>excludeEnd("ctx");
  1646. },
  1647. //>>excludeStart("ide", pragmas.excludeIdeData);
  1648. args: [],
  1649. source: "newXhr\x0a\x09^ worker\x0a\x09\x09ifNotNil: [ worker newXhr ]\x0a\x09\x09ifNil: [ self error: 'newXhr: not available' ]",
  1650. referencedClasses: [],
  1651. //>>excludeEnd("ide");
  1652. messageSends: ["ifNotNil:ifNil:", "newXhr", "error:"]
  1653. }),
  1654. $globals.PlatformInterface.klass);
  1655. $core.addMethod(
  1656. $core.method({
  1657. selector: "prompt:",
  1658. protocol: 'actions',
  1659. fn: function (aString){
  1660. var self=this;
  1661. function $Terminal(){return $globals.Terminal||(typeof Terminal=="undefined"?nil:Terminal)}
  1662. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1663. return $core.withContext(function($ctx1) {
  1664. //>>excludeEnd("ctx");
  1665. var $1;
  1666. self._deprecatedAPI_("Use Terminal prompt:");
  1667. $1=$recv($Terminal())._prompt_(aString);
  1668. return $1;
  1669. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1670. }, function($ctx1) {$ctx1.fill(self,"prompt:",{aString:aString},$globals.PlatformInterface.klass)});
  1671. //>>excludeEnd("ctx");
  1672. },
  1673. //>>excludeStart("ide", pragmas.excludeIdeData);
  1674. args: ["aString"],
  1675. source: "prompt: aString\x0a\x09self deprecatedAPI: 'Use Terminal prompt:'.\x0a\x09^ Terminal prompt: aString",
  1676. referencedClasses: ["Terminal"],
  1677. //>>excludeEnd("ide");
  1678. messageSends: ["deprecatedAPI:", "prompt:"]
  1679. }),
  1680. $globals.PlatformInterface.klass);
  1681. $core.addMethod(
  1682. $core.method({
  1683. selector: "prompt:default:",
  1684. protocol: 'actions',
  1685. fn: function (aString,defaultString){
  1686. var self=this;
  1687. function $Terminal(){return $globals.Terminal||(typeof Terminal=="undefined"?nil:Terminal)}
  1688. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1689. return $core.withContext(function($ctx1) {
  1690. //>>excludeEnd("ctx");
  1691. var $1;
  1692. self._deprecatedAPI_("Use Terminal prompt:default:");
  1693. $1=$recv($Terminal())._prompt_default_(aString,defaultString);
  1694. return $1;
  1695. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1696. }, function($ctx1) {$ctx1.fill(self,"prompt:default:",{aString:aString,defaultString:defaultString},$globals.PlatformInterface.klass)});
  1697. //>>excludeEnd("ctx");
  1698. },
  1699. //>>excludeStart("ide", pragmas.excludeIdeData);
  1700. args: ["aString", "defaultString"],
  1701. source: "prompt: aString default: defaultString\x0a\x09self deprecatedAPI: 'Use Terminal prompt:default:'.\x0a\x09^ Terminal prompt: aString default: defaultString",
  1702. referencedClasses: ["Terminal"],
  1703. //>>excludeEnd("ide");
  1704. messageSends: ["deprecatedAPI:", "prompt:default:"]
  1705. }),
  1706. $globals.PlatformInterface.klass);
  1707. $core.addMethod(
  1708. $core.method({
  1709. selector: "setWorker:",
  1710. protocol: 'accessing',
  1711. fn: function (anObject){
  1712. var self=this;
  1713. self["@worker"]=anObject;
  1714. return self;
  1715. },
  1716. //>>excludeStart("ide", pragmas.excludeIdeData);
  1717. args: ["anObject"],
  1718. source: "setWorker: anObject\x0a\x09worker := anObject",
  1719. referencedClasses: [],
  1720. //>>excludeEnd("ide");
  1721. messageSends: []
  1722. }),
  1723. $globals.PlatformInterface.klass);
  1724. $core.addClass('Service', $globals.Object, [], 'Platform-Services');
  1725. //>>excludeStart("ide", pragmas.excludeIdeData);
  1726. $globals.Service.comment="I implement the basic behavior for class registration to a service.\x0a\x0aSee the `Transcript` class for a concrete service.\x0a\x0a## API\x0a\x0aUse class-side methods `#register:` and `#registerIfNone:` to register classes to a specific service.";
  1727. //>>excludeEnd("ide");
  1728. $globals.Service.klass.iVarNames = ['current'];
  1729. $core.addMethod(
  1730. $core.method({
  1731. selector: "current",
  1732. protocol: 'accessing',
  1733. fn: function (){
  1734. var self=this;
  1735. var $1;
  1736. $1=self["@current"];
  1737. return $1;
  1738. },
  1739. //>>excludeStart("ide", pragmas.excludeIdeData);
  1740. args: [],
  1741. source: "current\x0a\x09^ current",
  1742. referencedClasses: [],
  1743. //>>excludeEnd("ide");
  1744. messageSends: []
  1745. }),
  1746. $globals.Service.klass);
  1747. $core.addMethod(
  1748. $core.method({
  1749. selector: "new",
  1750. protocol: 'instance creation',
  1751. fn: function (){
  1752. var self=this;
  1753. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1754. return $core.withContext(function($ctx1) {
  1755. //>>excludeEnd("ctx");
  1756. self._shouldNotImplement();
  1757. return self;
  1758. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1759. }, function($ctx1) {$ctx1.fill(self,"new",{},$globals.Service.klass)});
  1760. //>>excludeEnd("ctx");
  1761. },
  1762. //>>excludeStart("ide", pragmas.excludeIdeData);
  1763. args: [],
  1764. source: "new\x0a\x09self shouldNotImplement",
  1765. referencedClasses: [],
  1766. //>>excludeEnd("ide");
  1767. messageSends: ["shouldNotImplement"]
  1768. }),
  1769. $globals.Service.klass);
  1770. $core.addMethod(
  1771. $core.method({
  1772. selector: "register:",
  1773. protocol: 'registration',
  1774. fn: function (anObject){
  1775. var self=this;
  1776. self["@current"]=anObject;
  1777. return self;
  1778. },
  1779. //>>excludeStart("ide", pragmas.excludeIdeData);
  1780. args: ["anObject"],
  1781. source: "register: anObject\x0a\x09current := anObject",
  1782. referencedClasses: [],
  1783. //>>excludeEnd("ide");
  1784. messageSends: []
  1785. }),
  1786. $globals.Service.klass);
  1787. $core.addMethod(
  1788. $core.method({
  1789. selector: "registerIfNone:",
  1790. protocol: 'registration',
  1791. fn: function (anObject){
  1792. var self=this;
  1793. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1794. return $core.withContext(function($ctx1) {
  1795. //>>excludeEnd("ctx");
  1796. var $1,$receiver;
  1797. $1=self._current();
  1798. if(($receiver = $1) == null || $receiver.isNil){
  1799. self._register_(anObject);
  1800. } else {
  1801. $1;
  1802. };
  1803. return self;
  1804. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1805. }, function($ctx1) {$ctx1.fill(self,"registerIfNone:",{anObject:anObject},$globals.Service.klass)});
  1806. //>>excludeEnd("ctx");
  1807. },
  1808. //>>excludeStart("ide", pragmas.excludeIdeData);
  1809. args: ["anObject"],
  1810. source: "registerIfNone: anObject\x0a\x09self current ifNil: [ self register: anObject ]",
  1811. referencedClasses: [],
  1812. //>>excludeEnd("ide");
  1813. messageSends: ["ifNil:", "current", "register:"]
  1814. }),
  1815. $globals.Service.klass);
  1816. $core.addClass('ErrorHandler', $globals.Service, [], 'Platform-Services');
  1817. //>>excludeStart("ide", pragmas.excludeIdeData);
  1818. $globals.ErrorHandler.comment="I am the service used to handle Smalltalk errors.\x0aSee `boot.js` `handleError()` function.\x0a\x0aRegistered service instances must implement `#handleError:` to perform an action on the thrown exception.";
  1819. //>>excludeEnd("ide");
  1820. $core.addMethod(
  1821. $core.method({
  1822. selector: "handleError:",
  1823. protocol: 'error handling',
  1824. fn: function (anError){
  1825. var self=this;
  1826. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1827. return $core.withContext(function($ctx1) {
  1828. //>>excludeEnd("ctx");
  1829. self._handleUnhandledError_(anError);
  1830. return self;
  1831. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1832. }, function($ctx1) {$ctx1.fill(self,"handleError:",{anError:anError},$globals.ErrorHandler.klass)});
  1833. //>>excludeEnd("ctx");
  1834. },
  1835. //>>excludeStart("ide", pragmas.excludeIdeData);
  1836. args: ["anError"],
  1837. source: "handleError: anError\x0a\x09self handleUnhandledError: anError",
  1838. referencedClasses: [],
  1839. //>>excludeEnd("ide");
  1840. messageSends: ["handleUnhandledError:"]
  1841. }),
  1842. $globals.ErrorHandler.klass);
  1843. $core.addMethod(
  1844. $core.method({
  1845. selector: "handleUnhandledError:",
  1846. protocol: 'error handling',
  1847. fn: function (anError){
  1848. var self=this;
  1849. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1850. return $core.withContext(function($ctx1) {
  1851. //>>excludeEnd("ctx");
  1852. var $1,$2;
  1853. $1=$recv(anError)._wasHandled();
  1854. if($core.assert($1)){
  1855. return self;
  1856. };
  1857. $2=$recv(self._current())._handleError_(anError);
  1858. return $2;
  1859. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1860. }, function($ctx1) {$ctx1.fill(self,"handleUnhandledError:",{anError:anError},$globals.ErrorHandler.klass)});
  1861. //>>excludeEnd("ctx");
  1862. },
  1863. //>>excludeStart("ide", pragmas.excludeIdeData);
  1864. args: ["anError"],
  1865. source: "handleUnhandledError: anError\x0a\x09anError wasHandled ifTrue: [ ^ self ].\x0a\x09\x0a\x09^ self current handleError: anError",
  1866. referencedClasses: [],
  1867. //>>excludeEnd("ide");
  1868. messageSends: ["ifTrue:", "wasHandled", "handleError:", "current"]
  1869. }),
  1870. $globals.ErrorHandler.klass);
  1871. $core.addClass('Finder', $globals.Service, [], 'Platform-Services');
  1872. //>>excludeStart("ide", pragmas.excludeIdeData);
  1873. $globals.Finder.comment="I am the service responsible for finding classes/methods.\x0a__There is no default finder.__\x0a\x0a## API\x0a\x0aUse `#browse` on an object to find it.";
  1874. //>>excludeEnd("ide");
  1875. $core.addMethod(
  1876. $core.method({
  1877. selector: "findClass:",
  1878. protocol: 'finding',
  1879. fn: function (aClass){
  1880. var self=this;
  1881. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1882. return $core.withContext(function($ctx1) {
  1883. //>>excludeEnd("ctx");
  1884. var $1;
  1885. $1=$recv(self._current())._findClass_(aClass);
  1886. return $1;
  1887. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1888. }, function($ctx1) {$ctx1.fill(self,"findClass:",{aClass:aClass},$globals.Finder.klass)});
  1889. //>>excludeEnd("ctx");
  1890. },
  1891. //>>excludeStart("ide", pragmas.excludeIdeData);
  1892. args: ["aClass"],
  1893. source: "findClass: aClass\x0a\x09^ self current findClass: aClass",
  1894. referencedClasses: [],
  1895. //>>excludeEnd("ide");
  1896. messageSends: ["findClass:", "current"]
  1897. }),
  1898. $globals.Finder.klass);
  1899. $core.addMethod(
  1900. $core.method({
  1901. selector: "findMethod:",
  1902. protocol: 'finding',
  1903. fn: function (aCompiledMethod){
  1904. var self=this;
  1905. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1906. return $core.withContext(function($ctx1) {
  1907. //>>excludeEnd("ctx");
  1908. var $1;
  1909. $1=$recv(self._current())._findMethod_(aCompiledMethod);
  1910. return $1;
  1911. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1912. }, function($ctx1) {$ctx1.fill(self,"findMethod:",{aCompiledMethod:aCompiledMethod},$globals.Finder.klass)});
  1913. //>>excludeEnd("ctx");
  1914. },
  1915. //>>excludeStart("ide", pragmas.excludeIdeData);
  1916. args: ["aCompiledMethod"],
  1917. source: "findMethod: aCompiledMethod\x0a\x09^ self current findMethod: aCompiledMethod",
  1918. referencedClasses: [],
  1919. //>>excludeEnd("ide");
  1920. messageSends: ["findMethod:", "current"]
  1921. }),
  1922. $globals.Finder.klass);
  1923. $core.addMethod(
  1924. $core.method({
  1925. selector: "findString:",
  1926. protocol: 'finding',
  1927. fn: function (aString){
  1928. var self=this;
  1929. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1930. return $core.withContext(function($ctx1) {
  1931. //>>excludeEnd("ctx");
  1932. var $1;
  1933. $1=$recv(self._current())._findString_(aString);
  1934. return $1;
  1935. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1936. }, function($ctx1) {$ctx1.fill(self,"findString:",{aString:aString},$globals.Finder.klass)});
  1937. //>>excludeEnd("ctx");
  1938. },
  1939. //>>excludeStart("ide", pragmas.excludeIdeData);
  1940. args: ["aString"],
  1941. source: "findString: aString\x0a\x09^ self current findString: aString",
  1942. referencedClasses: [],
  1943. //>>excludeEnd("ide");
  1944. messageSends: ["findString:", "current"]
  1945. }),
  1946. $globals.Finder.klass);
  1947. $core.addClass('Inspector', $globals.Service, [], 'Platform-Services');
  1948. //>>excludeStart("ide", pragmas.excludeIdeData);
  1949. $globals.Inspector.comment="I am the service responsible for inspecting objects.\x0a\x0aThe default inspector object is the transcript.";
  1950. //>>excludeEnd("ide");
  1951. $core.addMethod(
  1952. $core.method({
  1953. selector: "inspect:",
  1954. protocol: 'inspecting',
  1955. fn: function (anObject){
  1956. var self=this;
  1957. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1958. return $core.withContext(function($ctx1) {
  1959. //>>excludeEnd("ctx");
  1960. var $1;
  1961. $1=$recv(self._current())._inspect_(anObject);
  1962. return $1;
  1963. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1964. }, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},$globals.Inspector.klass)});
  1965. //>>excludeEnd("ctx");
  1966. },
  1967. //>>excludeStart("ide", pragmas.excludeIdeData);
  1968. args: ["anObject"],
  1969. source: "inspect: anObject\x0a\x09^ self current inspect: anObject",
  1970. referencedClasses: [],
  1971. //>>excludeEnd("ide");
  1972. messageSends: ["inspect:", "current"]
  1973. }),
  1974. $globals.Inspector.klass);
  1975. $core.addClass('ProgressHandler', $globals.Service, [], 'Platform-Services');
  1976. //>>excludeStart("ide", pragmas.excludeIdeData);
  1977. $globals.ProgressHandler.comment="I am used to manage progress in collection iterations, see `SequenceableCollection >> #do:displayingProgress:`.\x0a\x0aRegistered instances must implement `#do:on:displaying:`.\x0a\x0aThe default behavior is to simply iterate over the collection, using `NullProgressHandler`.";
  1978. //>>excludeEnd("ide");
  1979. $core.addMethod(
  1980. $core.method({
  1981. selector: "do:on:displaying:",
  1982. protocol: 'progress handling',
  1983. fn: function (aBlock,aCollection,aString){
  1984. var self=this;
  1985. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1986. return $core.withContext(function($ctx1) {
  1987. //>>excludeEnd("ctx");
  1988. $recv(self._current())._do_on_displaying_(aBlock,aCollection,aString);
  1989. return self;
  1990. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1991. }, function($ctx1) {$ctx1.fill(self,"do:on:displaying:",{aBlock:aBlock,aCollection:aCollection,aString:aString},$globals.ProgressHandler.klass)});
  1992. //>>excludeEnd("ctx");
  1993. },
  1994. //>>excludeStart("ide", pragmas.excludeIdeData);
  1995. args: ["aBlock", "aCollection", "aString"],
  1996. source: "do: aBlock on: aCollection displaying: aString\x0a\x09self current do: aBlock on: aCollection displaying: aString",
  1997. referencedClasses: [],
  1998. //>>excludeEnd("ide");
  1999. messageSends: ["do:on:displaying:", "current"]
  2000. }),
  2001. $globals.ProgressHandler.klass);
  2002. $core.addClass('Terminal', $globals.Service, [], 'Platform-Services');
  2003. //>>excludeStart("ide", pragmas.excludeIdeData);
  2004. $globals.Terminal.comment="I am UI interface service.\x0a\x0a## API\x0a\x0a Terminal alert: 'Hey, there is a problem'.\x0a Terminal confirm: 'Affirmative?'.\x0a Terminal prompt: 'Your name:'.";
  2005. //>>excludeEnd("ide");
  2006. $core.addMethod(
  2007. $core.method({
  2008. selector: "alert:",
  2009. protocol: 'dialogs',
  2010. fn: function (aString){
  2011. var self=this;
  2012. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2013. return $core.withContext(function($ctx1) {
  2014. //>>excludeEnd("ctx");
  2015. var $1;
  2016. $1=$recv(self._current())._alert_(aString);
  2017. return $1;
  2018. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2019. }, function($ctx1) {$ctx1.fill(self,"alert:",{aString:aString},$globals.Terminal.klass)});
  2020. //>>excludeEnd("ctx");
  2021. },
  2022. //>>excludeStart("ide", pragmas.excludeIdeData);
  2023. args: ["aString"],
  2024. source: "alert: aString\x0a\x09^ self current alert: aString",
  2025. referencedClasses: [],
  2026. //>>excludeEnd("ide");
  2027. messageSends: ["alert:", "current"]
  2028. }),
  2029. $globals.Terminal.klass);
  2030. $core.addMethod(
  2031. $core.method({
  2032. selector: "confirm:",
  2033. protocol: 'dialogs',
  2034. fn: function (aString){
  2035. var self=this;
  2036. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2037. return $core.withContext(function($ctx1) {
  2038. //>>excludeEnd("ctx");
  2039. var $1;
  2040. $1=$recv(self._current())._confirm_(aString);
  2041. return $1;
  2042. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2043. }, function($ctx1) {$ctx1.fill(self,"confirm:",{aString:aString},$globals.Terminal.klass)});
  2044. //>>excludeEnd("ctx");
  2045. },
  2046. //>>excludeStart("ide", pragmas.excludeIdeData);
  2047. args: ["aString"],
  2048. source: "confirm: aString\x0a\x09^ self current confirm: aString",
  2049. referencedClasses: [],
  2050. //>>excludeEnd("ide");
  2051. messageSends: ["confirm:", "current"]
  2052. }),
  2053. $globals.Terminal.klass);
  2054. $core.addMethod(
  2055. $core.method({
  2056. selector: "prompt:",
  2057. protocol: 'dialogs',
  2058. fn: function (aString){
  2059. var self=this;
  2060. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2061. return $core.withContext(function($ctx1) {
  2062. //>>excludeEnd("ctx");
  2063. var $1;
  2064. $1=$recv(self._current())._prompt_(aString);
  2065. return $1;
  2066. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2067. }, function($ctx1) {$ctx1.fill(self,"prompt:",{aString:aString},$globals.Terminal.klass)});
  2068. //>>excludeEnd("ctx");
  2069. },
  2070. //>>excludeStart("ide", pragmas.excludeIdeData);
  2071. args: ["aString"],
  2072. source: "prompt: aString\x0a\x09^ self current prompt: aString",
  2073. referencedClasses: [],
  2074. //>>excludeEnd("ide");
  2075. messageSends: ["prompt:", "current"]
  2076. }),
  2077. $globals.Terminal.klass);
  2078. $core.addMethod(
  2079. $core.method({
  2080. selector: "prompt:default:",
  2081. protocol: 'dialogs',
  2082. fn: function (aString,defaultString){
  2083. var self=this;
  2084. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2085. return $core.withContext(function($ctx1) {
  2086. //>>excludeEnd("ctx");
  2087. var $1;
  2088. $1=$recv(self._current())._prompt_default_(aString,defaultString);
  2089. return $1;
  2090. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2091. }, function($ctx1) {$ctx1.fill(self,"prompt:default:",{aString:aString,defaultString:defaultString},$globals.Terminal.klass)});
  2092. //>>excludeEnd("ctx");
  2093. },
  2094. //>>excludeStart("ide", pragmas.excludeIdeData);
  2095. args: ["aString", "defaultString"],
  2096. source: "prompt: aString default: defaultString\x0a\x09^ self current prompt: aString default: defaultString",
  2097. referencedClasses: [],
  2098. //>>excludeEnd("ide");
  2099. messageSends: ["prompt:default:", "current"]
  2100. }),
  2101. $globals.Terminal.klass);
  2102. $core.addClass('Transcript', $globals.Service, [], 'Platform-Services');
  2103. //>>excludeStart("ide", pragmas.excludeIdeData);
  2104. $globals.Transcript.comment="I am a facade for Transcript actions.\x0a\x0aI delegate actions to the currently registered transcript.\x0a\x0a## API\x0a\x0a Transcript \x0a show: 'hello world';\x0a cr;\x0a show: anObject.";
  2105. //>>excludeEnd("ide");
  2106. $core.addMethod(
  2107. $core.method({
  2108. selector: "clear",
  2109. protocol: 'printing',
  2110. fn: function (){
  2111. var self=this;
  2112. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2113. return $core.withContext(function($ctx1) {
  2114. //>>excludeEnd("ctx");
  2115. $recv(self._current())._clear();
  2116. return self;
  2117. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2118. }, function($ctx1) {$ctx1.fill(self,"clear",{},$globals.Transcript.klass)});
  2119. //>>excludeEnd("ctx");
  2120. },
  2121. //>>excludeStart("ide", pragmas.excludeIdeData);
  2122. args: [],
  2123. source: "clear\x0a\x09self current clear",
  2124. referencedClasses: [],
  2125. //>>excludeEnd("ide");
  2126. messageSends: ["clear", "current"]
  2127. }),
  2128. $globals.Transcript.klass);
  2129. $core.addMethod(
  2130. $core.method({
  2131. selector: "cr",
  2132. protocol: 'printing',
  2133. fn: function (){
  2134. var self=this;
  2135. function $String(){return $globals.String||(typeof String=="undefined"?nil:String)}
  2136. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2137. return $core.withContext(function($ctx1) {
  2138. //>>excludeEnd("ctx");
  2139. $recv(self._current())._show_($recv($String())._cr());
  2140. return self;
  2141. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2142. }, function($ctx1) {$ctx1.fill(self,"cr",{},$globals.Transcript.klass)});
  2143. //>>excludeEnd("ctx");
  2144. },
  2145. //>>excludeStart("ide", pragmas.excludeIdeData);
  2146. args: [],
  2147. source: "cr\x0a\x09self current show: String cr",
  2148. referencedClasses: ["String"],
  2149. //>>excludeEnd("ide");
  2150. messageSends: ["show:", "current", "cr"]
  2151. }),
  2152. $globals.Transcript.klass);
  2153. $core.addMethod(
  2154. $core.method({
  2155. selector: "inspect:",
  2156. protocol: 'printing',
  2157. fn: function (anObject){
  2158. var self=this;
  2159. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2160. return $core.withContext(function($ctx1) {
  2161. //>>excludeEnd("ctx");
  2162. self._show_(anObject);
  2163. return self;
  2164. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2165. }, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},$globals.Transcript.klass)});
  2166. //>>excludeEnd("ctx");
  2167. },
  2168. //>>excludeStart("ide", pragmas.excludeIdeData);
  2169. args: ["anObject"],
  2170. source: "inspect: anObject\x0a\x09self show: anObject",
  2171. referencedClasses: [],
  2172. //>>excludeEnd("ide");
  2173. messageSends: ["show:"]
  2174. }),
  2175. $globals.Transcript.klass);
  2176. $core.addMethod(
  2177. $core.method({
  2178. selector: "open",
  2179. protocol: 'instance creation',
  2180. fn: function (){
  2181. var self=this;
  2182. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2183. return $core.withContext(function($ctx1) {
  2184. //>>excludeEnd("ctx");
  2185. $recv(self._current())._open();
  2186. return self;
  2187. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2188. }, function($ctx1) {$ctx1.fill(self,"open",{},$globals.Transcript.klass)});
  2189. //>>excludeEnd("ctx");
  2190. },
  2191. //>>excludeStart("ide", pragmas.excludeIdeData);
  2192. args: [],
  2193. source: "open\x0a\x09self current open",
  2194. referencedClasses: [],
  2195. //>>excludeEnd("ide");
  2196. messageSends: ["open", "current"]
  2197. }),
  2198. $globals.Transcript.klass);
  2199. $core.addMethod(
  2200. $core.method({
  2201. selector: "show:",
  2202. protocol: 'printing',
  2203. fn: function (anObject){
  2204. var self=this;
  2205. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2206. return $core.withContext(function($ctx1) {
  2207. //>>excludeEnd("ctx");
  2208. $recv(self._current())._show_(anObject);
  2209. return self;
  2210. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2211. }, function($ctx1) {$ctx1.fill(self,"show:",{anObject:anObject},$globals.Transcript.klass)});
  2212. //>>excludeEnd("ctx");
  2213. },
  2214. //>>excludeStart("ide", pragmas.excludeIdeData);
  2215. args: ["anObject"],
  2216. source: "show: anObject\x0a\x09self current show: anObject",
  2217. referencedClasses: [],
  2218. //>>excludeEnd("ide");
  2219. messageSends: ["show:", "current"]
  2220. }),
  2221. $globals.Transcript.klass);
  2222. $core.addMethod(
  2223. $core.method({
  2224. selector: "inspectOn:",
  2225. protocol: '*Platform-Services',
  2226. fn: function (anInspector){
  2227. var self=this;
  2228. var variables;
  2229. function $Dictionary(){return $globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  2230. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2231. return $core.withContext(function($ctx1) {
  2232. //>>excludeEnd("ctx");
  2233. var $1;
  2234. variables=$recv($Dictionary())._new();
  2235. $recv(variables)._at_put_("#self",self);
  2236. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2237. $ctx1.sendIdx["at:put:"]=1;
  2238. //>>excludeEnd("ctx");
  2239. $recv(variables)._at_put_("#keys",self._keys());
  2240. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2241. $ctx1.sendIdx["at:put:"]=2;
  2242. //>>excludeEnd("ctx");
  2243. self._keysAndValuesDo_((function(key,value){
  2244. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2245. return $core.withContext(function($ctx2) {
  2246. //>>excludeEnd("ctx");
  2247. return $recv(variables)._at_put_(key,value);
  2248. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2249. }, function($ctx2) {$ctx2.fillBlock({key:key,value:value},$ctx1,1)});
  2250. //>>excludeEnd("ctx");
  2251. }));
  2252. $recv(anInspector)._setLabel_(self._printString());
  2253. $1=$recv(anInspector)._setVariables_(variables);
  2254. return self;
  2255. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2256. }, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},$globals.AssociativeCollection)});
  2257. //>>excludeEnd("ctx");
  2258. },
  2259. //>>excludeStart("ide", pragmas.excludeIdeData);
  2260. args: ["anInspector"],
  2261. source: "inspectOn: anInspector\x0a\x09| variables |\x0a\x09variables := Dictionary new.\x0a\x09variables at: '#self' put: self.\x0a\x09variables at: '#keys' put: self keys.\x0a\x09self keysAndValuesDo: [ :key :value |\x0a\x09\x09variables at: key put: value ].\x0a\x09anInspector\x0a\x09\x09setLabel: self printString;\x0a\x09\x09setVariables: variables",
  2262. referencedClasses: ["Dictionary"],
  2263. //>>excludeEnd("ide");
  2264. messageSends: ["new", "at:put:", "keys", "keysAndValuesDo:", "setLabel:", "printString", "setVariables:"]
  2265. }),
  2266. $globals.AssociativeCollection);
  2267. $core.addMethod(
  2268. $core.method({
  2269. selector: "inspectOn:",
  2270. protocol: '*Platform-Services',
  2271. fn: function (anInspector){
  2272. var self=this;
  2273. var variables;
  2274. function $Dictionary(){return $globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  2275. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2276. return $core.withContext(function($ctx1) {
  2277. //>>excludeEnd("ctx");
  2278. var $1;
  2279. variables=$recv($Dictionary())._new();
  2280. $recv(variables)._at_put_("#self",self);
  2281. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2282. $ctx1.sendIdx["at:put:"]=1;
  2283. //>>excludeEnd("ctx");
  2284. self._withIndexDo_((function(each,i){
  2285. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2286. return $core.withContext(function($ctx2) {
  2287. //>>excludeEnd("ctx");
  2288. return $recv(variables)._at_put_(i,each);
  2289. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2290. }, function($ctx2) {$ctx2.fillBlock({each:each,i:i},$ctx1,1)});
  2291. //>>excludeEnd("ctx");
  2292. }));
  2293. $recv(anInspector)._setLabel_(self._printString());
  2294. $1=$recv(anInspector)._setVariables_(variables);
  2295. return self;
  2296. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2297. }, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},$globals.Collection)});
  2298. //>>excludeEnd("ctx");
  2299. },
  2300. //>>excludeStart("ide", pragmas.excludeIdeData);
  2301. args: ["anInspector"],
  2302. source: "inspectOn: anInspector\x0a\x09| variables |\x0a\x09variables := Dictionary new.\x0a\x09variables at: '#self' put: self.\x0a\x09self withIndexDo: [ :each :i |\x0a\x09\x09variables at: i put: each ].\x0a\x09anInspector\x0a\x09\x09setLabel: self printString;\x0a\x09\x09setVariables: variables",
  2303. referencedClasses: ["Dictionary"],
  2304. //>>excludeEnd("ide");
  2305. messageSends: ["new", "at:put:", "withIndexDo:", "setLabel:", "printString", "setVariables:"]
  2306. }),
  2307. $globals.Collection);
  2308. $core.addMethod(
  2309. $core.method({
  2310. selector: "inspectOn:",
  2311. protocol: '*Platform-Services',
  2312. fn: function (anInspector){
  2313. var self=this;
  2314. var variables;
  2315. function $Dictionary(){return $globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  2316. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2317. return $core.withContext(function($ctx1) {
  2318. //>>excludeEnd("ctx");
  2319. var $1;
  2320. variables=$recv($Dictionary())._new();
  2321. $recv(variables)._at_put_("#self",self);
  2322. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2323. $ctx1.sendIdx["at:put:"]=1;
  2324. //>>excludeEnd("ctx");
  2325. $recv(variables)._at_put_("#year",self._year());
  2326. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2327. $ctx1.sendIdx["at:put:"]=2;
  2328. //>>excludeEnd("ctx");
  2329. $recv(variables)._at_put_("#month",self._month());
  2330. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2331. $ctx1.sendIdx["at:put:"]=3;
  2332. //>>excludeEnd("ctx");
  2333. $recv(variables)._at_put_("#day",self._day());
  2334. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2335. $ctx1.sendIdx["at:put:"]=4;
  2336. //>>excludeEnd("ctx");
  2337. $recv(variables)._at_put_("#hours",self._hours());
  2338. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2339. $ctx1.sendIdx["at:put:"]=5;
  2340. //>>excludeEnd("ctx");
  2341. $recv(variables)._at_put_("#minutes",self._minutes());
  2342. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2343. $ctx1.sendIdx["at:put:"]=6;
  2344. //>>excludeEnd("ctx");
  2345. $recv(variables)._at_put_("#seconds",self._seconds());
  2346. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2347. $ctx1.sendIdx["at:put:"]=7;
  2348. //>>excludeEnd("ctx");
  2349. $recv(variables)._at_put_("#milliseconds",self._milliseconds());
  2350. $recv(anInspector)._setLabel_(self._printString());
  2351. $1=$recv(anInspector)._setVariables_(variables);
  2352. return self;
  2353. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2354. }, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},$globals.Date)});
  2355. //>>excludeEnd("ctx");
  2356. },
  2357. //>>excludeStart("ide", pragmas.excludeIdeData);
  2358. args: ["anInspector"],
  2359. source: "inspectOn: anInspector\x0a\x09| variables |\x0a\x09variables := Dictionary new.\x0a\x09variables at: '#self' put: self.\x0a\x09variables at: '#year' put: self year.\x0a\x09variables at: '#month' put: self month.\x0a\x09variables at: '#day' put: self day.\x0a\x09variables at: '#hours' put: self hours.\x0a\x09variables at: '#minutes' put: self minutes.\x0a\x09variables at: '#seconds' put: self seconds.\x0a\x09variables at: '#milliseconds' put: self milliseconds.\x0a\x09anInspector\x0a\x09\x09setLabel: self printString;\x0a\x09\x09setVariables: variables",
  2360. referencedClasses: ["Dictionary"],
  2361. //>>excludeEnd("ide");
  2362. messageSends: ["new", "at:put:", "year", "month", "day", "hours", "minutes", "seconds", "milliseconds", "setLabel:", "printString", "setVariables:"]
  2363. }),
  2364. $globals.Date);
  2365. $core.addMethod(
  2366. $core.method({
  2367. selector: "inspectOn:",
  2368. protocol: '*Platform-Services',
  2369. fn: function (anInspector){
  2370. var self=this;
  2371. var variables;
  2372. function $Dictionary(){return $globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  2373. function $JSObjectProxy(){return $globals.JSObjectProxy||(typeof JSObjectProxy=="undefined"?nil:JSObjectProxy)}
  2374. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2375. return $core.withContext(function($ctx1) {
  2376. //>>excludeEnd("ctx");
  2377. variables=$recv($Dictionary())._new();
  2378. $recv(variables)._at_put_("#self",self._jsObject());
  2379. $recv(anInspector)._setLabel_(self._printString());
  2380. $recv($JSObjectProxy())._addObjectVariablesTo_ofProxy_(variables,self);
  2381. $recv(anInspector)._setVariables_(variables);
  2382. return self;
  2383. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2384. }, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},$globals.JSObjectProxy)});
  2385. //>>excludeEnd("ctx");
  2386. },
  2387. //>>excludeStart("ide", pragmas.excludeIdeData);
  2388. args: ["anInspector"],
  2389. source: "inspectOn: anInspector\x0a\x09| variables |\x0a\x09variables := Dictionary new.\x0a\x09variables at: '#self' put: self jsObject.\x0a\x09anInspector setLabel: self printString.\x0a\x09JSObjectProxy addObjectVariablesTo: variables ofProxy: self.\x0a\x09anInspector setVariables: variables",
  2390. referencedClasses: ["Dictionary", "JSObjectProxy"],
  2391. //>>excludeEnd("ide");
  2392. messageSends: ["new", "at:put:", "jsObject", "setLabel:", "printString", "addObjectVariablesTo:ofProxy:", "setVariables:"]
  2393. }),
  2394. $globals.JSObjectProxy);
  2395. $core.addMethod(
  2396. $core.method({
  2397. selector: "inspectOn:",
  2398. protocol: '*Platform-Services',
  2399. fn: function (anInspector){
  2400. var self=this;
  2401. var variables;
  2402. function $Dictionary(){return $globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  2403. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2404. return $core.withContext(function($ctx1) {
  2405. //>>excludeEnd("ctx");
  2406. var $1;
  2407. variables=$recv($Dictionary())._new();
  2408. $recv(variables)._at_put_("#self",self);
  2409. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2410. $ctx1.sendIdx["at:put:"]=1;
  2411. //>>excludeEnd("ctx");
  2412. $recv(variables)._at_put_("#home",self._home());
  2413. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2414. $ctx1.sendIdx["at:put:"]=2;
  2415. //>>excludeEnd("ctx");
  2416. $recv(variables)._at_put_("#receiver",self._receiver());
  2417. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2418. $ctx1.sendIdx["at:put:"]=3;
  2419. //>>excludeEnd("ctx");
  2420. $recv(variables)._at_put_("#selector",self._selector());
  2421. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2422. $ctx1.sendIdx["at:put:"]=4;
  2423. //>>excludeEnd("ctx");
  2424. $recv(variables)._at_put_("#locals",self._locals());
  2425. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2426. $ctx1.sendIdx["at:put:"]=5;
  2427. //>>excludeEnd("ctx");
  2428. $recv($recv(self._class())._instanceVariableNames())._do_((function(each){
  2429. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2430. return $core.withContext(function($ctx2) {
  2431. //>>excludeEnd("ctx");
  2432. return $recv(variables)._at_put_(each,self._instVarAt_(each));
  2433. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2434. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  2435. //>>excludeEnd("ctx");
  2436. }));
  2437. $recv(anInspector)._setLabel_(self._printString());
  2438. $1=$recv(anInspector)._setVariables_(variables);
  2439. return self;
  2440. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2441. }, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},$globals.MethodContext)});
  2442. //>>excludeEnd("ctx");
  2443. },
  2444. //>>excludeStart("ide", pragmas.excludeIdeData);
  2445. args: ["anInspector"],
  2446. source: "inspectOn: anInspector\x0a\x09| variables |\x0a\x09variables := Dictionary new.\x0a\x09variables at: '#self' put: self.\x0a\x09variables at: '#home' put: self home.\x0a\x09variables at: '#receiver' put: self receiver.\x0a\x09variables at: '#selector' put: self selector.\x0a\x09variables at: '#locals' put: self locals.\x0a\x09self class instanceVariableNames do: [ :each |\x0a\x09\x09variables at: each put: (self instVarAt: each) ].\x0a\x09anInspector\x0a\x09\x09setLabel: self printString;\x0a\x09\x09setVariables: variables",
  2447. referencedClasses: ["Dictionary"],
  2448. //>>excludeEnd("ide");
  2449. messageSends: ["new", "at:put:", "home", "receiver", "selector", "locals", "do:", "instanceVariableNames", "class", "instVarAt:", "setLabel:", "printString", "setVariables:"]
  2450. }),
  2451. $globals.MethodContext);
  2452. $core.addMethod(
  2453. $core.method({
  2454. selector: "inspectOn:",
  2455. protocol: '*Platform-Services',
  2456. fn: function (anInspector){
  2457. var self=this;
  2458. var variables;
  2459. function $Dictionary(){return $globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  2460. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2461. return $core.withContext(function($ctx1) {
  2462. //>>excludeEnd("ctx");
  2463. var $1;
  2464. variables=$recv($Dictionary())._new();
  2465. $recv(variables)._at_put_("#self",self);
  2466. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2467. $ctx1.sendIdx["at:put:"]=1;
  2468. //>>excludeEnd("ctx");
  2469. $recv($recv(self._class())._allInstanceVariableNames())._do_((function(each){
  2470. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2471. return $core.withContext(function($ctx2) {
  2472. //>>excludeEnd("ctx");
  2473. return $recv(variables)._at_put_(each,self._instVarAt_(each));
  2474. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2475. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  2476. //>>excludeEnd("ctx");
  2477. }));
  2478. $recv(anInspector)._setLabel_(self._printString());
  2479. $1=$recv(anInspector)._setVariables_(variables);
  2480. return self;
  2481. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2482. }, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},$globals.Object)});
  2483. //>>excludeEnd("ctx");
  2484. },
  2485. //>>excludeStart("ide", pragmas.excludeIdeData);
  2486. args: ["anInspector"],
  2487. source: "inspectOn: anInspector\x0a\x09| variables |\x0a\x09variables := Dictionary new.\x0a\x09variables at: '#self' put: self.\x0a\x09self class allInstanceVariableNames do: [ :each |\x0a\x09\x09variables at: each put: (self instVarAt: each) ].\x0a\x09anInspector\x0a\x09\x09setLabel: self printString;\x0a\x09\x09setVariables: variables",
  2488. referencedClasses: ["Dictionary"],
  2489. //>>excludeEnd("ide");
  2490. messageSends: ["new", "at:put:", "do:", "allInstanceVariableNames", "class", "instVarAt:", "setLabel:", "printString", "setVariables:"]
  2491. }),
  2492. $globals.Object);
  2493. $core.addMethod(
  2494. $core.method({
  2495. selector: "do:displayingProgress:",
  2496. protocol: '*Platform-Services',
  2497. fn: function (aBlock,aString){
  2498. var self=this;
  2499. function $ProgressHandler(){return $globals.ProgressHandler||(typeof ProgressHandler=="undefined"?nil:ProgressHandler)}
  2500. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2501. return $core.withContext(function($ctx1) {
  2502. //>>excludeEnd("ctx");
  2503. $recv($ProgressHandler())._do_on_displaying_(aBlock,self,aString);
  2504. return self;
  2505. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2506. }, function($ctx1) {$ctx1.fill(self,"do:displayingProgress:",{aBlock:aBlock,aString:aString},$globals.SequenceableCollection)});
  2507. //>>excludeEnd("ctx");
  2508. },
  2509. //>>excludeStart("ide", pragmas.excludeIdeData);
  2510. args: ["aBlock", "aString"],
  2511. source: "do: aBlock displayingProgress: aString\x0a\x09ProgressHandler \x0a\x09\x09do: aBlock \x0a\x09\x09on: self \x0a\x09\x09displaying: aString",
  2512. referencedClasses: ["ProgressHandler"],
  2513. //>>excludeEnd("ide");
  2514. messageSends: ["do:on:displaying:"]
  2515. }),
  2516. $globals.SequenceableCollection);
  2517. $core.addMethod(
  2518. $core.method({
  2519. selector: "inspectOn:",
  2520. protocol: '*Platform-Services',
  2521. fn: function (anInspector){
  2522. var self=this;
  2523. var variables,i;
  2524. function $Dictionary(){return $globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  2525. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2526. return $core.withContext(function($ctx1) {
  2527. //>>excludeEnd("ctx");
  2528. var $1;
  2529. variables=$recv($Dictionary())._new();
  2530. $recv(variables)._at_put_("#self",self);
  2531. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2532. $ctx1.sendIdx["at:put:"]=1;
  2533. //>>excludeEnd("ctx");
  2534. i=(1);
  2535. self._do_((function(each){
  2536. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2537. return $core.withContext(function($ctx2) {
  2538. //>>excludeEnd("ctx");
  2539. $recv(variables)._at_put_(i,each);
  2540. i=$recv(i).__plus((1));
  2541. return i;
  2542. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2543. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  2544. //>>excludeEnd("ctx");
  2545. }));
  2546. $recv(anInspector)._setLabel_(self._printString());
  2547. $1=$recv(anInspector)._setVariables_(variables);
  2548. return self;
  2549. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2550. }, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables,i:i},$globals.Set)});
  2551. //>>excludeEnd("ctx");
  2552. },
  2553. //>>excludeStart("ide", pragmas.excludeIdeData);
  2554. args: ["anInspector"],
  2555. source: "inspectOn: anInspector\x0a\x09| variables i |\x0a\x09variables := Dictionary new.\x0a\x09variables at: '#self' put: self.\x0a\x09i := 1.\x0a\x09self do: [ :each |\x0a\x09\x09variables at: i put: each.\x0a\x09\x09i := i + 1 ].\x0a\x09anInspector\x0a\x09\x09setLabel: self printString;\x0a\x09\x09setVariables: variables",
  2556. referencedClasses: ["Dictionary"],
  2557. //>>excludeEnd("ide");
  2558. messageSends: ["new", "at:put:", "do:", "+", "setLabel:", "printString", "setVariables:"]
  2559. }),
  2560. $globals.Set);
  2561. $core.addMethod(
  2562. $core.method({
  2563. selector: "inspectOn:",
  2564. protocol: '*Platform-Services',
  2565. fn: function (anInspector){
  2566. var self=this;
  2567. var label;
  2568. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2569. return $core.withContext(function($ctx1) {
  2570. //>>excludeEnd("ctx");
  2571. var $3,$2,$1,$5,$4;
  2572. (
  2573. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2574. $ctx1.supercall = true,
  2575. //>>excludeEnd("ctx");
  2576. $globals.String.superclass.fn.prototype._inspectOn_.apply($recv(self), [anInspector]));
  2577. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2578. $ctx1.supercall = false;
  2579. //>>excludeEnd("ctx");;
  2580. $3=self._printString();
  2581. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2582. $ctx1.sendIdx["printString"]=1;
  2583. //>>excludeEnd("ctx");
  2584. $2=$recv($3)._size();
  2585. $1=$recv($2).__gt((30));
  2586. if($core.assert($1)){
  2587. $5=self._printString();
  2588. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2589. $ctx1.sendIdx["printString"]=2;
  2590. //>>excludeEnd("ctx");
  2591. $4=$recv($5)._copyFrom_to_((1),(30));
  2592. label=$recv($4).__comma("...'");
  2593. label;
  2594. } else {
  2595. label=self._printString();
  2596. label;
  2597. };
  2598. $recv(anInspector)._setLabel_(label);
  2599. return self;
  2600. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2601. }, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,label:label},$globals.String)});
  2602. //>>excludeEnd("ctx");
  2603. },
  2604. //>>excludeStart("ide", pragmas.excludeIdeData);
  2605. args: ["anInspector"],
  2606. source: "inspectOn: anInspector\x0a\x09| label |\x0a\x09super inspectOn: anInspector.\x0a\x09self printString size > 30\x0a\x09\x09ifTrue: [ label := (self printString copyFrom: 1 to: 30), '...''' ]\x0a\x09\x09ifFalse: [ label := self printString ].\x0a\x09anInspector setLabel: label",
  2607. referencedClasses: [],
  2608. //>>excludeEnd("ide");
  2609. messageSends: ["inspectOn:", "ifTrue:ifFalse:", ">", "size", "printString", ",", "copyFrom:to:", "setLabel:"]
  2610. }),
  2611. $globals.String);
  2612. });