• 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
NSView -identifier - is there more to it?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSView -identifier - is there more to it?


  • Subject: NSView -identifier - is there more to it?
  • From: Jonathan Mitchell <email@hidden>
  • Date: Wed, 09 Dec 2015 23:17:34 +0000

The docs for the NSUserInterfaceItemIdentification protocol for @property(copy) NSString *identifier say:

If you create an item in Interface Builder and do not set a value for this string, a unique value is created for the item when the nib file is loaded.

and

You should not change the value of a window’s identifier after adding any views to the window. For views and controls in a window, the value you specify for this string must be unique on a per-window basis.

I have a ton of deeply nested dynamic UI and it really helps when using the Xcode UI debug tools to have a meaningful view identifier - say the view controller class name.

When views are loaded from nibs they do have an identifier but it seems to be very far from unique - the trace below is for initial views for one window.

So the questions are:

1. Does AppKit make any use of NSView -identifier to influence actual rendering behaviour? Accessibility APIs?
2. Is uniqueness at all necessary?

Thanks

Jonathan

2015-12-09 22:55:46.752 Buster[-] _NS:9
2015-12-09 22:55:47.000 Buster[-] _NS:17
2015-12-09 22:55:47.327 Buster[-] _NS:9
2015-12-09 22:55:47.334 Buster[-] _NS:132
2015-12-09 22:55:47.340 Buster[-] _NS:11
2015-12-09 22:55:47.341 Buster[-] _NS:10
2015-12-09 22:55:47.390 Buster[-] _NS:10
2015-12-09 22:55:47.392 Buster[-] _NS:10
2015-12-09 22:55:47.396 Buster[-] _NS:10
2015-12-09 22:55:47.399 Buster[-] _NS:10
2015-12-09 22:55:48.495 Buster[-] _NS:10
2015-12-09 22:55:48.960 Buster[-] _NS:10
2015-12-09 22:55:49.197 Buster[-] _NS:10
2015-12-09 22:55:49.804 Buster[-] _NS:48
2015-12-09 22:55:49.807 Buster[-] _NS:53
2015-12-09 22:55:49.809 Buster[-] _NS:10
2015-12-09 22:55:49.811 Buster[-] _NS:10
2015-12-09 22:55:49.814 Buster[-] _NS:12
2015-12-09 22:55:49.815 Buster[-] _NS:10
2015-12-09 22:55:49.817 Buster[-] _NS:10
2015-12-09 22:55:49.819 Buster[-] _NS:10
2015-12-09 22:55:49.820 Buster[-] _NS:10
2015-12-09 22:55:49.821 Buster[-] _NS:10
2015-12-09 22:55:49.822 Buster[-] _NS:10
2015-12-09 22:55:49.824 Buster[-] _NS:10
2015-12-09 22:55:49.825 Buster[-] _NS:10
2015-12-09 22:55:49.827 Buster[-] _NS:10
2015-12-09 22:55:49.828 Buster[-] _NS:10
2015-12-09 22:55:49.830 Buster[-] _NS:10
2015-12-09 22:55:49.831 Buster[-] _NS:10
2015-12-09 22:55:49.833 Buster[-] _NS:10
2015-12-09 22:55:49.836 Buster[-] _NS:9
2015-12-09 22:55:49.843 Buster[-] _NS:9
2015-12-09 22:55:49.847 Buster[-] _NS:43
2015-12-09 22:55:50.038 Buster[-] _NS:53
2015-12-09 22:55:50.376 Buster[-] _NS:36
2015-12-09 22:55:50.377 Buster[-] _NS:9
2015-12-09 22:55:50.394 Buster[-] _NS:36
2015-12-09 22:55:50.395 Buster[-] _NS:9
2015-12-09 22:55:50.419 Buster[-] _NS:10
2015-12-09 22:55:50.460 Buster[-] _NS:10



Regards

Jonathan Mitchell
Mugginsoft LLP

email@hidden
-----------------------------------------------------------------------------
KosmicTask - the Integrated Scripting Environment for OS X.
http://www.mugginsoft.com/KosmicTask
-----------------------------------------------------------------------------
Follow on Twitter @KosmicTask
-----------------------------------------------------------------------------
Github http://github.com/mugginsoft













_______________________________________________

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


  • Follow-Ups:
    • Re: NSView -identifier - is there more to it?
      • From: Quincey Morris <email@hidden>
  • Prev by Date: Re: Determining underlying type of array in swift?
  • Next by Date: Re: iPad Pro apps given more memory?
  • Previous by thread: Re: iPad Pro apps given more memory?
  • Next by thread: Re: NSView -identifier - is there more to it?
  • Index(es):
    • Date
    • Thread