Hey Goetz,

2008/12/8 Goetz Babin-Ebell <[EMAIL PROTECTED]>:
> Hello,
>
> the actual implementation of Wt::WMessageBox uses the
> recursive event loop.
>
> Unfortunately this feature is not available without threads.
>
> Additionally the actual implementation has the disadvantage
> that you have to guarantee that with N threads you have at
> most N-1 WMessageBoxes open.
>
> Is it possible to
> * change the WMessageBox to not use the recursive event loop or
> * change the recursive event loop to stay in the same thread
>  (and not needing threads at all)

WMessageBox does support the alternative usage, which does not require
blocking a thread:

{
 ...
 box_ = new WMessageBox(...);
 box_->show();
 box_->buttonClicked.connect(SLOT(box, WMessageBox::accept));
 box_->finished.connect(SLOT(this, MyWidget::handleBoxDone));
}

void MyWidget::handleBoxDone()
{
  switch (box_->result()) {
    ...
  }

  delete box_;
}

I do not think it is possible to implement the exec() style (requiring
a recursive event loop) so that it works without sacrificing a thread,
for multiple sessions, since how would this look like if you have
multiple sessions requiring simultaneously to block their stack?

Regards,
koen

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to