Sunday, March 30, 2014

[ANE] Daily pitfall, ANE and Worker don't get along in constructor

Quick note for ANE and Worker when you got...
ReferenceError: Error #1065: Variable ... is not defined. at Main()

To reproduce

  1. get any ANE e.g.
  2. get helloworld Worker e.g.
  3. and put both in constructor like this

Work around

  • don't alloc ANE and Worker in constructor together, let worker do their job in their thread and then alloc ANE in Main thread.

That's it! back to work!

No comments: