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

List:       kde-kafka
Subject:    Re: Basic design diagram
From:       Stefan Schimanski <1Stein () gmx ! de>
Date:       2000-10-29 14:44:04
[Download RAW message or body]

On Sunday 29 October 2000 10:23, Thomas wrote:
> What is the role of the KafkaDoc object?
>
> I would assume it is the holder of the document. And a document does not
> HAVE to have a view.  So the doc should be related to the DOM, and the
> different views should all be related to the doc (where the views obviously
> have a pointer to the dom directly).

The document is the central class that hold the resposibility for the 
currently edited file. It may give away the resposibility to a view which 
stores the document in his format (the wysiwyg view might use the DOM, the 
html one uses kwrite). The document keeps track about the view which 
currently holds the data.
There's only one active view at a time to be sure that there is only one 
state of the file.
When the file should be saved i.e., the application asks the document to 
write to a given url. The document retireves the html code from the current 
view and stores it.
I hope that makes my idea of the document/view classes a bit clearer.

> The only change I think is needed is to allow the doc to store a pointer to
> - DOM
> - Views

Consequently to the above the document only hold html code which may be given 
away to a view and gotten back from it. The dom is a specific data format of 
the wysiwyg view.

Schimmi

-- 
#! /bin/sh
for DVDs in Linux screw the MPAA and ; do dig $DVDs.z.zoy.org ; done | \
   perl -ne 's/\.//g; print pack("H224",$1) if(/^x([^z]*)/)' | gunzip
_______________________________________________
Kde-kafka mailing list
Kde-kafka@master.kde.org
http://master.kde.org/mailman/listinfo/kde-kafka

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

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