Metalinks arguments as Array ?

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

Metalinks arguments as Array ?

Steven Costiou-2

Hi,

can we somehow provide an array of reifications to a metalink metaobject ?

For ex.:

link metaObject: [:args| do stuff with args].

link selector: #valueWithArguments:.

link arguments: #(object node link receiver sender)

So that when the link executes, args in the block would be an array containing all wanted reifications ?

 

This example does not work as is, because the number of reifications (5) is different from the number of arguments taken by the selector (1). The problem is that for blocks, i could use the #value: message, but it is limited to #value:value:value:value:, so 4 arguments. Besides, if i want 10 reifications for example, i would not want to have a selector like #value:value:value:value:value:value:value:value:value:value: ...

 

Any ideas ?

 

Steven.

Reply | Threaded
Open this post in threaded view
|

Re: Metalinks arguments as Array ?

Steven Costiou-2

Ok, i found it digging the mailing list...

Working example is in testReifySendArgsAsArray method, where it suffice to use

link options: #(argsAsArray).

I should try searching in the list before asking...