|
@@ -128,13 +128,16 @@ selector: "doesNotUnderstand:",
|
|
protocol: 'message handling',
|
|
protocol: 'message handling',
|
|
fn: function (aMessage){
|
|
fn: function (aMessage){
|
|
var self=this;
|
|
var self=this;
|
|
-var selector;
|
|
|
|
|
|
+var selector,newElement,useArg;
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
return $core.withContext(function($ctx1) {
|
|
return $core.withContext(function($ctx1) {
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-var $1,$2,$3,$4,$5;
|
|
|
|
|
|
+var $1,$2,$3,$4,$5,$6,$7;
|
|
selector=$recv(aMessage)._selector();
|
|
selector=$recv(aMessage)._selector();
|
|
$1=$recv($recv(selector)._asUppercase()).__eq(selector);
|
|
$1=$recv($recv(selector)._asUppercase()).__eq(selector);
|
|
|
|
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
|
+$ctx1.sendIdx["="]=1;
|
|
|
|
+//>>excludeEnd("ctx");
|
|
if(!$core.assert($1)){
|
|
if(!$core.assert($1)){
|
|
$2=(
|
|
$2=(
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
@@ -149,9 +152,19 @@ $ctx1.sendIdx["doesNotUnderstand:"]=1;
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
return $2;
|
|
return $2;
|
|
};
|
|
};
|
|
-$3=$recv(selector)._includes_(":");
|
|
|
|
|
|
+$3=$recv($recv(selector)._last()).__eq(":");
|
|
if($core.assert($3)){
|
|
if($core.assert($3)){
|
|
-$4=(
|
|
|
|
|
|
+useArg=true;
|
|
|
|
+useArg;
|
|
|
|
+selector=$recv(selector)._allButLast();
|
|
|
|
+selector;
|
|
|
|
+} else {
|
|
|
|
+useArg=false;
|
|
|
|
+useArg;
|
|
|
|
+};
|
|
|
|
+$4=$recv(selector)._includes_(":");
|
|
|
|
+if($core.assert($4)){
|
|
|
|
+$5=(
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
$ctx1.supercall = true,
|
|
$ctx1.supercall = true,
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
@@ -159,20 +172,25 @@ $globals.Silk.klass.superclass.fn.prototype._doesNotUnderstand_.apply($recv(self
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
$ctx1.supercall = false;
|
|
$ctx1.supercall = false;
|
|
//>>excludeEnd("ctx");;
|
|
//>>excludeEnd("ctx");;
|
|
-return $4;
|
|
|
|
-};
|
|
|
|
-$5=self._newElement_($recv(selector)._asLowercase());
|
|
|
|
return $5;
|
|
return $5;
|
|
|
|
+};
|
|
|
|
+newElement=self._newElement_($recv(selector)._asLowercase());
|
|
|
|
+$6=useArg;
|
|
|
|
+if($core.assert($6)){
|
|
|
|
+$recv(newElement).__lt_lt($recv($recv(aMessage)._arguments())._first());
|
|
|
|
+};
|
|
|
|
+$7=newElement;
|
|
|
|
+return $7;
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
-}, function($ctx1) {$ctx1.fill(self,"doesNotUnderstand:",{aMessage:aMessage,selector:selector},$globals.Silk.klass)});
|
|
|
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"doesNotUnderstand:",{aMessage:aMessage,selector:selector,newElement:newElement,useArg:useArg},$globals.Silk.klass)});
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
},
|
|
},
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
args: ["aMessage"],
|
|
args: ["aMessage"],
|
|
-source: "doesNotUnderstand: aMessage\x0a\x09\x22`Silk DIV` creates a div element\x22\x0a\x09| selector |\x0a\x09selector := aMessage selector.\x0a\x09selector asUppercase = selector\x0a\x09\x09ifFalse: [ ^ super doesNotUnderstand: aMessage ].\x0a\x09(selector includes: ':')\x0a\x09\x09ifTrue: [ ^ super doesNotUnderstand: aMessage ].\x0a\x09^ self newElement: selector asLowercase",
|
|
|
|
|
|
+source: "doesNotUnderstand: aMessage\x0a\x09\x22`Silk DIV` creates a div element.\x0a\x09`Silk DIV: anObject` creates a div element and puts contents in it\x22\x0a\x09| selector newElement useArg |\x0a\x09selector := aMessage selector.\x0a\x09selector asUppercase = selector\x0a\x09\x09ifFalse: [ ^ super doesNotUnderstand: aMessage ].\x0a\x09selector last = ':'\x0a\x09\x09ifTrue: [ useArg := true. selector := selector allButLast ]\x0a\x09\x09ifFalse: [ useArg := false ].\x0a\x09(selector includes: ':')\x0a\x09\x09ifTrue: [ ^ super doesNotUnderstand: aMessage ].\x0a\x09newElement := self newElement: selector asLowercase.\x0a\x09useArg ifTrue: [ newElement << aMessage arguments first ].\x0a\x09^ newElement",
|
|
referencedClasses: [],
|
|
referencedClasses: [],
|
|
//>>excludeEnd("ide");
|
|
//>>excludeEnd("ide");
|
|
-messageSends: ["selector", "ifFalse:", "=", "asUppercase", "doesNotUnderstand:", "ifTrue:", "includes:", "newElement:", "asLowercase"]
|
|
|
|
|
|
+messageSends: ["selector", "ifFalse:", "=", "asUppercase", "doesNotUnderstand:", "ifTrue:ifFalse:", "last", "allButLast", "ifTrue:", "includes:", "newElement:", "asLowercase", "<<", "first", "arguments"]
|
|
}),
|
|
}),
|
|
$globals.Silk.klass);
|
|
$globals.Silk.klass);
|
|
|
|
|