Re: [Pharo-dev] MetaLink to conditionally skip a method execution based on an arg

2016-10-25 Thread Nicolai Hess
Am 23.10.2016 9:22 vorm. schrieb "Yuriy Tymchuk" : > > I’ve also described the question with examples on SO: https://stackoverflow.com/questions/40200546/conditionally-skip-a-method-with-matalinks > Answered on SO. @marcus: Maybe instead links should continue with the original code, if their condi

Re: [Pharo-dev] MetaLink to conditionally skip a method execution based on an arg

2016-10-25 Thread Nicolai Hess
2016-10-23 12:15 GMT+02:00 Peter Uhnak : > I was looking at this and ran into some very odd behavior: > > imagine we have some method: > > ``` > Object subclass: #MyClass. > MyClass compile: 'method: arg > Transcript crShow: ''executed '', arg asString'. > ``` > > and a simple metalink > > ```

Re: [Pharo-dev] MetaLink to conditionally skip a method execution based on an arg

2016-10-24 Thread test
Hi, i would be also interested in answer to this interesting MetaLink-question. werner p.s. Yuriy, i guess this could also be done with ghost On 10/23/2016 09:21 AM, Yuriy Tymchuk wrote: I’ve also described the question with examples on SO: https://stackoverflow.com/questions/40200546/condition

Re: [Pharo-dev] MetaLink to conditionally skip a method execution based on an arg

2016-10-23 Thread Peter Uhnak
I was looking at this and ran into some very odd behavior: imagine we have some method: ``` Object subclass: #MyClass. MyClass compile: 'method: arg Transcript crShow: ''executed '', arg asString'. ``` and a simple metalink ``` link := MetaLink new metaObject: Halt; selector: #now; control:

Re: [Pharo-dev] MetaLink to conditionally skip a method execution based on an arg

2016-10-23 Thread Yuriy Tymchuk
I’ve also described the question with examples on SO: https://stackoverflow.com/questions/40200546/conditionally-skip-a-method-with-matalinks > On 22 Oct 2016, at 23:13, Yuriy Tymchuk wrote: > > Hi. > > Imagine I have method a: and I want to skip the execution (return self or nil > or whateve

[Pharo-dev] MetaLink to conditionally skip a method execution based on an arg

2016-10-22 Thread Yuriy Tymchuk
Hi. Imagine I have method a: and I want to skip the execution (return self or nil or whatever) when a: is evaluated with parameter 0. I have tried to add a meta link which will run instead of the method with a condition, but the condition did not work… I have tried to implement the metallic met