• 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
Controller layer & document architecture
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Controller layer & document architecture


  • Subject: Controller layer & document architecture
  • From: Ken Tabb <email@hidden>
  • Date: Wed, 23 Jun 2004 16:25:44 +0100

Hi again folks,

I have a noddy question about the (fairly) new controller layer.

I have a document-based app and a standard info utility window which needs to display info about a single, or group of, selected objects in a document, but when the main window changes (i.e. user selects another document window), I want the same info window to display info about the selected object(s) in the new document, i.e. the info window is 1 per app, not 1 per document.

If I wanted to hook a controller to the info window and a model object in the current document, do I have 1 controller per document or 1 per app?

If I have 1 controller per document will I run into issues where several controllers are hooked up to the info window and are all updating their model object based on the info being typed into the info window?

Conversely if I have 1 controller per app, what's the best way to swap the document to which it is synching info? Using the document controller to get the frontmost document, or using notifications from the document windows (eg. that the window just became / resigned main)?

I'm just beginning the move to the controller layer so apologies if any of these questions sound stupid,
Ken

- - - - - - - - - -
Dr. Ken Tabb
Mac & UNIX Technical bloke (C, C++, Obj-C, Java) - Health & Human Sciences
Machine Vision & Neural Network researcher bloke - Computer Science Dept
University of Hertfordshire, UK
http://www.health.herts.ac.uk/ken/

Certified non-Microsoft Solution Provider
_______________________________________________
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: Controller layer & document architecture
      • From: Andreas Mayer <email@hidden>
  • Prev by Date: Re: Where's the NSWindowController in a default document-based app [SOLVED]
  • Next by Date: Really dumb Xcode question
  • Previous by thread: Swapping 'small' controls for 'mini' controls
  • Next by thread: Re: Controller layer & document architecture
  • Index(es):
    • Date
    • Thread