[Pharo-project] [squeak-dev] Re: Why you need new Method trailers? :)

Adrian Lienhard adi at netstyle.ch
Mon Dec 21 12:56:18 UTC 2009


Yes, it also works for aliased methods.

It should be ... @ {#methodB -> #methodA} meaning methodB is an alias  
for methodA

Cheers,
Adrian


On Dec 21, 2009, at 13:50 , Igor Stasenko wrote:

> 2009/12/21 Adrian Lienhard <adi at netstyle.ch>:
>>
>> On Dec 21, 2009, at 13:36 , Igor Stasenko wrote:
>>
>>> 2009/12/21 Adrian Lienhard <adi at netstyle.ch>:
>>>>
>>>> Hi Igor,
>>>>
>>>> This looks complicated...
>>>
>>> Hmm, i wonder, what Traits serve for, if requesting an original  
>>> source
>>> code of method which being installed in specific behavior using
>>> specific selector
>>> becomes non-trivial task.
>>
>> Well, it *is* trivial -- at least with the version of the Traits
>> implementation in Pharo. See the changeset I attached.
>>
> will it work for aliased ones?
>
> I found that in both trunk & pharo, aliases seem disfunctional.
>
> create
> Trait named: #Foo
>
> create method:
> Foo>>methodA .
>
> create
> Trait named: #Bar
> using: Foo @ {#methodA -> #methodB }.
>
> Bar shows a single method (methodA) ... but i expected to see  
> #methodB instead.
>
> Same for classes..
>
> Object subclass: #Zork
> uses: Bar
> ..
> shows methodA, not methodB in browser.
> I am doing something wrong?
>
>> Cheers,
>> Adrian
>>
>>
>
>
>
> -- 
> Best regards,
> Igor Stasenko AKA sig.
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project at lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project




More information about the Squeak-dev mailing list