Re: [[sender selectedCell] tag] crashes in 10.6
Re: [[sender selectedCell] tag] crashes in 10.6
- Subject: Re: [[sender selectedCell] tag] crashes in 10.6
- From: Graham Cox <email@hidden>
- Date: Sun, 3 Jan 2010 09:55:18 +1100
On 03/01/2010, at 9:40 AM, Henrietta Read wrote:
> Think I must be doing something wrong, I just got a new laptop with 10.6 for
> Christmas. My app that works fine in 10.5 seems to have all its pop-up menus
> broken... ???
>
> Here's the code:
>
> - (IBAction)myPopupButton:(id)sender
> {
> gMyPopupButtonSetting = [[sender selectedCell] tag];
> }
>
>
> 'gMyPopMenuSetting' is an Int.
>
> When I step through the debugger, '[[sender selectedCell] tag]' crashes. Any
> ideas why?
No, it should be OK, though I suspect not what you really want.
For a pop-up button, the method that returns the chosen item is -selectedItem, not -selectedCell.
--Graham
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden