[IronPython] Fwd: Locked thread?
dinov at exchange.microsoft.com
Mon Dec 18 19:09:00 CET 2006
Is wpf the Avalon.py we ship in the tutorial renamed? The tutorial version creates a 2nd thread where all the UI requests from the interpreter will be executed on. I believe the code sample below should work with our Avalon.py.
If you've modified Avalon.py to do some of your own GUI creation and then the code in wpf.py is running on a different thread from the code at the console (the hook to redirect console input isn't in effect until after the import succeeds, so the import runs on one thread, and then all your commands you start typing start running on antoher thread). Let us know more about wpf.py and we might be able to drill into the issue you're encountering.
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Gerard Braad Jr.
Sent: Monday, December 18, 2006 3:53 AM
To: users at lists.ironpython.com
Subject: [IronPython] Fwd: Locked thread?
When I normally use IronPython I have no problems (as embedded or running scripts) I have no problem. Even in interactive mode it is good. Although some issues arise when I use Windows Forms or Presentation Framework in interactive mode. It seems the graphics thread locks all others. So when I do the following...
>>> from wpf import *
>>> w = Window()
>>> b = Button()
>>> b.Content = "Tickle me..."
>>> w.Content = b
... no window is shown and the taskbar of windows is blocked until the last Close() statement. Does this have to do with the Thread Apartment IronPython is running in?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Ironpython-users