Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

wxAUI

<< < (4/7) > >>

bwilliams:
Gotcha.  Maybe we should intercept a wxActivateEvent for frame deactivation.  This would then mark any active panes as inactive.  Is that workable?

I'd be interested in your solution, too.

Best,
Ben

280Z28:
Can we re-write the Init and UnInit functions to use m_frame->Connect() for just the events we want to listen to?

Code::Blocks does that to listen to wxScintilla events.

wxEvtHandler::Disconnect() seems monstrously more powerful and less error prone than PopEventHandler()

If you've tried this and it didn't work, then I'll just leave it be, but I'd be willing to try to rewrite it and see how things go.

bwilliams:

--- Quote ---Can we re-write the Init and UnInit functions to use m_frame->Connect() for just the events we want to listen to?

Code::Blocks does that to listen to wxScintilla events.

wxEvtHandler::Disconnect() seems monstrously more powerful and less error prone than PopEventHandler()

If you've tried this and it didn't work, then I'll just leave it be, but I'd be willing to try to rewrite it and see how things go.
--- End quote ---

I think that's a great idea.  Would you be willing to post a patch here or on our forums?  I'd love to try it out.  PopEventHandler() is a tricky thing, and can cause problems in more complicated wxWidgets scenarios.

Thanks,
Ben

280Z28:
It also could cause problems in a situation like this:

wxAUI pushes
wxSomethingElse pushes

wxAUI::UnInit pops, but pops the wxSomethingElse handler. wxAUI is still on the event stack  :shock:

I'll do that and post a patch.

280Z28:
It's not working for me on the first try. I'll work on it again later. :(

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version