MetaLink invocation with method returned value

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

MetaLink invocation with method returned value

Alain Rastoul-2
Hi,

I would like to trace returned values with MetaLink, but didn't found
the correct #arguments: parameter.
Here in my example  I would like to call aMethodCall:returned: with the
return value of aMethodCall:
(the method on which the link is installed)


        (MyObject>>#aMethodCall:) ast
                link: (MetaLink new
                        metaObject: myObject;
                        control: #after;
                        selector: #aMethodCall:returned: ;
                        arguments: #( arguments object)).

object is myObject not the returned value, value does not work, and I
didn't found any one working.

Does anyone know the correct invocation and can help me ?

Many thanks


regards,

Alain


Reply | Threaded
Open this post in threaded view
|

Re: MetaLink invocation with method returned value

Uko2
As far as I know return values for methods are not yet implemented. I’ve talked with Marcus, it’s planned but not the top priority. For now you can all links to the return nodes of a method.

Uko

> On 25 Feb 2016, at 07:42, Alain Rastoul <[hidden email]> wrote:
>
> Hi,
>
> I would like to trace returned values with MetaLink, but didn't found the correct #arguments: parameter.
> Here in my example  I would like to call aMethodCall:returned: with the return value of aMethodCall:
> (the method on which the link is installed)
>
>
> (MyObject>>#aMethodCall:) ast
> link: (MetaLink new
> metaObject: myObject;
> control: #after;
> selector: #aMethodCall:returned: ;
> arguments: #( arguments object)).
>
> object is myObject not the returned value, value does not work, and I didn't found any one working.
>
> Does anyone know the correct invocation and can help me ?
>
> Many thanks
>
>
> regards,
>
> Alain
>
>


Reply | Threaded
Open this post in threaded view
|

Re: MetaLink invocation with method returned value

Marcus Denker-4
Hi,

yes, this is on the TODO… I am last and this week focussed on stabilising Pharo5, I will come
back to my backlog of MetaLinks starting next week.

        Marcus

> On 25 Feb 2016, at 07:52, Yuriy Tymchuk <[hidden email]> wrote:
>
> As far as I know return values for methods are not yet implemented. I’ve talked with Marcus, it’s planned but not the top priority. For now you can all links to the return nodes of a method.
>
> Uko
>
>> On 25 Feb 2016, at 07:42, Alain Rastoul <[hidden email]> wrote:
>>
>> Hi,
>>
>> I would like to trace returned values with MetaLink, but didn't found the correct #arguments: parameter.
>> Here in my example  I would like to call aMethodCall:returned: with the return value of aMethodCall:
>> (the method on which the link is installed)
>>
>>
>> (MyObject>>#aMethodCall:) ast
>> link: (MetaLink new
>> metaObject: myObject;
>> control: #after;
>> selector: #aMethodCall:returned: ;
>> arguments: #( arguments object)).
>>
>> object is myObject not the returned value, value does not work, and I didn't found any one working.
>>
>> Does anyone know the correct invocation and can help me ?
>>
>> Many thanks
>>
>>
>> regards,
>>
>> Alain
>>
>>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: MetaLink invocation with method returned value

Alain Rastoul-2
Thank you both for your answers,

Great.
No emergency for me, it's for a POC about design by contract with
annotations I started last year and resumed recently.
As it starts working (at least it looks like), I will publish on
smalltalkhub soon so others can play with it too, tomorrow, time to
finish some tests and at least one readme .

Alain

On 25/02/2016 09:52, Marcus Denker wrote:
> Hi,
>
> yes, this is on the TODO… I am last and this week focussed on stabilising Pharo5, I will come
> back to my backlog of MetaLinks starting next week.
>
> Marcus
>

>> On 25 Feb 2016, at 07:52, Yuriy Tymchuk <[hidden email]> wrote:
>>
>> As far as I know return values for methods are not yet implemented. I’ve talked with Marcus, it’s planned but not the top priority. For now you can all links to the return nodes of a method.
>>
>> Uko
>>