Re: NSNotification
Re: NSNotification
- Subject: Re: NSNotification
- From: Chris Hanson <email@hidden>
- Date: Wed, 6 Jun 2007 11:36:25 -0700
On Jun 6, 2007, at 4:18 AM, Jerry Krinock wrote:
rence/Reference.html#//apple_ref/occ/clm/NSNotification/
notificationWithName:object:userInfo:
If you're referring to the object:userInfo argument, the answer is
yes. An NSDictionary is typically used because it allows
flexibility for future changes. But in fact you may pass any object.
I'm not sure what you mean by "the object:userInfo argument" -- do you
mean the object: argument or the userInfo: argument? The object:
argument is the "direct object" of the notification and can indeed be
any object (for a non-distributed notification as Finlay points out).
The userInfo: argument, however, is typed as NSDictionary and I would
not assume I could pass it anything not derived from NSDictionary.
Nor would I assume that when I invoke -[NSNotification userInfo] that
the result is anything but an instance derived from NSDictionary.
-- Chris
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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