We help IT Professionals succeed at work.
Get Started

Cascade Closing Views

SGyves
SGyves asked
on
259 Views
Last Modified: 2013-11-20
I am building an IRC client and I have a slight difficulty. I need on view to represent the key view so that when it is closed...all other views associated with that document close as well. The main view is a view to the server the client is connected to. All other views in that doc will be just open channels. Now when a channel view closes...no problem....just part that channel. But when the main server view closes...I want all the channels to close with it. How can I make that happen. I have tried DisconnectViews() in the document and tried to call that in the destructor for the CView. I would check the ID of the view..and if it was a server view...I would then trigger the closing of all other views there. I get a debug error telling me there is a failure in the IsKindOf function with asserting a pointer. Anyway....any ideas as to the right apporach.
Comment
Watch Question
This problem has been solved!
Unlock 1 Answer and 3 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE