• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Weird bug affecting 10.6 (but not newer)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Weird bug affecting 10.6 (but not newer)


  • Subject: Re: Weird bug affecting 10.6 (but not newer)
  • From: Ken Thomases <email@hidden>
  • Date: Sat, 09 Nov 2013 10:56:13 -0600

On Nov 9, 2013, at 10:33 AM, Pax wrote:

> My application has three buttons, each with the same Sent Action. In fact, all of the buttons are identical, except for their name, icon and identifier (the identifiers are 0, 1 and 2).
>
> The Sent Action points to a spot of code which will select a tab view:
>
> -(IBAction)selectView:(id)sender
> {
>    [_preferenceViews selectTabViewItemAtIndex:[[sender identifier]intValue]];
> }
>
> It's not very complicated, and it works as it should on Mac OS X 10.7 and newer.  On Mac OS X 10.6, however, selectView doesn't get called and I get the following error in the console:
>
> [NSButton identifier]: unrecognized selector sent to instance 0x100198450
>
> I'm not ready to abandon Snow Leopard yet.  Has anyone seen this before and, if so, what is the solution?  I've hooked everything up using IB, just in case that offers a clue.

The -identifier method you're presumably accessing comes from the NSUserInterfaceItemIdentification protocol, which is adopted in NSView (and so inherited by NSButton).  That protocol was introduced in 10.7.  So, an NSButton really doesn't have an -identifier method in 10.6.

I suggest that you use the "tag" property, instead.  It's already an integer.

Regards,
Ken


_______________________________________________

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


References: 
 >Weird bug affecting 10.6 (but not newer) (From: Pax <email@hidden>)

  • Prev by Date: Weird bug affecting 10.6 (but not newer)
  • Next by Date: Re: Weird bug affecting 10.6 (but not newer)
  • Previous by thread: Weird bug affecting 10.6 (but not newer)
  • Next by thread: Re: Weird bug affecting 10.6 (but not newer)
  • Index(es):
    • Date
    • Thread