Report post

Are you sure you want to report the post shown below? This will send an email to the ATVO administrators. Please include a short reason for reporting.

Users reporting for no reason may be locked out.


Post

Posted by Nick Thissen
on
Yes. I think you can just make the script accept the value as an object array rather than one object:
public object Execute(ThemeContentItem item, object[] value, string parameter, ISimulation sim)
{
var v1 = value[0];
var v2 = value[1];

//...
}


Or it also probably works if you just convert the object value to an object array:
public object Execute(ThemeContentItem item, object value, string parameter, ISimulation sim)
{
var values = (object[])value;
var v1 = values[0];
var v2 = values[1];

//...
}


I do think there is a requirement that you also return an object array with the same number of items as the input. So if you bind to 2 data bindings you need to return an object array of length 2, otherwise it will fail. Not sure why I added this restriction as it seems unnecessary. If you only need to return one of the data binding values, just return that one as the first value and the other (or null) as the second one, and in your Text property only print the first (macro "{0}").