On Sat, Mar 8, 2008 at 7:09 PM, Scott.D.R
<[EMAIL PROTECTED]> wrote:
>  Because it seems impossible to post a notification
>  from an object in a Nib file to another object in another Nib file.
>  I am wondering how to accomplish these:

Notifications aren't posted directly to interested objects... perhaps
you were thinking of messages?  It sounds like you're trying to set
the actions of the controls to objects in another nib, and found out
the hard way that this won't work.

You have two options:
1) Wire the action of the controls to some object in the same nib, and
have that post notifications to the default NSNotificationCenter.  The
object in the other nib listens for these notifications and acts
appropriately.

2) Use bindings.  Bind the controls to some object that is accessible
from both nibs (the application delegate is usually a good place to
put this).  No notifications are required.  Bindings are typically the
easier way to go about this, but they do require your model objects to
be KVO compliant.

HTH,
--Kyle Sluder
_______________________________________________

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]

Reply via email to