Some MVC questions
Some MVC questions
- Subject: Some MVC questions
- From: Koen van der Drift <email@hidden>
- Date: Thu, 18 Jul 2002 15:32:33 -0400
Hi,
I have some questions regarding the implementaion of the mvc paradigm in my
app. My app displays a datamodel (a directed acyclic graph, to be more
precisely) in a window. The user can edit the graph by dragging nodes from
a palette (in a separate window) to the main window, or by selecting the
nodes and delete them, or move them around.
So, this is what I have in mind:
Model: the graph itself - probably a subclass of NSMutableArray, and each
node is a subclass of NSObject.
View: MyGraphView, a subclass of NSView. This forwards received drags and
mouseclicks to the graph. And it draws the graph (actually it tells the
graph to draw itself in the view)
Controller: ??? - now I am stuck. What should this class take care of? Is
it an intermediate between the view and the graph, eg when an object is
added or moved?
And how does the palette fit into the MVC scheme?
Any input is appreciated.
thanks,
- Koen.
_______________________________________________
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.