• 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: NSUserInterfaceItemIdentification -identifier vs -tag
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSUserInterfaceItemIdentification -identifier vs -tag


  • Subject: Re: NSUserInterfaceItemIdentification -identifier vs -tag
  • From: email@hidden
  • Date: Wed, 09 Oct 2013 18:11:23 +0900

I lean toward tags as you can keep the speed of switch-case statements and use the macro NS_ENUM to define them out as human readable in code and to get code completion.

String comparisons would be slightly slower.

I think of the identifier as being more useful in caveman debugging.

Sent from my iPhone

> On 2013/10/09, at 5:59, "email@hidden" <email@hidden> wrote:
>
>> On 8 Oct 2013, at 21:54, Lee Ann Rucker <email@hidden> wrote:
>>
>>
>>> On Oct 8, 2013, at 1:47 PM, email@hidden wrote:
>>>
>>> The NSControl -tag property can be used to identify an action sender.
>>>
>>> Can the NSUserInterfaceItemIdentification protocol property -identifier be safely used for the same purpose?
>>
>> I don't know, but I'd prefer representedObject for something like that - it'll only be used by your code, so you don't have any restrictions to worry about.
> -tag and -identifier both have the advantage of being accessible from within IB.
>
> J
>
>
>
> _______________________________________________
>
> .

_______________________________________________

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: 
 >NSUserInterfaceItemIdentification -identifier vs -tag (From: "email@hidden" <email@hidden>)
 >Re: NSUserInterfaceItemIdentification -identifier vs -tag (From: Lee Ann Rucker <email@hidden>)
 >Re: NSUserInterfaceItemIdentification -identifier vs -tag (From: "email@hidden" <email@hidden>)

  • Prev by Date: Re: NSUserInterfaceItemIdentification -identifier vs -tag
  • Next by Date: Re: Infinite Scroll View?
  • Previous by thread: Re: NSUserInterfaceItemIdentification -identifier vs -tag
  • Next by thread: Keeping Scroll Views in Sync
  • Index(es):
    • Date
    • Thread