MVC Question . . .
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