• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Some MVC questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Some MVC questions
      • From: Kyle Moffett <email@hidden>
    • Re: Some MVC questions
      • From: Brent Gulanowski <email@hidden>
    • Re: Some MVC questions
      • From: Andrew Pinski <email@hidden>
  • Prev by Date: PlotIconRef() into NSImage??
  • Next by Date: Login App
  • Previous by thread: Re: PlotIconRef() into NSImage??
  • Next by thread: Re: Some MVC questions
  • Index(es):
    • Date
    • Thread