help on document/view design.

S

shuisheng

Dear All,

I am learning the document/view design. The document stores data and
provides GUI-independent operations upon it; while the views display
and manipulate the data.

Assume I have several objects to display in the view. And I can hide
some objects in the view.

My question is that: May I need to store the hide status of an object
in the document? If I store them, when on updating the view by the
document, I can still hide those that are asked to hide before. But
accoding my understanding, the hide status is GUI-dependent, and it
will spoil the original intention of separation of document and view.

Anybody can give me some suggestion?

Thanks a lot!

Shuisheng
 
N

Noah Roberts

shuisheng said:
Dear All,

I am learning the document/view design. The document stores data and
provides GUI-independent operations upon it; while the views display
and manipulate the data.

Assume I have several objects to display in the view. And I can hide
some objects in the view.

My question is that: May I need to store the hide status of an object
in the document? If I store them, when on updating the view by the
document, I can still hide those that are asked to hide before. But
accoding my understanding, the hide status is GUI-dependent, and it
will spoil the original intention of separation of document and view.

Anybody can give me some suggestion?

It's very difficult to understand you but if I get your meaning you may
be served by using several views governed by a mediator.
 
P

paul.joseph.davis

Dear All,

I am learning the document/view design. The document stores data and
provides GUI-independent operations upon it; while the views display
and manipulate the data.

Assume I have several objects to display in the view. And I can hide
some objects in the view.

My question is that: May I need to store the hide status of an object
in the document?

I don't see any need to do this. All the GUI toolkits I've worked with
support some sort of hide() operation for widgets.

If I store them, when on updating the view by the
document, I can still hide those that are asked to hide before. But
accoding my understanding, the hide status is GUI-dependent, and it
will spoil the original intention of separation of document and view.

It sure would violate the document/view separation to store view
information within the document.
Anybody can give me some suggestion?

Thanks a lot!

Shuisheng

HTH,
Paul Davis
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top