Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ TheIDE » U++ TheIDE: Other Features Wishlist and/or Bugs » BUG: "Close();" does not!
Re: "Close();" does not! [message #41881 is a reply to message #41880] Mon, 03 February 2014 14:22 Go to previous messageGo to previous message
Oblivion is currently offline  Oblivion
Messages: 1093
Registered: August 2007
Senior Contributor
As Shire already mentioned, and as far as I know, you cannot directly call the TopWindow::Close() from an inner event loop (but it seems relatively safe, since if called from an inner loop, Close() method does nothing and simply returns). I might be wrong, but afaik, buttons, top menu etc. does not have a seperate event loop, they pass their events to their parent (here, TopWindow). On the other hand, popup menu and modal dialogues have an inner loop (you can see they are invoked by methods such as Do(), Run(), Execute())

For example, you could have called Close() if the menu was a direct children of topwindow (a top menu). In this case, you are calling from inside an popup menu of ArrayCtrl (which probably invokes the MenuBar::Execute() method) , so you need to break the top level event loop "explicitly". Use TopWindow::Break().


void testclose::DoClose()
{
 // Breaks the TopWindow event loop.
 Break();
}





Also, note that TopWindow::Close() method is virtual, you can override it to suit your needs.

Regards.


[Updated on: Mon, 03 February 2014 14:52]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Unability to debug
Next Topic: Problematic hack in upp::Build.cpp
Goto Forum:
  


Current Time: Fri May 10 00:46:14 CEST 2024

Total time taken to generate the page: 0.03250 seconds