08-03-2008 08:22 PM
I am trying to write a simple class (PromptPopup) that is similar to Dialog where I can say:
String foo = PromptPopup.prompt(....); // PromptPopup extends PopupScreen
which displays a prompt similar to Dialog.ask(..) but returns a string containing within an EditField.
I can get this example to work if called by a non-event thread; however, blocking in an event-thread causes the application to hang until the OS eventually kills it.
How is it that Dialog.ask(), which must be called from the event thread, can block execution except not actually block the underlying event thread from handling input events?