Browse Source

CharacterArray => String

Herby Vojčík 5 years ago
parent
commit
248cdbc6c6
2 changed files with 29 additions and 29 deletions
  1. 23 23
      src/Web-Snippets.js
  2. 6 6
      src/Web-Snippets.st

+ 23 - 23
src/Web-Snippets.js

@@ -340,29 +340,6 @@ messageSends: ["shouldNotImplement"]
 }),
 $globals.HTMLSnippet.a$cls);
 
-$core.addMethod(
-$core.method({
-selector: "asSnippet",
-protocol: "*Web-Snippets",
-fn: function (){
-var self=this,$self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-return $recv($recv($globals.HTMLSnippet)._current())._snippetAt_($self._asString());
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"asSnippet",{},$globals.CharacterArray)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "asSnippet\x0a\x09^ HTMLSnippet current snippetAt: self asString",
-referencedClasses: ["HTMLSnippet"],
-//>>excludeEnd("ide");
-messageSends: ["snippetAt:", "current", "asString"]
-}),
-$globals.CharacterArray);
-
 $core.addMethod(
 $core.method({
 selector: "snippet:",
@@ -400,4 +377,27 @@ messageSends: ["clone", "asJQuery", "with:", "fromJQuery:canvas:", "find:", "ifE
 }),
 $globals.HTMLCanvas);
 
+$core.addMethod(
+$core.method({
+selector: "asSnippet",
+protocol: "*Web-Snippets",
+fn: function (){
+var self=this,$self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+return $recv($recv($globals.HTMLSnippet)._current())._snippetAt_($self._asString());
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"asSnippet",{},$globals.CharacterArray)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "asSnippet\x0a\x09^ HTMLSnippet current snippetAt: self asString",
+referencedClasses: ["HTMLSnippet"],
+//>>excludeEnd("ide");
+messageSends: ["snippetAt:", "current", "asString"]
+}),
+$globals.String);
+
 });

+ 6 - 6
src/Web-Snippets.st

@@ -127,12 +127,6 @@ new
 	self shouldNotImplement
 ! !
 
-!CharacterArray methodsFor: '*Web-Snippets'!
-
-asSnippet
-	^ HTMLSnippet current snippetAt: self asString
-! !
-
 !HTMLCanvas methodsFor: '*Web-Snippets'!
 
 snippet: anElement
@@ -151,3 +145,9 @@ snippet: anElement
 	^ TagBrush fromJQuery: (caret removeAttr: 'data-snippet') canvas: self
 ! !
 
+!String methodsFor: '*Web-Snippets'!
+
+asSnippet
+	^ HTMLSnippet current snippetAt: self asString
+! !
+