[Twisted-Python] TextEntry

RSGames Support rsgames at inbox.com
Wed Nov 17 14:56:12 MST 2010


Hi,
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)
 new.Raise()
 if new.ShowModal() == wx.ID_OK:
  socks.sockObj.sendData(new.GetValue())
 else:
  socks.sockObj.sendData("+~!?CANCEL?!~")
  new.Destroy()

Thank you.

____________________________________________________________
Send your photos by email in seconds...
TRY FREE IM TOOLPACK at http://www.imtoolpack.com/default.aspx?rc=if3
Works in all emails, instant messengers, blogs, forums and social networks.



More information about the Twisted-Python mailing list