• 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
MVC Question . . .
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

MVC Question . . .


  • Subject: MVC Question . . .
  • From: "Michael A. Crawford" <email@hidden>
  • Date: Sat, 08 Nov 2008 17:46:25 -0800

I have a model-view-control class hierarchy that I'd like to add an auxiliary (test-only) view to. I've created a 2nd NIB with an NSPanel instance associated with a sub-classed NSWindowController. I'm able to load the NIB and instantiate the panel but how to I associate the model class with the new view? They are in separate NIBs. I borrowed this architecture from an example in chapter 12 of Aaron Hillegass' third edition of "Cocoa Programming for Mac OS X."

Logically, it seems like the easiest thing to do would be to create a second view in the same NIB as the first and have a model-view1-view2- controller setup. I tried this by copying the NSPanel class into the MainMenu.xib file, from it's original NIB file, and then trying to reference it directly via IB connections. In the process I left its associated controller behind in its private NIB, thinking I wouldn't need it.

Bottom line, I can't make any connections to the new outlet I defined in my main controller class. This is still new to me and I'm confused. Can someone please tell me how best to create a second (different) view to the same model that is modeless and can share a common controller? If that is a bad solution, can you recommend a good one?

I just needed to have the auxiliary panel present in order to key it test data and watch everything work.

-Michael
----------------------
The united stand.  The divided get played.

-- Bernie MAC


Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: MVC Question . . .
      • From: Ken Thomases <email@hidden>
  • Prev by Date: CAOpenGLLayer no Antialiasing?
  • Next by Date: Xcode's New Data Model reads ivars as attributes ?!?
  • Previous by thread: Re: CAOpenGLLayer no Antialiasing?
  • Next by thread: Re: MVC Question . . .
  • Index(es):
    • Date
    • Thread