[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-smalltalk] typo in MessageLookup
From: |
Paolo Bonzini |
Subject: |
Re: [Help-smalltalk] typo in MessageLookup |
Date: |
Sat, 19 May 2012 18:24:07 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1 |
Il 31/03/2012 17:32, Ladislav Marek ha scritto:
> In MessageLookup>>printOn: is missing dot.
>
> --- a/kernel/MessageLookup.st
> +++ b/kernel/MessageLookup.st
> @@ -57,7 +57,7 @@ but also the starting class for the search.'>
> "Print a representation of the receiver on aStream"
>
> <category: 'basic'>
> - super printOn: aStream
> + super printOn: aStream.
> aStream
> space; nextPut: $(;
> print: startingClass;
Applied, sorry for the delay.
Paolo
> On Sat, Feb 4, 2012 at 14:19, Paolo Bonzini <address@hidden> wrote:
>> On 02/03/2012 07:49 PM, Ladislav Marek wrote:
>>>
>>> diff --git a/packages/stinst/parser/STLoaderObjs.st
>>> b/packages/stinst/parser/STLoaderObjs.st
>>> index 6eda6e1..72deded 100644
>>> --- a/packages/stinst/parser/STLoaderObjs.st
>>> +++ b/packages/stinst/parser/STLoaderObjs.st
>>> @@ -812,6 +812,7 @@ superclass
>>> !
>>>
>>> doesNotUnderstand: aMessage
>>> + aMessage startingClass: proxy class.
>>> ^proxy perform: aMessage
>>> ! !
>>
>>
>> Actually, #doesNotUnderstand: can do one of three things:
>>
>> 1) do everything by itself;
>>
>> 2) forward the message to another object;
>>
>> 3) create the missing method and retry it.
>>
>> (3) is relatively rare, but it is the scenario for which I introduced
>> MessageLookup. It turns out that the new MessageLookup>>#sendTo: is only
>> good for (3), and the old implementation from the Message class is
>> appropriate for (2).
>>
>> I'm applying this patch to differentiate how you restart execution in the
>> two cases:
>>
>> diff --git a/kernel/MessageLookup.st b/kernel/MessageLookup.st
>> index bbc18f2..dc9e831 100644
>> --- a/kernel/MessageLookup.st
>> +++ b/kernel/MessageLookup.st
>> @@ -71,8 +71,9 @@ but also the starting class for the search.'>
>>
>> ^self startingClass lookupSelector: self selector
>> ]
>>
>> - sendTo: receiver [
>> - "Send the message to the given receiver"
>> + retrySendTo: receiver [
>> + "Send the message to the given receiver, looking up the
>> + method starting at #startingClass."
>>
>> <category: 'basic'>
>> ^receiver perform: self method withArguments: self arguments
>>
>> Paolo
>
> _______________________________________________
> help-smalltalk mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/help-smalltalk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Help-smalltalk] typo in MessageLookup,
Paolo Bonzini <=