rsgames at inbox.com
Thu Nov 18 18:10:24 EST 2010
Okay. Well that's not so great - these TextEntryDialogs are quite important to the program. Anyway on Windows and Linux, ShowModal() seems to work really well with wxreactor, and it is only Mac OS X that is the problem.
> -----Original Message-----
> From: exarkun at twistedmatrix.com
> Sent: Thu, 18 Nov 2010 05:00:45 -0000
> To: twisted-python at twistedmatrix.com
> Subject: Re: [Twisted-Python] TextEntry
> On 17 Nov, 09:56 pm, rsgames at inbox.com wrote:
> >I have been using the following code to show the user a
> >TextEntryDialog, that would allow users to enter data in, and press
> >return. Since I've started using Twisted, this doesn't work on Mac OS
> >X. The dialog pops up okay, but you can't actually enter any data into
> >the box. The cursor does not appear. When I click inside the box to try
> >to make it appear, it quickly disappears again.
> >def handle_input(data):
> >prompt=data.replace("+INPUT ","")
> >new=wx.TextEntryDialog(global_vars.frame, "", prompt)
> >if new.ShowModal() == wx.ID_OK:
> You probably want to avoid modal dialogs (in any toolkit) when
> integrating with Twisted. The require a reentrant mainloop to
> implement, and no Twisted reactor (ie, mainloop) is reentrant.
> Whether or not the fact that this is a modal dialog is actually causing
> this particular problem, I don't know.
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
Send any screenshot to your friends in seconds...
Works in all emails, instant messengers, blogs, forums and social networks.
TRY IM TOOLPACK at http://www.imtoolpack.com/default.aspx?rc=if2 for FREE
More information about the Twisted-Python