My class is working in Processing so I won't clutter this up with that code.

So back to my 2 questions: defining and initing classes: how do I do that in Wiring? Along with storing instances of them. In my array declaration above Wiring gives me the error the "PSprite does not name a type". - so it doesn't recognize my class.

hi Roy, this is very similar to create a new library for Wiring, it will create a new data type as the PSprite you are creating. The syntax in wiring and Processing is quite different, this is because Processing is written in Java and Wiring is written in C++, so the way of creating new classes in Wiring will resemble the C++ syntax. There is a thread in the forum about creating a library, and Nicholas posted an example called a Hello World library here http://wiring.org.co/cgi-bin/yabb/YaBB.pl?num=1144744422 so you can examine the code etc. Let me know.

There is also the Sprite library, I am not sure if that is what you're looking for as well, it is already here: http://wiring.org.co/reference/libraries/Sprite/index.htmlYou can check the Sprite library (class) source code browsing here: http://wiring.org.co/source

thanks for the reply! I have been tinkering with the Test.cpp library this morning and am slowly making my Processing class into a lib. Feels like the deep end of the pool!

This question may be beyond the scope of Wiring help: my Processing class has a method called 'update' and when it's called, it does some business and then calls a global function: setSegmentState(int i, array a), passing an int & an array as args.

In Wiring/C++, if I want my class instances to call a function defined in my Wiring program then I guess I have to use #include and provide a definition- is that correct? (slight panic setting in..

I guess I could have the instance return some values to the 'update' call and then call 'setSegmentState' from within my Wiring program.