Notification appropriate
Notification appropriate
- Subject: Notification appropriate
- From: Robert Mullen <email@hidden>
- Date: Wed, 5 Nov 2008 13:27:32 -0800
I asked earlier about a couple of views that were going to be
alternating in a desktop app I am building and I have a related
question. These views are loosely related in a parent child manner
(but can operate completely independently as well.) The click of an
iTunes arrow style link in an NSTableView in view 1 will cause the app
to switch to view 2 with the related detail data from the selected row
shown. Both views have their own custom controller objects. I need to
have the controller for view 1 (containing the NSTableView) inform the
controller for view 2 that this link was followed and provide it with
the context data (a business object) so that it can pull up its own
data. I am doing this via NSNotification right now and it works as
anticipated. In Windows I would have simply instantiated the
controller class for view 2 and used a constructor that accepted a
parameter containing my context data. That is obviously very tightly
coupled and not MVC compliant. Is NSNotification the best way to do
this and conform to MVC or should I be looking at a different mechanism?
Sorry if these questions are pedantic but I don't just want to
transfer Windows skills to the OS X world, I want to build
applications with OS X best practices in view.
TIA
_______________________________________________
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