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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gerard Braad Jr.
Sent: Monday, December 18, 2006 3:53 AM
To: users@lists.ironpython.com
Subject: [IronPython] Fwd: Locked thread?

Hello,


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()
>>> w.Show()
>>> b = Button()
>>> b.Content = "Tickle me..."
>>> w.Content = b
>>> w.Close()

... 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?

thanks,


Gerard
_______________________________________________
users mailing list
users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to