On Tue, Oct 7, 2008 at 10:44 AM, Shawn Erickson <[EMAIL PROTECTED]> wrote: > On Tue, Oct 7, 2008 at 9:31 AM, Karan, Cem (Civ, ARL/CISD) > <[EMAIL PROTECTED]> wrote: > >> My dilemma is how to do this hookup; I can use either notifications or >> bindings, but I can't decide which is better in this situation. Bindings >> seem to be simpler to use, but reading about them suggests that you are >> expected to use the MVC design pattern, and I'm not doing MVC here. >> Notifications are used anywhere you want, but require more (and more >> careful) work to get right. So, are bindings considered general purpose, or >> should they really be reserved for MVC situations (even though they can work >> anywhere)? > > This is hard to answer in the abstract but in an attempt to color your > thinking...
I should note that using neither KVO or notification is also an option... You could have your "bridging" objects support the concept of a delegate or delegates (in this case think listener). Then objects that want "notifications" from one of your bridge objects add themselves as a delegate of that object. It would then implement the informal protocol methods (delegate methods) that it cares about so it will be messaged when the bridge detects things have changed (but only for the subset of things they happen to care about). This is a more direct coupling which can be good or bad depending on what you are doing... -Shawn _______________________________________________ Cocoa-dev mailing list ([email protected]) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
