Reply To: Repeats in NSLog

Home Forums OpenEars Repeats in NSLog Reply To: Repeats in NSLog

Halle Winkler

So are you saying that I should only declare PocketSphinxController *pocketsphinxController in only one header file and reference it from different view controllers?

This isn’t quite how object declaration and definitions work in Objective-C. From the docs:

There can only be one PocketsphinxController instance in your app.

That means a single declaration and definition, and a single instance of that declaration/definition. It’s fine (and intended) to have lots of OpenEarsEventsObserver instances, but if you have lots of them instantiated at once you’ll need to do some logical control in order to prevent them all from sending callbacks simultaneously if that isn’t the result you want.