Re: Some MVC questions
Re: Some MVC questions
- Subject: Re: Some MVC questions
- From: Cameron Hayne <email@hidden>
- Date: Thu, 18 Jul 2002 20:22:15 -0400
On Thursday, July 18, 2002, at 05:52 pm, Brent Gulanowski wrote:
Another example of the MVC paradigm in action is the re-organization of
the node's on the drawn representation of the graph. The model doesn't
need to know how the drawing looks, nor what the co-ordinates of the
drawn nodes are -- leave that to the view objects. If the user moves
them without changing their connections, the graph hasn't changed, so
the model shouldn't be changed either.
But what about saving the state of a view (so it comes up the same way
next time)? Usually it is the model which gets saved to a file. How
would you handle this? I'm thinking you would have a separate 'v-model'
which would store things like node coordinates. Then the view would
query the controller for both the node-model data and the v-model data.
And this would seem to indicate the need for some sort of
node-identifier to tie together the two models. Of course it woudl be
much simpler programming to just have the coordinates stored as part of
the node!
... Cameron
--
Cameron Hayne (email@hidden)
Hayne of Tintagel
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.