Yeah I was trying to find that again to reread to see if it made clearer to me. From the statement it seemed that with the period it should work, as I assume the function works on the entries in the Table.
IE:
(f1:what_color()) == (xx.what_color(f1))
So you could do: (colours.what_colour(f1, f2)) and get both outputted correct?
Also I also assume the print command is obsolete as there is print within the function itself?
Really should get scripting up and running but not on the right computer at the moment so pushed back to asking questions, rather than experimenting…
Think maybe this paragraph from the Editor_Terminal.txt should be mentioned earlier and a little more prominant and it took me a while to work why Execute just seemed to save the file, rather than run it, and I had to copy and past the whole load into the command line.
(PS. Obviously I’ve not got Renoise fired up here )
My answer to that from experiments is a yes and a no!
Try using xx and it wont work as it has not been defined.
Use f1, f2 or Fruit and all will work fine. Seems as long as the variable before the period exists it will process the function with the value in the table field. Although, especially for reasons before, you’re best to keep the same or just use the colon.
Change colours to Fruit (as above it needs to know the variable (seems to say "variable not defined but works whether you put a class, object or variable in there) to work.)
But then no matter what I do it only ever seems to output the first argument (is that the right word? Or is it a table entry?) within the brackets().
Surely there is a way to do this? Or to run a function on all objects within a class? So if you add or remove objects you don’t need to do so much other editing of the script.
I’m guessing it’s more of these global class/definition such as the self one demonstrated above. Whereabouts are these documented?