Quick question on coroutines

If I try to create a coroutine inside a class, I get an error, “Function arguments expected near (”, eg this doesn’t work.
cos=coroutine.create(Test:Test1)

It seems to be because the name is inside a class and has a class name prefix and colon. I can get it to work if I point at a function which isnt in a class. How then can I define a coroutine within a class?

Ta

Dermot

Try Test.Test1, its a whole formal lua feature of : vs . There are a few helpful topics on the wiki

Thank you, Jordan, that works

I was separately using a callback to a class, and that didn’t like the syntax Class:Function either. So I tried your solution without success, then found a suggestion here.
http://twolivesleft.com/Codea/Talk/discussion/1210/why-one-callback-works-and-the-next-fails-on-self-reference/p1

…which involved sending through a separate reference to the class as well as to the function

One day I’ll understand all of this - I hope.