[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice
Subject:    Re: Thinking "loud" about document/view destruction
From:       Thomas <zander () xs4all ! nl>
Date:       2000-06-18 15:16:24
[Download RAW message or body]

> 4) When a shell gets deleted, it removes all its root
>    views (splitting!) and the active view. The views tell
>    their document(s) that they've been deleted and in the
>    end the shell tells the document, too.

Right, and the intelligence that the document should be deleted if
the last shell has been deleted should be in the document, not
in the shell. This will make the implementation something like:

Doc
  *views
  *shells
  *other_children
  removeView(view)   //called by the view in its destructor
  removeshell(shell) //called by the shell in its destructor
  createShell()

View
  *doc
  *shell

Shell
  *doc
  *views        // only child views
  createView()  // used for splitting only


> Thank you for reading that far. I don't know if anything of
> the above said is understandable or makes sense. Please tell
> me what you think about it/where you have problems to follow
> me. I'll try do fix the current problems ASAP, then...

Looks very good to me, but I only know the global setup of the datastruct.

-- 
Thomas Zander                                            zander@earthling.net
The only thing worse than failure is the fear of trying something new

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic