Silk.js 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456
  1. define(["amber/boot", "require", "amber/core/Kernel-Collections", "amber/core/Kernel-Infrastructure", "amber/core/Kernel-Methods", "amber/core/Kernel-Objects", "domite/DOMite"], function($boot,requirejs){"use strict";
  2. var $core=$boot.api,nil=$boot.nilAsValue,$nil=$boot.nilAsReceiver,$recv=$boot.asReceiver,$globals=$boot.globals;
  3. var $pkg = $core.addPackage("Silk");
  4. $pkg.innerEval = function (expr) { return eval(expr); };
  5. $pkg.transport = {"type":"amd","amdNamespace":"silk"};
  6. $core.addClass("Silk", $globals.Domite, [], "Silk");
  7. //>>excludeStart("ide", pragmas.excludeIdeData);
  8. $globals.Silk.comment="I am subclass of `Domite` with more convenient high-level API.\x0a\x0a##Rendering\x0a\x0a - `aSilk << anObject` uses double-dispatch via `renderOnSilk:`.\x0aThis allows to create widgets\x0a(no formal superclass, anything with `renderOnSilk:` is a widget),\x0aas well as incorporating magic on certain types of objects:\x0a - blocks: `aSilk << aBlock` runs the block, passing aSilk as a parameter.\x0a - associations: `aSilk << (key -> value)` set attribute key to value.\x0a\x0aWorthful to note is, rendering a collection has its magic\x0aalready built-in (via `putOn:`) -- if you `stream << aCollection`,\x0aits items are `<<`'d in sequence.\x0aSo, de facto, arrays are deeply flattened when put on a stream via `<<`.\x0a\x0a##Convenience\x0a\x0a - `aCssSelectorString asSilk` returns Silk wrapping an element at a selector.\x0a - `anObject inSilk` returns anObject rendered in a document fragment.\x0a\x0a##Element creation\x0a\x0aThese messages use DNU to dynamically create\x0aelements with any (letters-and-numbers) tag name,\x0aNext samples show this on an example of `<div>`.\x0a\x0a - `Silk DIV` is shortcut for `Silk newElement: 'div'`.\x0a - `aSilk DIV` is shortcut for\x0a`[ |tmp| tmp := Silk DIV. aSilk << tmp. tmp] value`.\x0aIOW, it not just creates the element and returns it,\x0abut also puts in on aSilk.\x0a - `aSilk DIV: anObject` is shortcut for\x0a`aSilk DIV << anObject; yourself`.\x0aIOW, it not just creates and inserts the element,\x0abut puts a content into it.\x0a\x0a##Conclusions\x0a\x0aTaken all this together, one can do pretty neat constructs:\x0a\x0a```\x0a aSilk P: { 'id'->'mission'. 'We are the champions.' }\x0a```\x0a\x0aadds `<p id=\x22mission\x22>We are the champions.</p>` into `aSilk`\x0aand returns the Silk-wrapped `<p>` with insertion cursor at the end.";
  9. //>>excludeEnd("ide");
  10. $core.addMethod(
  11. $core.method({
  12. selector: "namespace",
  13. protocol: "accessing",
  14. fn: function (){
  15. var self=this,$self=this;
  16. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  17. return $core.withContext(function($ctx1) {
  18. //>>excludeEnd("ctx");
  19. return $recv($self._element())._namespaceURI();
  20. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  21. }, function($ctx1) {$ctx1.fill(self,"namespace",{})});
  22. //>>excludeEnd("ctx");
  23. },
  24. //>>excludeStart("ide", pragmas.excludeIdeData);
  25. args: [],
  26. source: "namespace\x0a\x09\x22<String>\x0a\x09XML namespace for elements: html.\x0a\x09The default for all virtual Silk tag messages\x22\x0a\x09\x0a\x09^ self element namespaceURI",
  27. referencedClasses: [],
  28. //>>excludeEnd("ide");
  29. pragmas: [],
  30. messageSends: ["namespaceURI", "element"]
  31. }),
  32. $globals.Silk);
  33. $core.addMethod(
  34. $core.method({
  35. selector: "newElement:xmlns:",
  36. protocol: "writing",
  37. fn: function (aString,anotherString){
  38. var self=this,$self=this;
  39. var el;
  40. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  41. return $core.withContext(function($ctx1) {
  42. //>>excludeEnd("ctx");
  43. el=$recv($self._class())._newElement_xmlns_(aString,anotherString);
  44. $self.__lt_lt(el);
  45. return el;
  46. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  47. }, function($ctx1) {$ctx1.fill(self,"newElement:xmlns:",{aString:aString,anotherString:anotherString,el:el})});
  48. //>>excludeEnd("ctx");
  49. },
  50. //>>excludeStart("ide", pragmas.excludeIdeData);
  51. args: ["aString", "anotherString"],
  52. source: "newElement: aString xmlns: anotherString\x0a\x09| el |\x0a\x09\x0a\x09el := self class newElement: aString xmlns: anotherString.\x0a\x09self << el.\x0a\x09^ el",
  53. referencedClasses: [],
  54. //>>excludeEnd("ide");
  55. pragmas: [],
  56. messageSends: ["newElement:xmlns:", "class", "<<"]
  57. }),
  58. $globals.Silk);
  59. $core.addMethod(
  60. $core.method({
  61. selector: "nextPut:",
  62. protocol: "writing",
  63. fn: function (anObject){
  64. var self=this,$self=this;
  65. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  66. return $core.withContext(function($ctx1) {
  67. //>>excludeEnd("ctx");
  68. var $1,$receiver;
  69. $1=$recv(anObject)._renderOnSilk_(self);
  70. if(($receiver = $1) == null || $receiver.a$nil){
  71. (
  72. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  73. $ctx1.supercall = true,
  74. //>>excludeEnd("ctx");
  75. ($globals.Silk.superclass||$boot.nilAsClass).fn.prototype._nextPut_.apply($self, [anObject]));
  76. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  77. $ctx1.supercall = false;
  78. //>>excludeEnd("ctx");;
  79. } else {
  80. $1;
  81. }
  82. return self;
  83. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  84. }, function($ctx1) {$ctx1.fill(self,"nextPut:",{anObject:anObject})});
  85. //>>excludeEnd("ctx");
  86. },
  87. //>>excludeStart("ide", pragmas.excludeIdeData);
  88. args: ["anObject"],
  89. source: "nextPut: anObject\x0a\x09\x22Double-dispatches anObject via renderOnSilk: message.\x0a\x09If a message returns nil, this fallbacks to superclass.\x0a\x09Otherwise, it is assumed renderOnSilk: did its job.\x22\x0a\x0a\x09(anObject renderOnSilk: self)\x0a\x09\x09ifNil: [ super nextPut: anObject ]",
  90. referencedClasses: [],
  91. //>>excludeEnd("ide");
  92. pragmas: [],
  93. messageSends: ["ifNil:", "renderOnSilk:", "nextPut:"]
  94. }),
  95. $globals.Silk);
  96. $core.addMethod(
  97. $core.method({
  98. selector: "htmlNamespace",
  99. protocol: "accessing",
  100. fn: function (){
  101. var self=this,$self=this;
  102. return "http://www.w3.org/1999/xhtml";
  103. },
  104. //>>excludeStart("ide", pragmas.excludeIdeData);
  105. args: [],
  106. source: "htmlNamespace\x0a\x09\x22<String>\x0a\x09XML namespace for HTML elements.\x0a\x09The default for all virtual Silk tag messages\x22\x0a\x09\x0a\x09^ 'http://www.w3.org/1999/xhtml'",
  107. referencedClasses: [],
  108. //>>excludeEnd("ide");
  109. pragmas: [],
  110. messageSends: []
  111. }),
  112. $globals.Silk.a$cls);
  113. $core.addMethod(
  114. $core.method({
  115. selector: "namespace",
  116. protocol: "accessing",
  117. fn: function (){
  118. var self=this,$self=this;
  119. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  120. return $core.withContext(function($ctx1) {
  121. //>>excludeEnd("ctx");
  122. return $self._htmlNamespace();
  123. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  124. }, function($ctx1) {$ctx1.fill(self,"namespace",{})});
  125. //>>excludeEnd("ctx");
  126. },
  127. //>>excludeStart("ide", pragmas.excludeIdeData);
  128. args: [],
  129. source: "namespace\x0a\x09\x22<String>\x0a\x09XML namespace for elements: html.\x0a\x09The default for all virtual Silk tag messages\x22\x0a\x09\x0a\x09^ self htmlNamespace",
  130. referencedClasses: [],
  131. //>>excludeEnd("ide");
  132. pragmas: [],
  133. messageSends: ["htmlNamespace"]
  134. }),
  135. $globals.Silk.a$cls);
  136. $core.addTrait("TSilkBuilder", "Silk");
  137. //>>excludeStart("ide", pragmas.excludeIdeData);
  138. $globals.TSilkBuilder.comment="I contain Silk's \x22build element via DNU\x22 behaviour.\x0a\x0aI expect #namespace and #newElement:xmlns: to be implemented.";
  139. //>>excludeEnd("ide");
  140. $core.addMethod(
  141. $core.method({
  142. selector: "doesNotUnderstand:",
  143. protocol: "message handling",
  144. fn: function (aMessage){
  145. var self=this,$self=this;
  146. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  147. return $core.withContext(function($ctx1) {
  148. //>>excludeEnd("ctx");
  149. var $1,$receiver;
  150. $1=$self._tryMakeDnuElement_(aMessage);
  151. if(($receiver = $1) == null || $receiver.a$nil){
  152. return (
  153. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  154. $ctx1.supercall = true,
  155. //>>excludeEnd("ctx");
  156. ($globals.TSilkBuilder.superclass||$boot.nilAsClass).fn.prototype._doesNotUnderstand_.apply($self, [aMessage]));
  157. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  158. $ctx1.supercall = false;
  159. //>>excludeEnd("ctx");;
  160. } else {
  161. return $1;
  162. }
  163. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  164. }, function($ctx1) {$ctx1.fill(self,"doesNotUnderstand:",{aMessage:aMessage})});
  165. //>>excludeEnd("ctx");
  166. },
  167. //>>excludeStart("ide", pragmas.excludeIdeData);
  168. args: ["aMessage"],
  169. source: "doesNotUnderstand: aMessage\x0a\x09\x22`self DIV` creates (and optionally inserts) a div element.\x0a\x09`aSilk DIV: anObject` creates (and optionally inserts)\x0a\x09a div element, and puts contents in it\x22\x0a\x09^ (self tryMakeDnuElement: aMessage)\x0a\x09\x09ifNil: [ super doesNotUnderstand: aMessage ]",
  170. referencedClasses: [],
  171. //>>excludeEnd("ide");
  172. pragmas: [],
  173. messageSends: ["ifNil:", "tryMakeDnuElement:", "doesNotUnderstand:"]
  174. }),
  175. $globals.TSilkBuilder);
  176. $core.addMethod(
  177. $core.method({
  178. selector: "newSvgElement",
  179. protocol: "convenience",
  180. fn: function (){
  181. var self=this,$self=this;
  182. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  183. return $core.withContext(function($ctx1) {
  184. //>>excludeEnd("ctx");
  185. return $self._newElement_xmlns_("svg","http://www.w3.org/2000/svg");
  186. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  187. }, function($ctx1) {$ctx1.fill(self,"newSvgElement",{})});
  188. //>>excludeEnd("ctx");
  189. },
  190. //>>excludeStart("ide", pragmas.excludeIdeData);
  191. args: [],
  192. source: "newSvgElement\x0a\x09^ self newElement: 'svg' xmlns: 'http://www.w3.org/2000/svg'",
  193. referencedClasses: [],
  194. //>>excludeEnd("ide");
  195. pragmas: [],
  196. messageSends: ["newElement:xmlns:"]
  197. }),
  198. $globals.TSilkBuilder);
  199. $core.addMethod(
  200. $core.method({
  201. selector: "tryMakeDnuElement:",
  202. protocol: "instance creation",
  203. fn: function (aMessage){
  204. var self=this,$self=this;
  205. var selector,newElement,useArg;
  206. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  207. return $core.withContext(function($ctx1) {
  208. //>>excludeEnd("ctx");
  209. var $1,$2,$3,$4;
  210. selector=$recv(aMessage)._selector();
  211. $1=$recv($recv(selector)._asUppercase()).__eq(selector);
  212. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  213. $ctx1.sendIdx["="]=1;
  214. //>>excludeEnd("ctx");
  215. if(!$core.assert($1)){
  216. return nil;
  217. }
  218. $2=$recv($recv(selector)._last()).__eq(":");
  219. if($core.assert($2)){
  220. useArg=true;
  221. selector=$recv(selector)._allButLast();
  222. selector;
  223. } else {
  224. useArg=false;
  225. useArg;
  226. }
  227. $3=$recv(selector)._includes_(":");
  228. if($core.assert($3)){
  229. return nil;
  230. }
  231. newElement=$self._newElement_xmlns_($recv(selector)._asLowercase(),$self._namespace());
  232. $4=useArg;
  233. if($core.assert($4)){
  234. $recv(newElement).__lt_lt($recv($recv(aMessage)._arguments())._first());
  235. }
  236. return newElement;
  237. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  238. }, function($ctx1) {$ctx1.fill(self,"tryMakeDnuElement:",{aMessage:aMessage,selector:selector,newElement:newElement,useArg:useArg})});
  239. //>>excludeEnd("ctx");
  240. },
  241. //>>excludeStart("ide", pragmas.excludeIdeData);
  242. args: ["aMessage"],
  243. source: "tryMakeDnuElement: aMessage\x0a\x09\x22`DIV` creates a div element.\x0a\x09`DIV: anObject` creates a div element and puts contents in it.\x0a\x09An element can be optionally inserted by #newElement:xmlns:.\x0a\x09When self is an instance and not the class Silk, \x0a\x09then the instance's namespace is used for the new element.\x0a\x09You can do:\x0a\x09\x09svg := Silk newElement: 'svg' xmlns: 'http://www.w3.org/2000/svg'.\x0a\x09\x09svg CIRCLE: {'cx' -> 60. 'cy' -> 25. 'r' -> 10}.\x0a\x09This creates a svg circle, not a html circle.\x22\x0a\x09\x0a\x09| selector newElement useArg |\x0a\x09selector := aMessage selector.\x0a\x09selector asUppercase = selector\x0a\x09\x09ifFalse: [ ^ nil ].\x0a\x09selector last = ':'\x0a\x09\x09ifTrue: [ useArg := true. selector := selector allButLast ]\x0a\x09\x09ifFalse: [ useArg := false ].\x0a\x09(selector includes: ':')\x0a\x09\x09ifTrue: [ ^ nil ].\x0a\x09newElement := self newElement: selector asLowercase xmlns: self namespace.\x0a\x09useArg ifTrue: [ newElement << aMessage arguments first ].\x0a\x09^ newElement",
  244. referencedClasses: [],
  245. //>>excludeEnd("ide");
  246. pragmas: [],
  247. messageSends: ["selector", "ifFalse:", "=", "asUppercase", "ifTrue:ifFalse:", "last", "allButLast", "ifTrue:", "includes:", "newElement:xmlns:", "asLowercase", "namespace", "<<", "first", "arguments"]
  248. }),
  249. $globals.TSilkBuilder);
  250. $core.setTraitComposition([{trait: $globals.TSilkBuilder}], $globals.Silk);
  251. $core.setTraitComposition([{trait: $globals.TSilkBuilder}], $globals.Silk.a$cls);
  252. $core.addMethod(
  253. $core.method({
  254. selector: "renderOnSilk:",
  255. protocol: "*Silk",
  256. fn: function (aSilk){
  257. var self=this,$self=this;
  258. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  259. return $core.withContext(function($ctx1) {
  260. //>>excludeEnd("ctx");
  261. $recv($self.key)._attrPut_on_($self.value,aSilk);
  262. return self;
  263. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  264. }, function($ctx1) {$ctx1.fill(self,"renderOnSilk:",{aSilk:aSilk})});
  265. //>>excludeEnd("ctx");
  266. },
  267. //>>excludeStart("ide", pragmas.excludeIdeData);
  268. args: ["aSilk"],
  269. source: "renderOnSilk: aSilk\x0a\x09key attrPut: value on: aSilk",
  270. referencedClasses: [],
  271. //>>excludeEnd("ide");
  272. pragmas: [],
  273. messageSends: ["attrPut:on:"]
  274. }),
  275. $globals.Association);
  276. $core.addMethod(
  277. $core.method({
  278. selector: "renderOnSilk:",
  279. protocol: "*Silk",
  280. fn: function (aSilk){
  281. var self=this,$self=this;
  282. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  283. return $core.withContext(function($ctx1) {
  284. //>>excludeEnd("ctx");
  285. $self._value_(aSilk);
  286. return self;
  287. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  288. }, function($ctx1) {$ctx1.fill(self,"renderOnSilk:",{aSilk:aSilk})});
  289. //>>excludeEnd("ctx");
  290. },
  291. //>>excludeStart("ide", pragmas.excludeIdeData);
  292. args: ["aSilk"],
  293. source: "renderOnSilk: aSilk\x0a\x09self value: aSilk",
  294. referencedClasses: [],
  295. //>>excludeEnd("ide");
  296. pragmas: [],
  297. messageSends: ["value:"]
  298. }),
  299. $globals.BlockClosure);
  300. $core.addMethod(
  301. $core.method({
  302. selector: "inSilk",
  303. protocol: "*Silk",
  304. fn: function (){
  305. var self=this,$self=this;
  306. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  307. return $core.withContext(function($ctx1) {
  308. //>>excludeEnd("ctx");
  309. var $1;
  310. $1=$recv($globals.Silk)._newStream();
  311. $recv($1).__lt_lt(self);
  312. return $recv($1)._yourself();
  313. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  314. }, function($ctx1) {$ctx1.fill(self,"inSilk",{})});
  315. //>>excludeEnd("ctx");
  316. },
  317. //>>excludeStart("ide", pragmas.excludeIdeData);
  318. args: [],
  319. source: "inSilk\x0a\x09^ Silk newStream << self; yourself",
  320. referencedClasses: ["Silk"],
  321. //>>excludeEnd("ide");
  322. pragmas: [],
  323. messageSends: ["<<", "newStream", "yourself"]
  324. }),
  325. $globals.JSObjectProxy);
  326. $core.addMethod(
  327. $core.method({
  328. selector: "renderOnSilk:",
  329. protocol: "*Silk",
  330. fn: function (aSilk){
  331. var self=this,$self=this;
  332. return nil;
  333. },
  334. //>>excludeStart("ide", pragmas.excludeIdeData);
  335. args: ["aSilk"],
  336. source: "renderOnSilk: aSilk\x0a\x09^ nil",
  337. referencedClasses: [],
  338. //>>excludeEnd("ide");
  339. pragmas: [],
  340. messageSends: []
  341. }),
  342. $globals.JSObjectProxy);
  343. $core.addMethod(
  344. $core.method({
  345. selector: "inSilk",
  346. protocol: "*Silk",
  347. fn: function (){
  348. var self=this,$self=this;
  349. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  350. return $core.withContext(function($ctx1) {
  351. //>>excludeEnd("ctx");
  352. var $1;
  353. $1=$recv($globals.Silk)._newStream();
  354. $recv($1).__lt_lt(self);
  355. return $recv($1)._yourself();
  356. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  357. }, function($ctx1) {$ctx1.fill(self,"inSilk",{})});
  358. //>>excludeEnd("ctx");
  359. },
  360. //>>excludeStart("ide", pragmas.excludeIdeData);
  361. args: [],
  362. source: "inSilk\x0a\x09^ Silk newStream << self; yourself",
  363. referencedClasses: ["Silk"],
  364. //>>excludeEnd("ide");
  365. pragmas: [],
  366. messageSends: ["<<", "newStream", "yourself"]
  367. }),
  368. $globals.Object);
  369. $core.addMethod(
  370. $core.method({
  371. selector: "renderOnSilk:",
  372. protocol: "*Silk",
  373. fn: function (aSilk){
  374. var self=this,$self=this;
  375. return nil;
  376. },
  377. //>>excludeStart("ide", pragmas.excludeIdeData);
  378. args: ["aSilk"],
  379. source: "renderOnSilk: aSilk\x0a\x09^ nil",
  380. referencedClasses: [],
  381. //>>excludeEnd("ide");
  382. pragmas: [],
  383. messageSends: []
  384. }),
  385. $globals.Object);
  386. $core.addMethod(
  387. $core.method({
  388. selector: "asSilk",
  389. protocol: "*Silk",
  390. fn: function (){
  391. var self=this,$self=this;
  392. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  393. return $core.withContext(function($ctx1) {
  394. //>>excludeEnd("ctx");
  395. return $recv($globals.Silk)._at_($self._asString());
  396. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  397. }, function($ctx1) {$ctx1.fill(self,"asSilk",{})});
  398. //>>excludeEnd("ctx");
  399. },
  400. //>>excludeStart("ide", pragmas.excludeIdeData);
  401. args: [],
  402. source: "asSilk\x0a\x09^ Silk at: self asString",
  403. referencedClasses: ["Silk"],
  404. //>>excludeEnd("ide");
  405. pragmas: [],
  406. messageSends: ["at:", "asString"]
  407. }),
  408. $globals.String);
  409. $core.addMethod(
  410. $core.method({
  411. selector: "attrPut:on:",
  412. protocol: "*Silk",
  413. fn: function (anObject,aSilk){
  414. var self=this,$self=this;
  415. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  416. return $core.withContext(function($ctx1) {
  417. //>>excludeEnd("ctx");
  418. $recv(aSilk)._attrAt_put_(self,anObject);
  419. return self;
  420. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  421. }, function($ctx1) {$ctx1.fill(self,"attrPut:on:",{anObject:anObject,aSilk:aSilk})});
  422. //>>excludeEnd("ctx");
  423. },
  424. //>>excludeStart("ide", pragmas.excludeIdeData);
  425. args: ["anObject", "aSilk"],
  426. source: "attrPut: anObject on: aSilk\x0a\x09aSilk attrAt: self put: anObject",
  427. referencedClasses: [],
  428. //>>excludeEnd("ide");
  429. pragmas: [],
  430. messageSends: ["attrAt:put:"]
  431. }),
  432. $globals.String);
  433. });