Many thanks. I didn't know object could be nil yet still pass it along when 
populated



On Aug 3, 2010, at 4:15 PM, Quincey Morris <quinceymor...@earthlink.net> wrote:

> On Aug 3, 2010, at 13:00, Eric E. Dolecki wrote:
> 
>> WHen you say it takes an NSNotification object as a parameter, you mean to 
>> say that it's missing, correct?
> 
> Yes, as in:
> 
> - (id)initWithFrame:(CGRect)frame {
>   if ((self = [super initWithFrame:frame])) {
>       mydata = [[NSArray alloc] init];
>       menuItems = [[NSMutableArray alloc] initWithCapacity:40];
>       [[NSNotificationCenter defaultCenter] addObserver:self 
> selector:@selector(buttonClicked:)  name:@"ButtonClicked" object:nil];
> // note the colon in the selector now
>   }
>   return self;
> }
> 
> -(void) buttonClicked: (NSNotification*) notification {
>       UIButton* button = notification.object;
>       NSUInteger tag = button.tag;
> }
> _______________________________________________
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> 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/edolecki%40gmail.com
> 
> This email sent to edole...@gmail.com
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Reply via email to