Hi;

I just tried compiling the WPF example code (on http://www.ironpython.info/index.php/WPF_Example) with the pyc.py included with the IronPython 2.0 samples, and the resultant assembly basically doesn't work. When launched from the stub .exe, I get:

Unhandled Exception: System.InvalidOperationException: The calling thread must be STA, because many UI components require this.

...followed by a big stacktrace, showing this was basically triggered by the creation of a System.Windows.Input.InputManager as part of the System.Windows.Window ctor.

From what I recall of my Windows development, this basically means the
thing that's creating the System.Windows.Window() is running in a multithreaded apartment, and for arcane COM-related reasons, this isn't allowed. Any ideas on how to go about fixing this?

(The sample runs fine if launched directly from ipy, FWIW)

Cheers;
Chris
--
  "Back when I was young, we had to travel back in time to put the tape in so
   the game would load before we died."
_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to