Re: outlets to multiple views (NSView)
Re: outlets to multiple views (NSView)
- Subject: Re: outlets to multiple views (NSView)
- From: Uli Kusterer <email@hidden>
- Date: Thu, 26 Oct 2006 22:44:39 +0200
Am 25.10.2006 um 12:14 schrieb Aaron Boothello:
ive been implementing notifications into my code.
after registering different views as 'observers' of my model. if i
change the model from any of the views, do i need to 'post A
Notification' in order for the other views to be updated ? or is
this supposed to happen automatically when the model is changed ?
tring to get this to work, so was wondering what the chain of
events and behavior 'should' be.
Well, that depends on how you're implementing it. You can e.g use
bindings, or rather Key-value-observing to observe certain objects'
values, and when those change any observers will be notified. Or if
your objects aren't KVO-compliant, you'll have to code it manually
either by coding your object to be KVO-savvy (thus explicitly calling
certain methods when a value changed), or by sending NSNotifications
whenever a change happens.
Pick whatever you feel works best for you. The docs should help you
determine the advantages and disadvantages of each approach.
Cheers,
-- M. Uli Kusterer
http://www.zathras.de
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden